フィルターのクリア

Write Strings into a matrix

24 ビュー (過去 30 日間)
Lukas Wammes
Lukas Wammes 2016 年 8 月 24 日
コメント済み: Lukas Wammes 2016 年 8 月 24 日
Hey Guys,
so I am trying to create a dynamic matrix and fill in information for each new loop.
zeiten = zeros(j,3);
zeiten(j,1) = einschwing;
zeiten(j,2) = rtime;
zeiten(j,3) = filenameString;
But while the first 2 variables are double the last one is a string. So how can I write this string into my matrix?
Thanks in advance?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 8 月 24 日
編集済み: Azzi Abdelmalek 2016 年 8 月 24 日
Use cell arrays
A{1}=100
A{2}='text'
or
A={100 'text'}
There is another alternative, a struct variable
A.value=100
A.string='text'
  1 件のコメント
Lukas Wammes
Lukas Wammes 2016 年 8 月 24 日
thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by