Re: Adding to matrices in mat file
- From: "Pekka Kumpulainen" <pekka.nospam.kumpulainen@xxxxxxxxxxxxx>
- Date: Wed, 18 Mar 2009 18:25:03 +0000 (UTC)
"Steve Hall" <cosmicfish@xxxxxxxx> wrote in message <gpr1f9$hqt$1@xxxxxxxxxxxxxxxxxx>...
Question: Is it possible to sequentially append values to a vector or matrix in a mat file, without opening said mat file?
Example:
a=[1 2 3 4 5]
save 'afile.mat' a
a=6 or a(6)=6 as needed
somehowappendthisthing('afile.mat',a)
load 'afile.mat'
a=[1 2 3 4 5 6]
Any ideas? Holding the whole matrix in memory while doing the computation is dragging things down but I need the data at the end.
I doubt you can't append anything to any file without opening the file.
But if you mean append without reading the contents of the file, then if you only need a simple array you could write it to a binary file. There you can add stuff without reading the existing content.
doc fopen
doc fwrite
.
- References:
- Adding to matrices in mat file
- From: Steve Hall
- Adding to matrices in mat file
- Prev by Date: Re: 3D imresize?
- Next by Date: Re: 3D imresize?
- Previous by thread: Adding to matrices in mat file
- Next by thread: Help!!!
- Index(es):
Relevant Pages
|