運行程序時出現以下錯誤。struct2table命令出錯
??? Undefined function or method 'struct2table' for input arguments of type 'struct'.
Error in ==> cellarray at 13
T=struct2table(parameter,'AsArray',true);
該計劃是爲下
a=10;
b=15;
parameter(a).alpha_star=0;
parameter(b).gamma_star=0;
x=5;
for j=1:b
for i=1:a
parameter(i).alpha_star=x+i;
end
parameter(j).gamma_star = x^2+j;
end
T=struct2table(parameter,'AsArray',true);
能否請你告訴我,我在哪裏錯了?
輸入'which struct2table'。我猜你沒有找到'struct2table',這意味着你有一個版本的MATLAB pre-R2013b。 – chappjc