Different values in command window and workspace from excel file
2 次查看(过去 30 天)
显示 更早的评论
Hi everyone.
I am new to this filed and I'm trying to do a rather simple task but with bad result. I would apreciate your expertise on this:
I want to read an xlsx file with matlbab (Experiment.xlsx, please see attached) with
filename = 'Experiment.xlsx';
A = xlsread(filename)
The problem is that, what is shown in Command Window is totally different (and wrong) from what is shown on Workspace (which is exactly what I see in the excel file and it's corect).
Thanks everyone in advance for your time.
4 个评论
Ankit
2019-9-19
this difference is due to the display format. Values are same in workspace as well as in command window.
just try this
format short g
filename = 'Experiment.xlsx';
A = xlsread(filename);
have a look here:
- command https://de.mathworks.com/help/matlab/ref/format.html
- command window preference: https://de.mathworks.com/help/matlab/matlab_env/command-window-preferences.html
workspace and variable preferences: https://de.mathworks.com/help/matlab/matlab_env/set-workspace-and-variable-preferences.html
cheers
Ankit
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!