photo

Erik Sharrer


Last seen: 3 years ago Active since 2020

Followers: 0   Following: 0

Statistics

Feeds

View by

Question


Need help looping an ode45 function
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...

4 years ago | 0 answers | 0

0

answers

Question


How to use ode45 for a row vector
function v = f(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 and clear all ...

4 years ago | 2 answers | 0

2

answers

Question


Not sure how to fix my matrix dimension problem
t=0:0.1:4 m=5; k=1000; zeta=[0, 0.1, 0.25, 0.5, 0.75, 0.9, 1]; xo=0.05; vo=0; w=sqrt(k/m) wd=w*sqrt(1-zeta.^(2)) A=(sqrt...

4 years ago | 2 answers | 0

2

answers