returning an array argument
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
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
the cyclist
2012년 2월 16일
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. :-)
답변 (1개)
John Lofgren
2012년 2월 16일
0 개 추천
댓글 수: 2
Walter Roberson
2012년 2월 16일
Absolutely definitely Yes.
function foo = bar()
foo = magic(5);
end
James Tursa
2012년 2월 16일
Yes. MATLAB can return any variable, including an array.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!