help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

.oct file return a cell array, I want a regular array. Why?


From: David Grohmann
Subject: .oct file return a cell array, I want a regular array. Why?
Date: Mon, 05 Jun 2006 11:20:21 -0500
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

am attempting to write a .oct file that implements repmat in much faster c++ code. I have done this, but my oct file is returning a cell array instead of a normal multi dimensional array. I treat the source array as an ComplexNDArray and the result is an ComplexNDArray. But when it is returned to octave I get a cell array. my return statement is return octave_value(retval); where retval is an ComplexNDArray
Any ideas? Thank you for any help you can provide.

octave:1> a = round(rand(3,3,3)*4) a =
ans(:,:,1) =
 1  2  3
 1  2  3
 2  1  4

ans(:,:,2) =
 3  1  1
 2  3  2
 0  0  1

ans(:,:,3) =
 3  1  4
 0  2  2
 0  2  2

octave:2> repmat(a,[1,2,3]) <<<<==== replaced repmat.m with my repmat.oct
ans = {3x6x9 Cell Array}


this should have produced a 3x6x9 non-cell array

--
David Grohmann
Senior Student Associate
Applied Research Lab : UT Austin : ESL - S206
Office: 512-835-3237
Cell: 210-861-6882



reply via email to

[Prev in Thread] Current Thread [Next in Thread]