Effacer les filtres
Effacer les filtres

Send variables to workspace from a function

32 vues (au cours des 30 derniers jours)
Diego
Diego le 7 Déc 2012
Dear all,
I'm trying to send some arrays from my function to the workspace.
My function always return the first output argument to the workspace (Z in this case) as ans without showing the remaining variables.
My function is like this:
function [Z,rp,ij]=tryB( X )
...
[r,p] = corrcoef(Z);
rp=[r,p];
[i,j] = find(p<0.05);
ij=[i,j];
...
end
As you can see, I want to load into the workspace a matrix rp and a matrix ij.
How can I accomplish that?
Thanks,
Diego

Réponse acceptée

Walter Roberson
Walter Roberson le 7 Déc 2012
Call the function as
[Z,rp,ij] = tryB(X)

Plus de réponses (1)

Diego
Diego le 7 Déc 2012
Thank you very much Walter!
Kind Regards,
Diego

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by