In the first part the codes work perfectly and it calculates all the forces Fp. In the second line the loop won't work, but I do the exact same thing.
Thanks for the help!
close all clear all %% Piston kracht
F1=100 %[N]
hoekF=90slopearm=[0:1:90]alpha=90-hoekF+slopearmr=25x=20hoeksup=asind((3*sind(135-slopearm))/(square((x^2)+(3^2)-2*x*3*cosd(135-slopearm))))beta=90-hoeksupsyms Fpeqn=F1*cosd(alpha)*r==Fp*cosd(beta)*xfor K = 1 : length(eqn) d(K) = double(vpasolve(eqn(K), Fp))endplot(slopearm,d)title('Krachtverloop in bovenste piston') %% Scharnier krachten F2 en F3
syms F2 Xs=F1*sind(alpha)+d*sind(beta)-F2*sind(alpha)==0Ys=F1*cosd(alpha)-d*cosd(beta)-F2*cosd(alpha)==0for A = 1 : length(Xs) k(A) = double(vpasolve(Xs(A), F2))end
Best Answer