table for string

4 ビュー (過去 30 日間)
Jane
Jane 2012 年 3 月 29 日
編集済み: John Kelly 2015 年 2 月 26 日
Hello. I have a problem in making table for string.
There is a numerical value a. Then,i want to convert it to the string, and insert it to the table.
a = 12345; b = num2str(a);
Table(1) = b;
This code makes the Error message come up like this. 'Subscripted assignment dimension mismatch.'
What's the problem of this code?
Please help me!

採用された回答

Jonathan Sullivan
Jonathan Sullivan 2012 年 3 月 29 日
編集済み: John Kelly 2015 年 2 月 26 日
You'll need to make you table a cell array. Try this:
a = 12345; b = num2str(a);
Table{1} = b; % Notice the curly brackets. That means its a cell array.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by