How to combine two functions into a single expression?
Mostrar comentarios más antiguos
There are two functions: function xa, function a. The output of function xa is the input to function a. How do I combine the two functions so that I don't have to enter in two separate functions?
function xa= ZvalueXA(FPave, Vavenew, Vstdnew, N)
xa=(FPave-Vavenew)/((Vstdnew)/(N.^0.5));
% function xa is the output and then is imputed into function a
% FPave, Vavenew, Vstdnew, N are imputed (experimental)values from the normal distribution plots at a certain temperature.
% FPave is the Flag Point Ave. Vavenew is the SOL Average V
% Vstdnew is the Standard Deviation of the Average V and N is the
% number of C
function a= ProbabilityPXnew(xa)
a= 1-0.5*erfc(-(xa)/sqrt(2));
% function a calculates the standard normal distribution plot using the calculate Zvalue.
... a(f(xa))
Respuesta aceptada
Más respuestas (1)
per isakson
el 22 de Ag. de 2012
Passing input arguments:
>> a = ProbabilityPXnew( FPave, Vavenew, Vstdnew, N );
where
function a = ProbabilityPXnew( varargin )
xa = ZvalueXA( varargin{:} );
your_code
end
function xa = ZvalueXA( FPave, Vavenew, Vstdnew, N )
more_code
end
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!