stick slip code for matlab
이전 댓글 표시
Problem plotting stick slip graph with this code, where am I going wrong?
[t,y] = ode45(@Stick_Slip,[0:0.01:10],[0.01; 0]);
figure
plot( y(:,1),y(:,2) )
xlabel( 'Position' )
ylabel( 'Velocity' )
title('Stick-Slip');
function dy = Stick_Slip(t,y)
m = 1;
k = 100;
V = 0.5;
Mu=0.5;
c = 2;
f = c*y(2) + k*y(1);
if f <= Mu*m*9.81
dy(1,1) = V;
dy(2,1) = 0;
else
dy(1,1) = y(2);
dy(2,1) = (f - k*y(1) - c*y(2)) / m;
end
end
댓글 수: 3
John D'Errico
2020년 3월 4일
And your question is what? The mind reading toolbox is fuzzy today,so we need for you to tell us what is on your mind.
Milind Khanna
2020년 3월 4일
venkatesu u
2023년 6월 12일
이동: DGM
2023년 6월 12일
Show me the Stick_Slip function
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!