Plot Not showing all values
17 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a couple arrays being created from a CSV file.
Here is my code:
Array=csvread('SampleV5.csv');
col1 = Array(1, :);
col2 = Array(2, :);
plot(col2, col1);
For some reason the plot shows some giant values on the Y axis, even though the max value in the csv is only ~100.
Any ideas?
1 个评论
dpb
2020-5-27
编辑:dpb
2020-5-27
Yeah. There really is at least one giant value in there...
0.300224 0.400304 0.500255 0.600571 0.700721
0 0.01 0.02 0.03 0.04
992008
19.92
Above is a tiny portion of the spreadsheet. I put
=MAX(A1:BXQ1)
=MAX(A2:BXQ2)
in A3 and A4.
In MATLAB, use the alternate optional return index value to find where that value is located and you can then look in that area to see if you can spot what may have happened.
ADDENDUM:
I didn't go look, but this could be another case of missing the decimal point Walter pointed out on the x-value array as well...perhaps that's intended to be 0.992008 instead?
回答(1 个)
Walter Roberson
2020-5-27
The max value of col2 is only about 20, but the maximum value of col1 is 992008
Near 210 the entries go like
21.4239 21.5239 216226 21.7212 21.8214
That suggests to me that you might have accidently omitted some decimal points in entering the data. It looks like every 25th entry that it is happening to.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!