passing output between functions
Afficher commentaires plus anciens
Hi everyone, can anyone help or point me in the right direction.how do i pass the output from one function to another.
thanks
Réponses (2)
Dustin
le 2 Août 2011
Hi Silbelo,
Is there some specific type of functionality you are trying to achieve? If not, then the same format as in many other programming languages should suffice:
output1 = func1(input1);
output2 = func2(output1);
2 commentaires
Silibelo Kamwi
le 2 Août 2011
Dustin
le 6 Août 2011
Can you post a simple example here to clearly demonstrate the problem? Otherwise, in your case, I don't see why output2 = function(function1(input1)) would not work.
Jan
le 2 Août 2011
If I understand the question correctly:
function [A] = func1(B)
A = sin(B);
function [C] = func2(D)
C = func1(B);
Does this help to understand how arguments are forwarded??
2 commentaires
Silibelo Kamwi
le 2 Août 2011
Jan
le 2 Août 2011
What does "the results are not good" mean exactly? Are they correct or do you assume a bug?
Catégories
En savoir plus sur Multicore Processor Targets 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!