matlab提示Undefined operator '*' for input arguments of type 'cell'.

xiaoxiao2021-02-27  238



x={0.5,0.53,0.56,0.6}; N=length(x);  for m=1:N     S=2*cos(2*pi*x(m)*u)+S;   end 

提示:

Undefined operator '*' for input arguments of type 'cell'.

是因为x(m)不是一个数,而是一个列表,需将x改为x=[0.5,0.53,0.56,0.6];

转载请注明原文地址: https://www.6miu.com/read-11376.html

最新回复(0)