I am trying to set time increment n such that it always corresponds to a 2 degree increment in TH2 based on current omega2. However, I do not believe my loop is set up to evaluate at a 2 degree increment. I do not know what steps to take to make my code run properly.
w2=2*pi;TH2=0;t=2a2=0.5*t;L2=50;L3=150;for n=1:2:length(w2)TH3(n)=acosd((L2*cosd(TH2))/L3)d(n)=((L2*sind(TH2(n)))-(L3*sind(TH3(n))))w3(n)=(L2*w2*sind(TH2(n)))/L3*sind(TH3(n))d2(n)=(L2*w2*cosd(TH2(n)))-L3*w3*cosd(TH3(n))a3(n)=((-L3*w3^2*cosd(TH3(n)))+(L2*a2*sind(TH2(n))))+(L2*w2^2*cosd(TH2(n)))/L3*sind(TH3(n))d3(n)=(L2*a2*cosd(TH2(n)))-(L2*w2^2*sind(TH2(n)))-(L3*a3*cosd(TH3(n)))+(L3*w3^2*sind(TH3(n)))end
Best Answer