Hi I'm a beginner to matlab and simulink and have been thrown at the deep end with this project and I am really struggling with the last part, Ive been trying to model a 1/4 car suspension going over a speedbump using matlab and simulink, the matlab

조회 수: 4 (최근 30일)
Hi I'm a beginner to matlab and simulink and have been thrown at the deep end with this project and I am really struggling with the last part.
I've been trying to model a 1/4 car suspension going over a speedbump using matlab and simulink, the matlab code creates the speed bump profile which I believe is correct and the simulink is supposed to model the 1/4 car suspension but the scope is not producing the correct kind of graph like in this project http://www.engin.swarthmore.edu/~dluong1/e12/Lab4/main.htm (look under 'model A standard bump' to see what I mean).
could you help me fix this problem.
this is the simulink mode
graph.png
this the code
function [road] = make_road(h, l, v)
dt= (l/v);
time = linspace(0,dt);
time = time' ;
rh = (h/2)*(1 - cos(2* pi * time / dt));
plot(time,rh);
xlabel('Time (s)')
ylabel('Displacement of Road')
title(strcat('Speed Bump (', num2str(h),' (m) (', num2str(l),' (m) (', num2str(v), '(m/s))'));
[road] = [ time rh ];
end

답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by