help-octave
[Top][All Lists]
Advanced

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

Re: help : how to load only a part of a matrix in octave


From: tharaka weheragoda
Subject: Re: help : how to load only a part of a matrix in octave
Date: Mon, 4 Jun 2012 19:30:03 +0530

I think fopen also load the huge matrix into memory.What i need is to load only a small part because i have only small memory.


You can use fread's size and skip arguments to read parts of a matrix.
So something like this might work:

   f = fopen("what_is_the.mat");
   for i = 1:32
     m = fread(f, [i*1e3, 3.2e4], "double", (i-1)*1e3);
     ## now do whatever you want with m
   endfor

HTH,
- Jordi G. H.


reply via email to

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