作业帮 > 英语 > 作业

MATLAB调试出现The expression to the left of the equals sign is n

来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:英语作业 时间:2024/05/14 09:04:16
MATLAB调试出现The expression to the left of the equals sign is not a valid target for an assignment
clc;clear;
s=[3 2 3 1 4 2;
2 3 4 5 2 1;
2 3 4 2 1 3;
1 2 3 4 3 1;
2 4 3 2 1 3];
num2=0;
j=1;
ss=s(:,j)
if ss(1)=2
num2=num2+1;
end
num2
把第一列的1 2 3 4都数出来
MATLAB调试出现The expression to the left of the equals sign is n
if ss(1)=2 这一句改成 if ss(1)==2
不知道你这个是实现什么功能 如果是找出第一列有几个2的话 还得加个循环
你先这么看看吧