'load' command - loading and using data from a .MAT file
1 次查看(过去 30 天)
显示 更早的评论
Hi there I would like to load data from a .mat file but retain it's structure. It is a 17x17x17 matrix and at the moment I am simply using the following
load current1.mat
MAT = current1
But there seems to be a problem and I am told there is no such thing as current1 where am I going wrong. Also I need to be careful because some of the commands for loading and using data turn it into a 1x1 array??
I'm quite confused :(
0 个评论
采纳的回答
Azzi Abdelmalek
2013-8-7
编辑:Azzi Abdelmalek
2013-8-7
x=load('current1.mat');
MAT=x.current1
If you want to know the variables names in your file
whos('-file','current1.mat')
5 个评论
Azzi Abdelmalek
2013-8-7
That means, your variable name is current (not current1). Type
x=load('current1.mat');
MAT=x.current
更多回答(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!