Why am I getting different matrices in workspace and command window?
7 次查看(过去 30 天)
显示 更早的评论
I am working on a piece of code and I am getting right values in the workspace but not in command window. Why is it happening? Is it any bug in MatLAB?
Thanks,
Rakesh
2 个评论
Stephen23
2019-10-1
Rakesh Belchandan's "Answer" moved here:
Please see the output from workspace and command window
回答(2 个)
Andreas
2019-10-1
I can't see any difference.
Have you already seen the common factor of 1.0 e3 at the top of your command window output?
1 个评论
Steven Lord
2019-10-1
I agree with Andreas's assessment. This looks like a display formatting difference, not a difference in the actual values. You can use the format function to change how the matrix is displayed in the Command Window (this has no effect on how the matrix is stored in memory only on how it is displayed) or the options on the View tab in the Toolstrip when the Variable Editor is open and active to change how the matrix is displayed in the Variable Editor, depending on which view you prefer.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!