Hi. Anyone know why this gives an error? I'm using MATLAB R2017b
A = [];
A.days ={'Monday','Tuesday'};
A.debt = randn(5);
if strcmp(class(A),'struct') && isscalar(A)
save('A.mat','-struct',A)
end
Error using save
The argument to -STRUCT must be the name of a scalar structure variable.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Structures 的更多信息

产品

版本

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by