returning an array argument
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
I am returning a double array, inst_array, from a function:
function [inst_array, pass ] = ....
In the called function, the return argument looks correct, I explicitly assign it.
But If I stop the debugger just after returning, the returning variable holds the incorrect double values. It is dimensioned correctly, and some values are incorrect.
1 commentaire
the cyclist
le 16 Fév 2012
Are you able to distill this into a small problem that you can post here? You're not really giving us much to go on. :-)
Réponses (1)
John Lofgren
le 16 Fév 2012
0 votes
2 commentaires
Walter Roberson
le 16 Fév 2012
Absolutely definitely Yes.
function foo = bar()
foo = magic(5);
end
James Tursa
le 16 Fév 2012
Yes. MATLAB can return any variable, including an array.
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!