Why am I getting this error? Local function name must be different from the script name.

232 vues (au cours des 30 derniers jours)
function dh_s = project(t,hs)
nd = 1000; % No. of Droplets
Vol = 900; % Liquid volume of emulsion (ml)
l = 0.5; % Mean Distance between droplets
alpha = 0.08; % Empirical Collision Effiency Parameter
D0 = 300; % Initial Droplet Diameter (microns)
Pr = 0.74; % Volume Fraction
Pr0 = ((nd*pi*D0^3)/6)/Vol; % Initial Volume Fraction of droplet
Prm = ((nd*pi*((D0+l)^3))/6)/Vol; % Maximum Volume Fraction of droplet
delrho = rho_B1 - rho_O1; % difference between the dispersed water and continuous oil phase
Vsto = (delrho*g*(D0^2))/18*mu1; % Settling Velocity of Hard Spheres (stoke's velocity)
fPr = (1-Pr0)^5.3; % Dimensionless
%D = sqrt((2/3)*alpha*((Vsto*fPr)/(((Prm/Pr0)^1/3)-1))*(D0*t)+(D0^2)); % evolution of average diameter versus time
K1 = ((2/3)*alpha*((Vsto^2)/D0))*((fPr^2)/((Prm/Pr)^1/3)-1);
dh_s = -K1*t-(Vsto*fPr);
end
  1 commentaire
Matthew Charles
Matthew Charles le 6 Mar 2022
I created a live function with the code seen here but I am given this response from matlab. So I am not sure what is happening

Connectez-vous pour commenter.

Réponse acceptée

Abolfazl Chaman Motlagh
Abolfazl Chaman Motlagh le 6 Mar 2022
Name of your live script is project.mlx and name of your local function within it is also project which leads to error. try different name for function.

Plus de réponses (0)

Catégories

En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by