- The code below calculates F5,F6 anf Fp2 per angle of zeta for all possible angles of alpha.
- I was able to make 2d plots, but I would like a plot that has alpha zeta and F5 on it. The problem is that per zeta there are 90 alpha's so I don't know if it's possible.
Plot a graph of a force in relation to two independent angles
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to plot a graph of the calculated forces in relation to the two independent angles alpha (angle upper arm) and zeta (angle bottom arm).
The code below calculates F5,F6 anf Fp2 per angle of zeta for all possible angles of alpha.
I was able to make 2d plots, but I would like a plot that has alpha zeta and F5 on it. The problem is that per zeta there are 90 alpha's so I don't know if it's possible.
Thanks in advance!!

%% Middenstuk
pis=3
alpha=[1:1:90]
x=20
kak=6
[hoeksup]=zeros(1,90)
for i=1:90
hoeksup(i)=asind((kak*sind(135-alpha(i)))/(sqrt((x^2)+(kak^2)-(2*x*kak*cosd(135-alpha(i))))))
end
Z=(kak*cosd(45))/2
Y=Z*2
beta=alpha-hoeksup
aap=90-alpha
zeta=[1:1:90]
[hoeksup2]=zeros(1,90)
e_array = {};
for i=1:90
hoeksup2(i)=asind((kak*sind(135-zeta(i)))/(sqrt((x^2)+(kak^2)-(2*x*kak*cosd(135-zeta(i))))))
end
Z=(kak*cosd(45))/2
Y=Z*2
gamma=zeta-hoeksup2
for i=1:90
syms F5 F6 Fp2
eqn6=(d.*cosd(alpha))-([q.Fp].*cosd(beta))+(p.*cosd(alpha))+(F5*cosd(zeta(i)))-(Fp2*cosd(gamma(i)))+(F6*cosd(zeta(i)))==0
eqn7=0==-(d.*sind(alpha))+([q.Fp].*sind(beta))-p.*sind(alpha)+F5.*sind(zeta(i))-Fp2.*sind(gamma(i))+F6.*sind(zeta(i))
eqn8=0==-d.*cosd(alpha)*(Y+pis)+d.*sind(alpha)*(Y)+[q.Fp].*cosd(beta)*(2*Y+pis)-p.*cosd(alpha)*(2*Y+pis)-F5.*sind(zeta(i))*Y-F5.*cosd(zeta(i))*Y
for K = 1 : length(eqn6)
e(K) = (vpasolve([eqn6(K),eqn7(K),eqn8(K)], [F5,F6,Fp2]))
end
e_array{i} = e; % <--- store them for later use
figure(4);
plot(zeta,[e.F5],'r')
hold on
plot(zeta,[e.F6],'b')
hold on
plot(zeta,[e.Fp2],'g')
hold on
title('Krachtverloop in middenstuk')
xlabel('Hoek onderarm [°]')
ylabel('Krachten op arm [N]')
legend('F5 = Kracht in scharnier 5','F6 = krachten in scharnier 6','Fp2 = krachten in piston 2')
end
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

