|
Usjes O Cuanachain wrote:
> Hi,
>
> I am controlling an oscilloscope via Matlab and I use it to capture
> many samples of data many times. After each capture I transfer the
> data from the scope directly into a Matlab variable and then I want
> to save it to my hard disk as fast as possible so that I can collect
> more data. Currently I am using the save function with the -v6 switch
> which turns off compression and speeds the save operation up a bit
> but it is still too slow. Is there any way I can make this operation
> faster ? Is there some other function I could use ? For reference the
> data comes from the 'scope in 15MB chunks which is 15e6 samples at 1
> byte per sample, when this is assigned to a matlab variable it takes
> up 120MB (ie. 8 bytes per sample) but the final saved file is only
> 15MB (even with the -v6 switch) so I guess this 8 byte representation
> does not slow things down. Is 'save' the best function to use ? Or is
> there something that would work quicker ?
...
Don't know but you might look at
fwrite()
I don't know how much overhead in the save() function you might save;
you'll have to have a file fopen() as well, of course.
Other than that, not much I can think of on the writing itself.
If you're only passing data thru, you might see if it's possible to
somehow bypass the byte-->double-->byte translation as an experiment. I
don't know how you're getting the data or what you're doing w/ it so
that's just a wag for you worth what you paid here in c.s-s.m. for it. :)
--
|