MATLAB: I got an error when i run this code

structures

x=(1:100); for k=1:5 y(:,k)=k*log(x); end plot(x,y)
the error is in the third line? i want to make a single plot for different values of k

Best Answer

k = 1:5;
x = 1:100;
y = k'*log(x);
plot(x,y);