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/11/27 05:36:27
matlab提示Theexpressiontotheleftoftheequalssignisnotavalidtargetforanassignmentforidx=1:length(test{3}

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}赋值,所以报错了.