i have 128 values in a single variable..how can separate each 8 bits?? and then i convert the each 8 bit into ascii and then convert into string??

Risposte (1)

Since ‘f’ is already a (1x128) character array, you can create a matrix of its bytes using the rehape function:
bytes = reshape(f, 8, [])';
Each row is a consecutive byte. Again, it is already a character array, so converstion to a string is not necessary.

Categorie

Richiesto:

il 29 Dic 2014

Risposto:

il 29 Dic 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by