<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221</link>
    <title>MATLAB Central Newsreader - breaking up a large matrix before loading into matlab</title>
    <description>Feed for thread: breaking up a large matrix before loading into matlab</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>Thu, 02 Jul 2009 21:04:38 -0400</pubDate>
      <title>breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662380</link>
      <author>gary12345</author>
      <description>Does anybody know how I can load parts of a matrix into matlab instead of all at once? because matlab won't allow me to load it all at once because the matrix is too big. Thanks.</description>
    </item>
    <item>
      <pubDate>Thu, 02 Jul 2009 23:41:52 -0400</pubDate>
      <title>Re: breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662403</link>
      <author>dpb</author>
      <description>gary12345 wrote:&lt;br&gt;
&amp;gt; Does anybody know how I can load parts of a matrix into matlab&lt;br&gt;
&amp;gt; instead of all at once? because matlab won't allow me to load it all&lt;br&gt;
&amp;gt; at once because the matrix is too big. Thanks.&lt;br&gt;
&lt;br&gt;
If it's a binary or text file see the doc for the appropriate input &lt;br&gt;
function--they have optional arguments to include number of elements to &lt;br&gt;
read.&lt;br&gt;
&lt;br&gt;
If some other ML system did a SAVE to a .MAT file, there I'm not sure &lt;br&gt;
outside a mex file or other hack to get at the data around the structure &lt;br&gt;
of the file that there is...&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 06:28:01 -0400</pubDate>
      <title>Re: breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662432</link>
      <author>Sprinceana </author>
      <description>For example if your big matrix (stored in variable) is 720x960 and you want to load only 10*10:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
img=imread('poza.jpg');imshow(img);&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt;whos img&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Name      Size                    Bytes  Class&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;img     720x960                  691200  uint8 array&lt;br&gt;
&lt;br&gt;
Make this (to store only 10*10 part of that matrix):&lt;br&gt;
&lt;br&gt;
small_img=img(1:10,1:10);&lt;br&gt;
imagesc(small_img);</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 06:44:01 -0400</pubDate>
      <title>Re: breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662437</link>
      <author>us</author>
      <description>&quot;Sprinceana &quot; &amp;lt;mihaispr@yahoo.com&amp;gt; wrote in message &amp;lt;h2k8dh$6uc$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; For example if your big matrix (stored in variable) is 720x960 and you want to load only 10*10:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; img=imread('poza.jpg');imshow(img);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;whos img&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   Name      Size                    Bytes  Class&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   img     720x960                  691200  uint8 array&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Make this (to store only 10*10 part of that matrix):&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; small_img=img(1:10,1:10);&lt;br&gt;
&amp;gt; imagesc(small_img);&lt;br&gt;
&lt;br&gt;
SO... you end up having the BIG -AND- the SMALL matrix in your workspace...&lt;br&gt;
how does this help the OP...&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 06:45:03 -0400</pubDate>
      <title>Re: breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662438</link>
      <author>us</author>
      <description>gary12345 &amp;lt;garycyhou@yahoo.ca&amp;gt; wrote in message &amp;lt;18789979.66027.1246568708618.JavaMail.jakarta@nitrogen.mathforum.org&amp;gt;...&lt;br&gt;
&amp;gt; Does anybody know how I can load parts of a matrix into matlab instead of all at once? because matlab won't allow me to load it all at once because the matrix is too big. Thanks.&lt;br&gt;
&lt;br&gt;
a hint:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;help memmapfile;&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 06:48:01 -0400</pubDate>
      <title>Re: breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662439</link>
      <author>Bruno Luong</author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;h2jh0c$edq$2@news.eternal-september.org&amp;gt;...&lt;br&gt;
&amp;gt; gary12345 wrote:&lt;br&gt;
&amp;gt; &amp;gt; Does anybody know how I can load parts of a matrix into matlab&lt;br&gt;
&amp;gt; &amp;gt; instead of all at once? because matlab won't allow me to load it all&lt;br&gt;
&amp;gt; &amp;gt; at once because the matrix is too big. Thanks.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If it's a binary or text file see the doc for the appropriate input &lt;br&gt;
&amp;gt; function--they have optional arguments to include number of elements to &lt;br&gt;
&amp;gt; read.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If some other ML system did a SAVE to a .MAT file, there I'm not sure &lt;br&gt;
&amp;gt; outside a mex file or other hack to get at the data around the structure &lt;br&gt;
&amp;gt; of the file that there is...&lt;br&gt;
&lt;br&gt;
I have not seen he internal format of MAT file documented anywhere. Not sure how to hack it.&lt;br&gt;
&lt;br&gt;
Best recommendation is to find a computer with Matlab and large RAM to break down the file.&lt;br&gt;
&lt;br&gt;
Few possible attempts: Try first to load the file after CLEAR ALL command. It is possible that the SAVE command is carried out on the same computer with large data-sharing variables. LOAD - since unshared them - thus will be unable to read it on the very same computer. In this case load individual variables separately - interleaved with clear all - might work. If it doesn't pass, then you are screwed.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 06:55:04 -0400</pubDate>
      <title>Re: breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662440</link>
      <author>us</author>
      <description>&quot;Bruno Luong&quot; &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;h2k9j1$l96$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;h2jh0c$edq$2@news.eternal-september.org&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; gary12345 wrote:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Does anybody know how I can load parts of a matrix into matlab&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; instead of all at once? because matlab won't allow me to load it all&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; at once because the matrix is too big. Thanks.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; If it's a binary or text file see the doc for the appropriate input &lt;br&gt;
&amp;gt; &amp;gt; function--they have optional arguments to include number of elements to &lt;br&gt;
&amp;gt; &amp;gt; read.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; If some other ML system did a SAVE to a .MAT file, there I'm not sure &lt;br&gt;
&amp;gt; &amp;gt; outside a mex file or other hack to get at the data around the structure &lt;br&gt;
&amp;gt; &amp;gt; of the file that there is...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have not seen he internal format of MAT file documented anywhere. Not sure how to hack it.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Best recommendation is to find a computer with Matlab and large RAM to break down the file.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Few possible attempts: Try first to load the file after CLEAR ALL command. It is possible that the SAVE command is carried out on the same computer with large data-sharing variables. LOAD - since unshared them - thus will be unable to read it on the very same computer. In this case load individual variables separately - interleaved with clear all - might work. If it doesn't pass, then you are screwed.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno&lt;br&gt;
&lt;br&gt;
hm... i didn't think the OP was talking about a MAT-file...&lt;br&gt;
anyhow, here's the doc describing the anatomy of a MAT...&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf&quot;&gt;http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
us</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 07:04:02 -0400</pubDate>
      <title>Re: breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662443</link>
      <author>Bruno Luong</author>
      <description>&quot;us &quot; &amp;lt;us@neurol.unizh.ch&amp;gt; wrote in message &amp;lt;h2ka08$hoq$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt;  here's the doc describing the anatomy of a MAT...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf&quot;&gt;http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Ah great, thank you usrs!!&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 09:31:19 -0400</pubDate>
      <title>Re: breaking up a large matrix before loading into matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255221#662468</link>
      <author>Rune Allnor</author>
      <description>On 2 Jul, 23:04, gary12345 &amp;lt;garycy...@yahoo.ca&amp;gt; wrote:&lt;br&gt;
&amp;gt; Does anybody know how I can load parts of a matrix into matlab instead of all at once? because matlab won't allow me to load it all at once because the matrix is too big. Thanks.&lt;br&gt;
&lt;br&gt;
If you have a wintel multi-core PC, then try this:&lt;br&gt;
&lt;br&gt;
- Push &amp;lt;ctrl&amp;gt;-&amp;lt;alt&amp;gt;-&amp;lt;del&amp;gt; to bring up the task manager&lt;br&gt;
- Right-click on the matlab process in the processes view&lt;br&gt;
- Select 'set affinity...' in the pop-up menu&lt;br&gt;
- De-select CPU0&lt;br&gt;
- Press 'OK'&lt;br&gt;
&lt;br&gt;
This will cause the matlab process to be run on one&lt;br&gt;
of the other cores available. With a little luck,&lt;br&gt;
the OS and most of the other processes run on CPU0&lt;br&gt;
core, meaning lots of the memory associated with this&lt;br&gt;
core is not available to matlab.&lt;br&gt;
&lt;br&gt;
If this doesn't work, try the same again but deselect&lt;br&gt;
some other core.&lt;br&gt;
&lt;br&gt;
Rune</description>
    </item>
  </channel>
</rss>

