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?
Thanks in advance.
John D'Errico - 17 Jul 2008 12:14 GMT
"ecresna via MathKB.com" <u41514@uwe> wrote in message
<874757abd8eab@uwe>...
> Hi all.
>
[quoted text clipped - 12 lines]
>
> What can I do?
help cell
John
ecresna - 17 Jul 2008 13:16 GMT
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.
Thanks.
Peter Boettcher - 17 Jul 2008 17:35 GMT
> 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
ecresna - 18 Jul 2008 07:43 GMT
>> Fine.
>>
[quoted text clipped - 7 lines]
>
>-Peter
Thank you!!!
I hope I shouldn't modify my mex code and just changing some matlab code I
could get these matrices, but.....
Well, thank you very much!!!