フィルターのクリア

double - type matrix with integer and char values

3 ビュー (過去 30 日間)
Francesco
Francesco 2014 年 6 月 2 日
コメント済み: Star Strider 2014 年 6 月 2 日
Hi, I would know if it's possible create a matrix with two columns where in the first one we have integer values while in the second one i would save character values. Thanks for the answers.

採用された回答

Star Strider
Star Strider 2014 年 6 月 2 日
編集済み: Star Strider 2014 年 6 月 2 日
You can easily do that with a cell array, but not a matrix. Matrices have to have only one data type.
For instance:
for k1 = 1:10
C{k1,1} = k1;
C{k1,2} = char(61+k1);
end
The character array can be anything you want (single letters or symbols here only for demonstration purposes).
  2 件のコメント
Francesco
Francesco 2014 年 6 月 2 日
thank you!
Star Strider
Star Strider 2014 年 6 月 2 日
My pleasure!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by