MATLAb 提示The expression to the left of the equals sign is no

问题描述:

MATLAb 提示The expression to the left of the equals sign is not a valid target for an assignment.
clear
clear
[NUM,TXT,RAW]=xlsread('D:\123.xls');
n=2
[a,b]=size(RAW)
A(1,:)=RAW(1,:)
for i=1:b
if RAW(1,i)='电压等级' %提示这一行有问题,
for j=1:a
if RAW(j,i)='交流10kV'
n=n+1
end
end
end
end
1个回答 分类:综合 2014-11-03

问题解答:

我来补答
if RAW(1,i)='电压等级' %提示这一行有问题,求解答
你不觉得少了个等号,变成赋值了吗?
if RAW(1,i)=='电压等级' %提示这一行有问题,求解答
再问: ??? Function 'eq' is not defined for values of class 'cell'.
Error in ==> eq at 18
[varargout{1:nargout}] = builtin('eq', varargin{:});
Error in ==> chenyu at 8
if RAW(1,i)=='电压等级'

修改了以后又报这个错误
再答: 这个错误是大小不匹配,RAW(1,i)里不是字符串,你可以把数据出来,我帮你处理
再问: 联系方式。。。
 
 
展开全文阅读
剩余:2000
上一页:一道物理提题