How to combine two functions into a single expression?
Afficher commentaires plus anciens
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))
Réponse acceptée
Plus de réponses (1)
per isakson
le 22 Août 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
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!