필터 지우기
필터 지우기

Integration using Cumtrapz backwards instead of forwards

조회 수: 10 (최근 30일)
Ramses Young
Ramses Young 2021년 11월 19일
댓글: Ramses Young 2021년 11월 20일
Hey all, I am trying to create a program that will take distributed point loads from lift generated by a wing and create moment and shear diagrams using numerical integration through cumtrapz
The way I am doing this is by integrating the points and locations which gets me a shear force, but because cumtrapz integrates numerically forward, it technically creates the right graph but backwards from a conventional beam analysis, which creates cuts. Is it possible to make Cumtrapz work backwards? I have attached images of what I want vs what I get for an example
Desired Shear diagram
Obtained Shear Diagram
The obvious solution is just to subtract the maximum value from the graph but this does not encapsulate the essence of what's going on, and also creates a further problem in the bending moment diagram.
Here's the code
L_dist =[10 9 8 7 6 5 4 3 2 1 0];
locations=[0 1 2 3 4 5 6 7 8 9 10];
shear.z = cumtrapz(locations,(L_dist));
figure('Name','shear - z','NumberTitle','off');
plot(locations, shear.z);

채택된 답변

Sean de Wolski
Sean de Wolski 2021년 11월 19일
Easy solution is to just flip everything
L_dist =[10 9 8 7 6 5 4 3 2 1 0];
locations=[0 1 2 3 4 5 6 7 8 9 10];
shear.z = flip(cumtrapz(flip(locations),flip(L_dist)));
figure('Name','shear - z','NumberTitle','off');
plot(locations, shear.z);
  댓글 수: 1
Ramses Young
Ramses Young 2021년 11월 20일
I cant believe I didn't think of this, but you sir are a legend, I really appreciate it.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Directed Graphs에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by