필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Need help looping an ode45 function

조회 수: 1 (최근 30일)
Erik Sharrer
Erik Sharrer 2020년 3월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
clear all
xo=[0.05; 0];
ts=[0 3];
[t,x]=ode45(@myfun,ts,xo);
figure(1)
plot(t,x(:,1))
function v = myfun(t,x);
zeta=0.9;
m=5; k=1000;
c=2.*zeta.*sqrt(m*k);
v=[x(2); x(1).*-k/m+x(2).*-c./m];
end
This is what I have so far. How would I be able to have multiple zeta values (below) loop through the ode45?
zeta=[0, 0.1, 0.25, 0.5, 0.75, 0.9, 1];
  댓글 수: 2
Steven Lord
Steven Lord 2020년 3월 29일
Please don't start a new question when you've already received some assistance in your original question.
Erik Sharrer
Erik Sharrer 2020년 3월 29일
sorry

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by