How to get output in a function to be used in another function?

4 Ansichten (letzte 30 Tage)
Isti
Isti am 24 Apr. 2012
From function "A", i've output matrix "Data". Then i want to use "Data" as input for my another function called function "B". what to do?
thanks before :)

Akzeptierte Antwort

TAB
TAB am 24 Apr. 2012
Function A
function Data = A
% Your logic
end
Function B
function B(InputData)
% Your logic
end
Main script or function
% Call function A & collect Data
RecData = A;
% Call function B by passing data as input
B(RecData);

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by