Problem with importing excel data.

3 views (last 30 days)
Jack
Jack on 15 Apr 2014
Answered: dpb on 15 Apr 2014
Hi,
I am importing a data table from excel and running into some problems with the format that inputs in. For example I have row that reads 11018.81, 20.8143. But matlab is importing these as 0.1102, .00002 and at the top it says 1.0e+05, so I under stand the program is automatically trying to make them easier to read.
But my problem is, I am trying to use this data for a plot, which is not working porperly because it needs the full numbers. Is there a way to import this and get all the complete, unabbreviated data?
Thanks.

Answers (1)

dpb
dpb on 15 Apr 2014
That's not why the plot isn't working--the data internally is full precision, only the display at the command line uses the formatting of the common multiplier. To prove this to yourself, try
x(1,1)
x(1,2)
at the command line sequentially and see what is displayed.
Need to show more code and explain what, specifically, you think isn't as it should be in the plot. "Not working" is never sufficient explanation for a problem.
Perhaps the problem is simply that because of the large disparity in values you need to either use a semilogy to put the y values on a logarithmic axis or use plotyy to put the two on opposite y axes so they can be scaled appropriately for their relative magnitudes.

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!