フィルターのクリア

Save variable to .mat file

3 ビュー (過去 30 日間)
Jan Kubicek
Jan Kubicek 2021 年 4 月 6 日
コメント済み: Jan Kubicek 2021 年 4 月 13 日
I would like to kindly ask you for the help with dynamical naming of saved variables in MATLAB.
I have the variable:
Name=’image_xx’
My script generates a variable: waviness
My problem is that I need to save the variable waviness to the .mat file with the name:
image_xx_waviness via the command save(). Please, can you help me how to do that.
Many thanks for any help.

回答 (1 件)

David Fletcher
David Fletcher 2021 年 4 月 6 日
編集済み: David Fletcher 2021 年 4 月 6 日
try this:
save(strcat(Name,'_waviness'),'waviness')
  1 件のコメント
Jan Kubicek
Jan Kubicek 2021 年 4 月 13 日
It works well, thank you very much for your help :-)

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

カテゴリ

Help Center および File ExchangeAdding custom doc についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by