'problemset4pt1' requires more input arguments to run
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Not sure how to fix. Here is the code:
function f_x = problemset4pt1(porosity)
% Constants
deltaP = 810.5; %dyn/cm^2
l = 20; %cm
mu = 0.01; %Poise
rho = 1; %gm/cm^3
dp = 0.1; %cm
u = 0.75; %cm/s
%Evaluating function
f_x = 150*mu*u/(dp^2)*((1-porosity)^2)/(porosity^3) + 1.75*rho*(u^2)/dp*(1-porosity)/(porosity^3) - deltaP/l;
end
0 comentarios
Respuestas (1)
Les Beckham
el 27 de Oct. de 2023
How are you calling the function? You can't just press the green Run triangle in the editor for a function that requires input arguments. Go to the command window and call the function with an appropriate value for the porosity input argument.
It seems to work fine here (at least it runs and returns a result).
result = problemset4pt1(0.1)
function f_x = problemset4pt1(porosity)
% Constants
deltaP = 810.5; %dyn/cm^2
l = 20; %cm
mu = 0.01; %Poise
rho = 1; %gm/cm^3
dp = 0.1; %cm
u = 0.75; %cm/s
%Evaluating function
f_x = 150*mu*u/(dp^2)*((1-porosity)^2)/(porosity^3) + 1.75*rho*(u^2)/dp*(1-porosity)/(porosity^3) - deltaP/l;
end
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!