Error using odearguments (line 93) BANANA must return a column vector.
Afficher commentaires plus anciens
I have tried R1 = zeros(size(R1)) and R1 = zeros(R1), but it wont work. I am lost on why I keep getting Error using odearguments (line 93) BANANA must return a column vector. Thank you so much for the help!
Here is my function
function dtdz = banana(z,t)
%given conditions:
n = 1.23;
zi = 145*(10^-3);
z0 = 8.45;
u0 = 23*pi;
B0 = 0.0054;
h = 0.00734;
g = 10;
xs = 0;
xm = 0.00004386;
ps = 1937;
pm = 1.0995e+03;
c = 0.375;
T = 36;
%assume:
R1 = [10:400];
R = R1.*10^-6;
%initial conditions:
alpha = (8/9).*(((xs-xm).*B0.*R.^2)./(u0.*h.^2.*n));
beta = ((2.*R.^2)./(9.*n)).*(((ps-pm).*g-(2/h).*(((xs-xm).*B0.^2)/u0)));
dtdz = (1./(alpha.*z+beta));
end
Here is my script
t_zi = 0;
zspan = [1*(10^-3) 0.0205];
[z,t] = ode45(@banana, zspan, t_zi);
plot(z,t);
hold off
title('Radius of banana vs Time')
xlabel('Radius of banana (µm)')
ylabel('t0 (min)')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Physics dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!