I am running a simple step response function at certain points using 2 for loops. i am only getting 12 data points and i need much more for a smooth graph. Ive tried changing to increments of .1 but i can't index those values. Code:
k=1;for ksi=[0.2,0.3,0.4,0.5,0.7,0.9]; theta = acos(ksi); beta = sqrt(1-ksi^2); for wnt = (0:12) y = (k-(k/beta)*(exp(-ksi*wnt))*sin(beta*wnt+theta)) y1(wnt+1)=y; wnt1(wnt+1)=wnt; end plot(wnt1,y1)
thank you in advance.
Best Answer