i have to solve this problem:
how can i read *.txt file in matlab,and covert it to hex? Every 4 bits must be in one cell.i hope that you understand me.thank you.
|
|
0
|
|
|
|
Reply
|
Bogdan
|
3/9/2010 11:04:06 PM |
|
Bogdan Markovic wrote:
> i have to solve this problem:
> how can i read *.txt file in matlab,and covert it to hex? Every 4 bits
> must be in one cell.i hope that you understand me.thank you.
fread() the file with PRECISION 'bit4=>uint8'. The result will be an unsigned
numeric array. If you need to convert the unsigned numeric array to the
traditional equivalent characters, index ['0':'9','A':'F'] by the
(the numeric array + 1). The +1 compensates for the fact that Matlab indexing
starts at 1, not a 0.
|
|
0
|
|
|
|
Reply
|
Walter
|
3/9/2010 11:36:50 PM
|
|