From: us on
"Elie Matta" <matta.elie(a)hotmail.com> wrote in message <hp4jcq$23b$1(a)fred.mathworks.com>...
> hey all,
>
> Is there any other way to convert char to double other than str2num that is too slow?
> I have a graylevel image that i want to convert to a binary sequence.
>
> load woman;
> imdec = reshape(X,256*256,1);
> imbin= dec2bin(imdec,8);
> msg = reshape(imbin',256*256*8,1);
>
> but msg is char if i use
> msg2=str2num(msg);
> it takes too long
> and if i use
> msg2=str2double(msg)
> it gives me a 1x1 double inf
>
> is there any other way ??
> thanks in advance.
>
> Elie

rather than just showing
load woman;
which (most likely) no CSSMer has on the disk,
show CSSM an example of your input X...

us
From: Elie Matta on
X is the image that u get when u use load woman its a double array
i want to finally transform it to a one column n line binary sequence that is double and not char. the way i used reshape it gave me a char answer.

dpb <none(a)non.net> wrote in message <hp5ia0$t44$1(a)news.eternal-september.org>...
> Elie Matta wrote:
> > hey all,
> >
> > Is there any other way to convert char to double other than str2num that
> > is too slow?
> > I have a graylevel image that i want to convert to a binary sequence.
> >
> > load woman;
> > imdec = reshape(X,256*256,1);
> > imbin= dec2bin(imdec,8);
> > msg = reshape(imbin',256*256*8,1);
> >
> > but msg is char if i use msg2=str2num(msg); it takes too long and if i use
> > msg2=str2double(msg)
> > it gives me a 1x1 double inf
> > is there any other way ??
> ...
> OK, I'm not much into image processing so you confused me (easily done,
> undoubtedly)...
>
> First, what is X (double, uintN, ...)?
>
> What is the form of binary sequence wanted to be and what's the
> definition of who's 0/1?
>
> --
From: Elie Matta on
X could be any gray level image of type double i used load woman just as an example. btw what is CSSM?
"us " <us(a)neurol.unizh.ch> wrote in message <hp5nqh$j7m$1(a)fred.mathworks.com>...
> "Elie Matta" <matta.elie(a)hotmail.com> wrote in message <hp4jcq$23b$1(a)fred.mathworks.com>...
> > hey all,
> >
> > Is there any other way to convert char to double other than str2num that is too slow?
> > I have a graylevel image that i want to convert to a binary sequence.
> >
> > load woman;
> > imdec = reshape(X,256*256,1);
> > imbin= dec2bin(imdec,8);
> > msg = reshape(imbin',256*256*8,1);
> >
> > but msg is char if i use
> > msg2=str2num(msg);
> > it takes too long
> > and if i use
> > msg2=str2double(msg)
> > it gives me a 1x1 double inf
> >
> > is there any other way ??
> > thanks in advance.
> >
> > Elie
>
> rather than just showing
> load woman;
> which (most likely) no CSSMer has on the disk,
> show CSSM an example of your input X...
>
> us
From: James Tursa on
"Elie Matta" <matta.elie(a)hotmail.com> wrote in message <hp5pn2$ffe$1(a)fred.mathworks.com>...
>
> btw what is CSSM?

This newsgroup: comp.soft-sys.matlab