Why doe the data extracted from excel sheet gets converted to scientific power ?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi
I am extracting a huge data from .csv file. I have to plot the time and the power data/radiation data from this file. I first convert the data into arrays and use plot function. The data is fine if I call it in small numbers but if I call the complete data, it gets converted to scientific power form. Hence, the plot is not correct. Following is the code and attached is the csv file and plots.
data = readtable('rundata2.csv');
AccColumn = {'Ppv','tload'}
Ppv = data(:,AccColumn(1));
tload = data(:,AccColumn(2));
Ppv2 = table2array(Ppv);
tload2 = table2array(tload);
plot(tload2,Ppv2)
Solution:
Ppv2(1:100)
ans =
116.5341
110.1099
... so on
But when a larger data is called
1e-16[0.0003
0.0003
0.0003
0.0003
0.0003
0.0003
... soon]
2 件のコメント
回答 (1 件)
Steven Lord
2019 年 4 月 19 日
To change the way the data is displayed (which will not impact how it is stored) use the format function.
4 件のコメント
Star Strider
2019 年 4 月 19 日
The 'Exponent' property is relatively recent, although I do not remember when it was introduced.
You may need to specifically set your 'XTick' and 'XTickLabel' properties to avoid the exponents.
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!