<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264949</link>
    <title>MATLAB Central Newsreader - 3D array to struct?</title>
    <description>Feed for thread: 3D array to struct?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 04 Nov 2009 10:24:02 -0500</pubDate>
      <title>3D array to struct?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264949#691985</link>
      <author>Volker Klink</author>
      <description>Hi! This is probably very simple but  I#M stuck with it.&lt;br&gt;
&lt;br&gt;
I would like to transform a m-by-n-by-x array into a struct.&lt;br&gt;
&lt;br&gt;
Length of the struct is supposed to be x and the field 'cdata' is supposed to contain the m-by-n matrices.&lt;br&gt;
&lt;br&gt;
--&amp;gt; I want to convert a 3D image array into the required movie structure.&lt;br&gt;
&lt;br&gt;
Any ideas?&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
Volker</description>
    </item>
    <item>
      <pubDate>Wed, 04 Nov 2009 11:29:02 -0500</pubDate>
      <title>Re: 3D array to struct?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264949#691997</link>
      <author>Bruno Luong</author>
      <description>% Your matrix&lt;br&gt;
A=rand(2,2,3)&lt;br&gt;
&lt;br&gt;
s=struct('cdata',squeeze(num2cell(A,[1 2])))&lt;br&gt;
&lt;br&gt;
% Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 04 Nov 2009 11:54:01 -0500</pubDate>
      <title>Re: 3D array to struct?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264949#692004</link>
      <author>Volker Klink</author>
      <description>Awesome! Works perfectly! Thanks for that quick solution! (I love this newsgroup!)&lt;br&gt;
&lt;br&gt;
&amp;gt; A=rand(2,2,3)&lt;br&gt;
&amp;gt; s=struct('cdata',squeeze(num2cell(A,[1 2])))&lt;br&gt;
&amp;gt; % Bruno</description>
    </item>
  </channel>
</rss>

