Why is probplot not plotting the reference line for one matrix column?
1 回表示 (過去 30 日間)
古いコメントを表示
Inputting a 1457x3 double matrix whose columns represent millimeter motion in 3D space, probplot is not plotting a reference line for the first column (lateral data). Why? (Removing this column, probplot works, so it appears limited to this data specifically.)
I have attached the DICOMallshifts data, the file created via csvwrite. Interestingly, WordPad is showing -0 whereas MATLAB simply has 0, (cf. screenshot below) ... Does this show that MATLAB is in fact treating the 0 as negative because of this line in my code redefining axes?
DICOMallshifts = cmtomm*...
[-InterfractionalElektaMotion(:,1) -InterfractionalElektaMotion(:,3) ...
InterfractionalElektaMotion(:,2)];
Are all the -0 data causing this error in probplot?
Here is the code generating the probplot figure:
figure
probplot(DICOMallshifts)
legend('show','Location','northwest')
Here is a screenshot showing the problem:
Discrepancy between MATLAB and data written to file:
0 件のコメント
回答 (1 件)
Massimo Zanetti
2017 年 1 月 26 日
The problem is not due to -0 (which is the same as 0). It seems that your data in the first column are not even close to be Gaussian distributed. If you plot the histrogram of the first column you see it has just a peak in 0.
3 件のコメント
Massimo Zanetti
2017 年 1 月 26 日
編集済み: Massimo Zanetti
2017 年 1 月 26 日
My suspect is that, having such a large number of same data (precisely many 0s) the line cannot be drawn because its angular coefficient is close to infinite (a vertical line cannot be defined as a function).
Inspect this:
x=linspace(0,1);
y=x*inf;
plot(x,y);
It throws no errors, but the line is not plotted.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!