×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

matlab accuracy problem

matlab accuracy problem

matlab accuracy problem

(OP)
Hi everyone,

I am currently trying to store some image locations, with corresponding vote locations for objects. For some reason Matlab is storing a certain entry with the decimal point incorrectly (one place to the left too far)

For example:
the matrix I have is:

30.0000  323.5900  291.6  323.0900  28.3760

where the last entry is incorrect.

When filling the matrix I included some print statements to display the values to the command window, which yielded the correct value:
283.76.

Are there any reasons as to why Matlab would be cutting a power of 10 off this value?

Any help would be most appreciated,

Thanks,
J

RE: matlab accuracy problem

Gotta show some actual code and/or data that we can run to either replicate or explain the results.

RE: matlab accuracy problem

(OP)
No problems, I have managed to get it to work.

I rewrote the code where it was placed into the matrix and there must have been something there matlab didn't like. All is fine now though.

Thanks,
J

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources