Prev: mask in subsystem block
Next: to read a raw file
From: Tarakapraveen on 3 Jun 2010 12:37 "Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hu8e3m$f0h$1(a)fred.mathworks.com>... > Dear Tarakapraveen! > > > The following statement should work for any length. > > fprintf('%f %f\n', real(DataVec(:)), imag(DataVec(:))); > > fprintf('%f %f\n', transpose([real(DataVec(:)), imag(DataVec(:))])) > or if DataVec is a row vector: > fprintf('%f %f\n', [real(DataVec); imag(DataVec)]) > > Kind regards, Jan Great Thanks Jan,It works.
From: Walter Roberson on 3 Jun 2010 14:58 Tarakapraveen wrote: > "Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message > <hu8e3m$f0h$1(a)fred.mathworks.com>... >> > The following statement should work for any length. >> > fprintf('%f %f\n', real(DataVec(:)), imag(DataVec(:))); >> >> fprintf('%f %f\n', transpose([real(DataVec(:)), imag(DataVec(:))])) >> or if DataVec is a row vector: >> fprintf('%f %f\n', [real(DataVec); imag(DataVec)]) > Great Thanks Jan,It works. Constructing the horizontal concatenation of the two arrays and then transposing them requires using additional memory (as much as the size of the original array), and thus does not satisfy your stated requirements that the mechanism you were seeking must not use additional memory.
From: Tarakapraveen on 4 Jun 2010 14:18
Walter Roberson <roberson(a)hushmail.com> wrote in message <hu8u34$f04$1(a)canopus.cc.umanitoba.ca>... > Tarakapraveen wrote: > > "Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message > > <hu8e3m$f0h$1(a)fred.mathworks.com>... > > >> > The following statement should work for any length. > >> > fprintf('%f %f\n', real(DataVec(:)), imag(DataVec(:))); > >> > >> fprintf('%f %f\n', transpose([real(DataVec(:)), imag(DataVec(:))])) > >> or if DataVec is a row vector: > >> fprintf('%f %f\n', [real(DataVec); imag(DataVec)]) > > > Great Thanks Jan,It works. > > Constructing the horizontal concatenation of the two arrays and then > transposing them requires using additional memory (as much as the size of the > original array), and thus does not satisfy your stated requirements that the > mechanism you were seeking must not use additional memory. You are right Walter but i tried some interleaving which takes more memory than this one,i am trying to look for some better thing than this,any way always there will be saturation. |