kam*_*aci 1 variables matlab file
我在Matlab有一个变量它是:
<2196x1 cell>
Run Code Online (Sandbox Code Playgroud)
我把它保存为:
save('var.mat','var');
Run Code Online (Sandbox Code Playgroud)
我用load读取它,但我的变量是:
<1x1 struct>
Run Code Online (Sandbox Code Playgroud)
如何再次从文件中将其作为单元格向量读取?
我想如果你使用
x = load('var.mat')
Run Code Online (Sandbox Code Playgroud)
最终得到一个1x1结构,其中x.var是原始的已保存变量.要保存原始变量,请尝试使用
load('var.mat'); %No output argument
Run Code Online (Sandbox Code Playgroud)
这会将原始变量放回工作区.
此行为允许您加载具有相同名称的多个变量(例如x.var和y.var),如果需要的话.