Next I need to send it to a C mex file but my mex file can just detect the
upper level (if I have a group of 4 512x512xN matrices, my Cmex file just
will detect a 2x2 matrix)
"ecresna via MathKB.com" <u41514@uwe> wrote in message
<874757abd8eab@uwe>...
> Hi all.
>
> It could be possible to fill a 4D matrix with different 3D matrices?????
>
> I'm trying to fill a 4D matrix with some 512x512xN matrices where N can
be 4,
> 8 or 16.
>
> / 512x512x8 512x512x4 \
> | |
> \ 512x512x8 512x512x16 /
>
>
> Next I need to send it to a C mex file but my mex file can just detect the
> upper level (if I have a group of 4 512x512xN matrices, my Cmex file just
> will detect a 2x2 matrix)
>
> What can I do?
help cell
John
Subject: multidimensional matrix with different sizes
My problem is I want to send it to a Cmex program which just can
"read/detect" the first level (2x2 matrix) and I cannot put these all
matrices in a big one (by using cell2mat )because of dimensions.
> Fine.
>
> Thanks John. But I have yet a cell like this:
>
> / 512x512x8 512x512x4 \
>
> | |
> \ 512x512x8 512x512x16 /
>
> My problem is I want to send it to a Cmex program which just can
> "read/detect" the first level (2x2 matrix) and I cannot put these all
> matrices in a big one (by using cell2mat )because of dimensions.
You need to write your MEX code to expect a cell array, and pull out the
pointers to the other matrices underneath. See the MEX documentation
for cell arrays.
-Peter
Subject: multidimensional matrix with different sizes
Peter Boettcher wrote:
>> Fine.
>>
>[quoted text clipped - 8 lines]
>> "read/detect" the first level (2x2 matrix) and I cannot put these all
>> matrices in a big one (by using cell2mat )because of dimensions.
>
>You need to write your MEX code to expect a cell array, and pull out the
>pointers to the other matrices underneath. See the MEX documentation
>for cell arrays.
>
>-Peter
Thank you!!!
I hope I shouldn't modify my mex code and just changing some matlab code I
could get these matrices, but.....
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Disclaimer prior to use.