How can I make a graphical integration?
Show older comments
Hi guys I need help with graphical integration.
I have got data:
M = [82704 -107654 -151679 -36317 65017 149325 155528 26497 -47232 -30685 15002 88192 194927 226705 82704];
Angle = [0 15 30 60 90 120 150 180 210 240 270 300 330 345 360];
where M is moment of force [Nm] and Angle is angle of rotation [deg]
and I need to get graph of integration around value M=47535 Nm.
I have already solved numerical integration, but it is not enough for me. I need to get a graph of work [J] on y-axis and angle [deg] on x-axis with smooth curve.
I have tried to use cumtrapz but with nonsencial results.
Is here anybody who is able to help me?
Btw sorry for mistakes in English, not native.
I have already made this, but it is not working good...
M = [82704 -107654 -151679 -36317 65017 149325 155528 26497 -47232 -30685 15002 88192 194927 226705 82704];
Angle = [0 15 30 60 90 120 150 180 210 240 270 300 330 345 360];
figure
plot(Angle,M,'-*')
grid on
title('Moment')
xlabel('Angle[deg]')
ylabel('Moment[Nm]')
cmoment = cumtrapz(M);
M = table (Angle',cmoment','VariableNames',{'Angle','Work'})
plot(cmoment)
title('Work')
Accepted Answer
More Answers (0)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
