How to combine two functions into a single expression?
Show older comments
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))
Accepted Answer
More Answers (1)
per isakson
on 22 Aug 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
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!