help-octave
[Top][All Lists]
Advanced

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

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


From: A. Scottedward Hodel
Subject: Re: .oct file return a cell array, I want a regular array. Why?
Date: Wed, 7 Jun 2006 16:44:35 -0500

This question is tough to answer without the source code.

On Jun 5, 2006, at 11:20 AM, David Grohmann wrote:

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

_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave



reply via email to

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