How to form a decimal vector for a cell array

hello, i have a cell with size 1*1624..now, i want to split these 1624 binary elements into each 8 binary elements ,and then these 8 elements must convert into a decimal number and store in an array..so,my final output must be an array with size 203(bcz 8*203=1624)..can you help me how to do???

8 Kommentare

i need to convert each 8 binary elements of total 1624 elements into decimal number an store in 203 cell
could anyone can help me how to solve this problem?
José-Luis
José-Luis am 8 Feb. 2017
Are the "binary elements" characters? If not, what are they?
not characters..binary values are of o's and 1's
José-Luis
José-Luis am 8 Feb. 2017
Yes but the 0's and 1'1 can be stored as numbers or as characters.
Jan
Jan am 8 Feb. 2017
@Jyothi: Please post a small example of the input with e.g. 16 elements and the wanted output.

Antworten (1)

adi kul
adi kul am 8 Feb. 2017

0 Stimmen

Try to use reshape. Here is quick code:
m=1:1624;
n=reshape(m,203,8);
Modify it as per your requirements

1 Kommentar

no,i again need to convert each 8 binary element into a decimal number and store each decimal number in an array..

Diese Frage ist geschlossen.

Gefragt:

am 8 Feb. 2017

Geschlossen:

am 8 Feb. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by