From: Ji?í S on 28 Apr 2010 10:45 Hello. I would like to do this. ->From number: 11001 ->To vector: [1 1 0 0 1] Any idea? Thx.
From: James Tursa on 28 Apr 2010 11:11 "Ji?í S" <zonenberg(a)seznam.cz> wrote in message <hr9hm3$mcb$1(a)fred.mathworks.com>... > Hello. I would like to do this. > > ->From number: 11001 > ->To vector: [1 1 0 0 1] > > Any idea? Thx. >> x = 1101 x = 1101 >> y = sprintf('%4.0f',x) - '0' y = 1 1 0 1 James Tursa
From: Matt Fig on 28 Apr 2010 11:15 One approach: % Data N = 11001; % Engine str2double(regexp(sprintf('%i',N),'\d','match'))
|
Pages: 1 Prev: Pulse Density Demodulation Next: Spring 2010 MATLAB Contest, April 28 - May 5 |