Not enough input arguments despite all arguments available
Mostrar comentarios más antiguos
I have written a script which will call some functions. The parameters for the handover are given as struct. Up until this morning the script was running smoothly but after I added a section afterwards (Which shouldn't affect the previous functions). Now one of my functions (aftersection) doesn't work properly and running the script gives the error: "Not enough input arguments". In the workspace all structs for handover are available as needed by the function and feature the needed fields. How can I resolve this error?
That is the call of the function in the script:
aftersection(boundary_2, components.V,stator_con,afterstator)
And this is the function called:
function [aftersection] = aftersection(boundary_2, V_2components,stator_con,afterstator)
%Calculating the conditions after the section between stator and rotor
%Definition of Parameters
cax_s=boundary_2.cax_s;
r_1t= boundary_2.r_1t;
epsilons=boundary_2.epsilon_s;
epsilonsr=boundary_2.epsilon_sr;
r_1h=boundary_2.r_1h;
V_2x=V_2components.V_2x;
V_2u=V_2components.V_2u;
A_2=stator_con.A_2;
T_2=afterstator.T_2;
%Length of the section might be changed accordingto needs
xsr=0.2*cax_s;
%Area at the end of the section
A_21=pi*(((r_1t+cax_s*tand(epsilons)+xsr*tand(epsilonsr)))^2-(r_1h-cax_s*tand(epsilons)-xsr*tand(epsilonsr))^2);
%Axial Velocity at the end of the section
V_21x=V_2x*A_2/A_21;
%Angle at the exit
alpha_21=atand(V_2u/V_21x);
%Temperature at the exit
T_21=T_2;
aftersection.A_21=A_21;
aftersection.V_21x=V_21x;
aftersection.V_21u=V_2u;
aftersection.alpha_21=alpha_21;
aftersection.T_21=T_21;
aftersection.x_sr=xsr;
end
The relevant elements of the structs are given as follows:
boundary_2.cax_s=c0.023;
boundary_2.r_1t= 0.068;
boundary_2.epsilons=15;
boundary_2.epsilonsr=15;
boundary_2.r_1h=0.0565;
V_2components.V_2x=405.0125;
V_2components.V_2u=346.2914;
stator_con.A_2=0.0093;
afterstator.T_2=2.0237e+03;
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Structures en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!