Can you help me to change a math solution to MATLAB codes?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
SeungHyun Cha
il 14 Giu 2021
Risposto: Krishna Sutar
il 14 Giu 2021
This is a math solution, but I do not know how to change it to MATLAB code.
I would like you to help me.
Thanks.
0 Commenti
Risposta accettata
Krishna Sutar
il 14 Giu 2021
From my understanding you want to convert the mathematical equations provided in the picture into MATLAB code. Here is the code which might help you:
ra=[0 0.3 0.12]
rb=[0 0.35 0.15]
omega=[0 1.5 2.6]
ab=[0 -2.73 1.575]
%omega x (omega x ra)
omegaCrossra = cross(omega,cross(omega,ra))
%2*omega x Vrel
vrel=cross([0 8 0],[0 0.3 0.12])
twoTimesOmegaCrossVrel = cross(2*omega,vrel)
%p x (p x ra)
p=[0 8 0]
arel = cross(p,cross(p,ra))
x=norm(p)
aa=ab+omegaCrossra+twoTimesOmegaCrossVrel+arel
%Magnitude of aA
magnitudeaa=norm(aa)
%angular acceleration
alpha=cross(omega,[0 9.5 2.6])
Please refer to cross product for more information on cross products of vectors and norm documentation for calculation of magnitude of the vector.
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!