Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to form a decimal vector for a cell array

1 回表示 (過去 30 日間)
Jyothi Alugolu
Jyothi Alugolu 2017 年 2 月 8 日
閉鎖済み: Stephen23 2017 年 2 月 8 日
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 件のコメント
Jan
Jan 2017 年 2 月 8 日
@Jyothi: Please post a small example of the input with e.g. 16 elements and the wanted output.

回答 (1 件)

adi kul
adi kul 2017 年 2 月 8 日
Try to use reshape. Here is quick code:
m=1:1624;
n=reshape(m,203,8);
Modify it as per your requirements
  1 件のコメント
Jyothi Alugolu
Jyothi Alugolu 2017 年 2 月 8 日
no,i again need to convert each 8 binary element into a decimal number and store each decimal number in an array..

Community Treasure Hunt

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

Start Hunting!

Translated by