Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

matlab accuracy problem

Status
Not open for further replies.

jpr105

Computer
Feb 7, 2007
12
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
 
Replies continue below

Recommended for you

Gotta show some actual code and/or data that we can run to either replicate or explain the results.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor