How can I make a graphical integration?

6 ビュー (過去 30 日間)
Karel Horký ml
Karel Horký ml 2019 年 4 月 24 日
コメント済み: madhan ravi 2019 年 4 月 26 日
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')

採用された回答

darova
darova 2019 年 4 月 24 日
What do you mean by "integration around value M = 47535". There several intersections:
img.png
a1 = linspace(min(A),max(A),100); % mesh for angle
m1 = spline(A,M,a1); % moment values
plot(a1,cumtrapz(a1,m1))
img1.png
  7 件のコメント
darova
darova 2019 年 4 月 25 日
the moment at the end is with "+" sign. How the work can fall down?
Im going for Most Valuable Person
can you accept the question please?
madhan ravi
madhan ravi 2019 年 4 月 26 日
+1

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDirected Graphs についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by