matlab提示 The expression to the left of the equals sign is not a valid target for an assignmentfor idx = 1:length(test{3})eval([ test{1}{idx},' = ',num2str(test{3}(idx)),';']);end是哪儿不对呢

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 00:17:55
matlab提示 The expression to the left of the equals sign is not a valid target for an assignmentfor idx = 1:length(test{3})eval([ test{1}{idx},' = ',num2str(test{3}(idx)),';']);end是哪儿不对呢

matlab提示 The expression to the left of the equals sign is not a valid target for an assignmentfor idx = 1:length(test{3})eval([ test{1}{idx},' = ',num2str(test{3}(idx)),';']);end是哪儿不对呢
matlab提示 The expression to the left of the equals sign is not a valid target for an assignment
for idx = 1:length(test{3})
eval([ test{1}{idx},' = ',num2str(test{3}(idx)),';']);
end
是哪儿不对呢

matlab提示 The expression to the left of the equals sign is not a valid target for an assignmentfor idx = 1:length(test{3})eval([ test{1}{idx},' = ',num2str(test{3}(idx)),';']);end是哪儿不对呢
一个等号表示赋值,两个等号才表示判断是否相等.你这里相当于向test{1}{idx}赋值,所以报错了.