How to combine two functions into a single expression?
이전 댓글 표시
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))
채택된 답변
추가 답변 (1개)
per isakson
2012년 8월 22일
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
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!