I've been trying to set a matrix equal to the results of two functions over a range, but am not having any luck. Can someone proofread for me? x1 = [1:0.01:3]; %set x to a variable from 1 to 3
b1=zeros(1,201); y1=zeros(1,201); for x2=1:201; x3=x1(x2); b1(x2)=sin(x3)+1; y1(x2)=x3+exp(-x3/2); end
MATLAB: Plotting a function over time using a for loop
for loop
Best Answer