Create lookup table for cell array

3 ビュー (過去 30 日間)
Shailee Yagnik
Shailee Yagnik 2019 年 10 月 10 日
コメント済み: Shailee Yagnik 2019 年 10 月 11 日
I need to create a lookup table for cell array.
I have say the following output :
Codeword{1} =
01
Codeword{2} =
00000001
Codeword{3} =
1
Codeword{4} =
001
Codeword{5} =
000001
Codeword{6} =
00001
Codeword{7} =
00000000
Codeword{8} =
0000001
Codeword{9} =
0001
I want to create the lookup table that stores the codeword as :
symbol Codeword
1 01
2 00000001
3 1
..
9 0001
I tried to use the interpn() function but it doesnt help.
What should I do?
Kindly Help!

採用された回答

the cyclist
the cyclist 2019 年 10 月 10 日
Is this what you want?
[num2cell(1:9)' Codeword(:)]
  1 件のコメント
Shailee Yagnik
Shailee Yagnik 2019 年 10 月 11 日
Yes, Thank You!

サインインしてコメントする。

その他の回答 (1 件)

prasanth s
prasanth s 2019 年 10 月 10 日
Code example to convert cell array to table.
A={1,2,3}
B=array2table(A');

Community Treasure Hunt

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

Start Hunting!

Translated by