In: Electrical Engineering
Need this answered URGENTLY, please.
Animate the arbitrary rotation (attitude change) of a pyramid by MATLAB.
You need to use the DCM kinematic equation (DCM differential equation)
This is the code example given:
figure
x = linspace(0,4*pi,2000);
for k = 1:length(x)
grid on
plot3(0,0,0);
hold on;
axis([0 4*pi -1 1 -1 1]);
view(45,45);
plot3([0 x(k)],[0 sin(x(k))],[0 cos(x(k))]);
hold off;
pause(0.01);
end
YOUR CODE:
OUTPUT OF YOUR CODE:
UPDATED CODE FOR PIRAMID:
OUTPUT FOR UPDATED CODE :
I AM SHOWING SCREEN SHOTS OF OUTPUT VIDEO: