How to use multiple outputs from function
Afficher commentaires plus anciens
function[x,y]=rowcolum(a,b)
x=max(sum(a,2));
y=min(sum(b,1));
end
how to write a code that will sum x+y in main script?
Réponse acceptée
Plus de réponses (1)
I assume you want to do the summation outside the workspace, for some reason . If so, then,
outputsRequested=2;
[c{1:outputsRequested}]=rowcolumn(a,b);
result = sum([c{:}])
Catégories
En savoir plus sur Cell Arrays 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!