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
Tips:
Undefined operator ‘*’ for input arguments of type ‘cell’.
Because x (m) is not a number, but a list, we need to change x to x = [0.5,0.53,0.56,0.6];
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
Tips:
Undefined operator ‘*’ for input arguments of type ‘cell’.
Because x (m) is not a number, but a list, we need to change x to x = [0.5,0.53,0.56,0.6];