Prev: "Unsupported ARRAYFUN input type" problem
Next: fsolve problem - too many input arguments..FIXED
From: Matthew on 17 Feb 2010 12:16 Can you enter a matrix into a contstant block in Hex? For example a 2x2 [0x0FEE 0x003F; 0x02CC 0x2FFE] ? Can't find any syntax that will allow me to continue through the dialog box. Thanks, Matt
From: Praetorian on 17 Feb 2010 12:33 On Feb 17, 10:16 am, "Matthew " <mjreil...(a)gmail.com> wrote: > Can you enter a matrix into a contstant block in Hex? For example a 2x2 [0x0FEE 0x003F; 0x02CC 0x2FFE] ? Can't find any syntax that will allow me to continue through the dialog box. > > Thanks, > Matt Matt, You can use hex2dec({'0FEE', '003F'; '02CC', '2FFE'}). Unfortunately HEX2DEC returns a vector instead of retaining the original dimensions, so if you know the size of the matrix beforehand you could use RESHAPE to make it a matrix. HTH, Ashish.
|
Pages: 1 Prev: "Unsupported ARRAYFUN input type" problem Next: fsolve problem - too many input arguments..FIXED |