Ode23 error using odearguments
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello,
I am trying to run a code found on web (linked below) and I am encountering a problem with ODE23 function:
Code:
%% Numerical Solution for 2 Element WM
t=(n-1)*Tc :.01: n*Tc ;
I = @ ( t ) I0* sine ( t-(n-1)*Tc ) .* ( t <= (( n-1)*Tc+Ts )) ;
Y2= @ ( t , y2 ) (-y2 / ( R*C )+I ( t ) /C ) ;
[t_m2 , P_m2 ] = ode23 (Y2, [(n-1)*Tc; n*Tc], P_ss2 ) ;
P_ss2=P_m2 ( end ) ;
subplot (4,1,3)
hold on
plot ( t_m2 , P_m2)
ylim ([ 0 150])
xlim ([0 cycle *Tc ] )
title ( ' Aortic Blood Pressure ( Numerical Analysis 2 Element WM) ' )
ylabel ( ' Pressure (mmHg) ' )
xlabel ( ' time ( s ) ' )
Errors:
Error using odearguments
Inputs must be floats, namely single or double.
Error in ode23 (line 106)
odearguments(odeIsFuncHandle, odeTreatAsMFile, solver_name, ode, tspan, y0, options, varargin);
Error in prject1 (line 68)
[t_m2 , P_m2 ] = ode23 (Y2, [(n-1)*Tc; n*Tc], P_ss2 ) ;
Thank you for all help in advence
Used code does not belong to me, I found it here: https://isn.ucsd.edu/courses/beng221/problems/2012/BENG221_Project%20-%20Catanho%20Sinha%20Vijayan.pdf
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!