Could not save my variable in a specific name

2 ビュー (過去 30 日間)
Seereen
Seereen 2019 年 5 月 11 日
コメント済み: Seereen 2019 年 5 月 11 日
I am trying to save Z in a spceific file name ... I am geting error saya
Error using save
Must be a string scalar or character vector.
Here is my code ... any idea ?
filename=['synthetic_data.' num2str(1) '.mat'];
save (filename, Z);
Thank you

採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2019 年 5 月 11 日
Two very tiny flaws (e.g.: unnecessary "." and necessary ' ') in your used syntax and here is the correct syntax:
filename=['synthetic_data' num2str(1) '.mat'];
save (filename, 'Z'); % Z is already residing in your workspace
  1 件のコメント
Seereen
Seereen 2019 年 5 月 11 日
Ok I figure out my problem ... Thank you :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by