필터 지우기
필터 지우기

I have plotted a velocity vs time graph for a car that uses a ramp input (with slope 5) as throttle input. Is there a way to calculate the slope (acceleration) from the plot in the simulink environment itself?

조회 수: 3 (최근 30일)
The slope of the velocity line needs to be used elsewhere in simulink when I use different slopes for the ramp input of throttle. Hence, your solution would help me use the slope data (acceleration) in my controller.
I have attached a matlab figure for reference.
Thank you in advance.

답변 (1개)

Moby Philip
Moby Philip 2019년 1월 13일
편집: Moby Philip 2019년 1월 13일
Hello Vishal,
First your image is showing error. If you want to find the slope of a curve, it can be found with the helpof desired points using the diff function or gradient method. Assume if you want to find slope of two points at A and B then slope at that instant is given as:
slope=diff(B)./diff(A).
Regards

카테고리

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

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by