Prev: Compiled Parallel Support
Next: Detecting meshgrids
From: Chuck on 15 Jul 2010 17:48 "Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <i1l9bb$cmb$1(a)fred.mathworks.com>... > "Chuck " <creed(a)bcisse.com> wrote in message <i1l5mk$c30$1(a)fred.mathworks.com>... > > I have a Nx2 character matrix that I would like to reshape and write > > to a file as an Nx16 character matrix. The characters are hex numbers. > > I would like to take a matrix of hex characters formatted as: > > 00 > > 11 > > 22 > > 33 > > 44 > > 55 > > 66 > > 77 > > 88 > > 99 > > aa > > bb > > cc > > dd > > ee > > ff > > and write it to a file as: > > 0011223344556677 > > 8899aabbccddeeff > > > > I could do it with a loop, but I'm hoping there is a simpler solution. > > > > Thanks > > reshape(repmat(dec2hex(0:15),1,2).',16,[]).' > > Oleg Thanks Oleg. This wasn't quite what I needed but when I took a closer look at what you suggested, it helped me figure out my problem with writing the matrix to a file. Thanks again. Regards, Chuck
|
Pages: 1 Prev: Compiled Parallel Support Next: Detecting meshgrids |