how to use the output of a user defined function as the input of another user defined function?
Afficher commentaires plus anciens
how to use the output of a user defined function as the input of another user defined function?
Réponse acceptée
Plus de réponses (1)
num = 1:10;
[S] = Addition(num)
[M] = multiply(S) % pass output of function 1 as input to function 2
% function 1
function [S] = Addition(num)
S = sum(num);
end
% function 2
function [M] = multiply(S)
M = S*5;
end
1 commentaire
Suresh R
le 11 Nov 2021
Catégories
En savoir plus sur Entering Commands 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!