How to use multiple outputs from function
Mostra commenti meno recenti
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?
Risposta accettata
Più risposte (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{:}])
Categorie
Scopri di più su Cell Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!