display contents of cell array and a vector together

i have a cell array
cell_array = {'A' 'B' 'C'} and
value = [ 10 20 30]
how can i display the cell_array and value_vector together as a string or in a table
A = 10
B = 20
C = 30

 採用された回答

Ameer Hamza
Ameer Hamza 2020 年 3 月 14 日
編集済み: Ameer Hamza 2020 年 3 月 14 日

1 投票

cell_array = {'A' 'B' 'C'};
value = [ 10 20 30];
arrayfun(@(x,y) fprintf('%s = %d\n', x{:}, y), cell_array, value);
Result
A = 10
B = 20
C = 30

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCell Arrays についてさらに検索

タグ

質問済み:

2020 年 3 月 14 日

編集済み:

2020 年 3 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by