问题描述:
【matlab】Error: The expression to the left of the equals sign is not a valid target for an
matlab 中我编辑的语句后出现了这个提示,请打手帮忙分析下Error: The expression to the left of the equals sign is not a valid target for an
assignment.
>> for n=1:10
for m=1:2^(n-1)
for p=1:2^(n-2)
a=zeros(n,m); if m=2p-1 a(n,m)=a(n-1,(m+1)/2)+(4/9)^n;else;a(n,m)=a(n,m-1)+4^(n-2)/9^(n-1);
end
end
end
end
b=sort(a);
matlab 中我编辑的语句后出现了这个提示,请打手帮忙分析下Error: The expression to the left of the equals sign is not a valid target for an
assignment.
>> for n=1:10
for m=1:2^(n-1)
for p=1:2^(n-2)
a=zeros(n,m); if m=2p-1 a(n,m)=a(n-1,(m+1)/2)+(4/9)^n;else;a(n,m)=a(n,m-1)+4^(n-2)/9^(n-1);
end
end
end
end
b=sort(a);
问题解答:
我来补答展开全文阅读