필터 지우기
필터 지우기

I'd like to draw a graph of mechanical vibration with a matlap....

조회 수: 3 (최근 30일)
Hac Li
Hac Li 2023년 11월 17일
답변: Sam Chak 2023년 11월 18일
  댓글 수: 2
Dyuman Joshi
Dyuman Joshi 2023년 11월 17일
The question says "All of your codes constructed by your own algorithm".
So, what have you tried yet?
John D'Errico
John D'Errico 2023년 11월 18일
Homework is assigned to you, so that you will learn by doing. If you do nothing, then why should we do your work and thinking for you?

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

채택된 답변

Sam Chak
Sam Chak 2023년 11월 18일
Your teacher won't approve this code as it utilizes the MATLAB built-in ODE solver. However, you can compare the results with your own algorithm. By 'own algorithm,' I mean that you may need to devise a new solver algorithm. You can take inspiration from Dr. Alan C. Hindmarsh, who developed several ODE packages. He is the creator of the Livermore Solver for Ordinary Differential Equations, known as LSODE().
% MATLAB built-in ODE solver
F = ode;
F.Parameters = 10;
F.InitialValue = [1; 0];
F.ODEFcn = @(t, y, p) [ y(2);
- 0.5*y(2) - 200*y(1) + 1*cos(2*pi/p*t)];
F.Solver = "ode78";
S = solve(F, 0, 30);
% Plotting the graph
plot(S.Time, S.Solution(1,:)), grid on
xlabel('Time')

추가 답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 11월 17일
An initial step will be looking at the Runge-Kutta method Runge-Kutta and its implementation in MATLAB - writing a code like THIS ONE.

카테고리

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

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by