Now , i simulate Rayleigh-Plesset Equation and i did the Function which is
function f = RP(t,y)
p_ref = 1e5;
rho = 1e3;
g = 1;
R0=0.0005;
f= [y(2);( pulse(t) - p_ref + p_ref*(R0./y(1))^(3*g) )/(rho*y(1))-(1.5*y(2)^2/(y(1)))];
return;
and this is the Pulse code
function z=pulse(t)
global A w t0 sigma env
z = A*sin(w*t);
return
and this is the Solution
[T,R] = ode15s('RP',[0 3e-8],[1e-6 70]);
plot(T,R(:,1)),xlabel('time'),ylabel('Radius')
no i have this problem
??? Error using ==> odearguments at 103
RP returns a vector of length 1, but the length of initial conditions vector is 2. The
vector returned by RP and the initial conditions vector must have the same number of
elements.
Error in ==> ode15s at 227
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ==> solv at 6
[T,R] = ode15s('RP',[0 3e-1],[1e-6 70]);
what can i do ? i need a help i got the Signal simulation before but i did dome change , now i cant return
0 Comments
Sign in to comment.