Need help in running multiple loops and saving separately

1 回表示 (過去 30 日間)
Robert Gonzalez
Robert Gonzalez 2015 年 10 月 28 日
回答済み: Ingrid 2015 年 10 月 29 日
How can i run multiple for loops for different variables in my program, then automatically saving each variable value separately with their graph's?
for example i need to run my program with different m=[600,350,300,280,200,150,100], deltaCita=[0.1,0.01], and SNR=[30,20,10,5,0,-5,-7,-9,-11,-13] then automatically saving each test with their graphs separately???
  1 件のコメント
Eng. Fredius Magige
Eng. Fredius Magige 2015 年 10 月 29 日
Hi, Brief and more elaboration is required; or simply, write down relevant area of your code

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

回答 (1 件)

Ingrid
Ingrid 2015 年 10 月 29 日
you can use sprintf to generate a unique file name for which you will store your graph
so in each loop, after creation of your figure you need to write something like this
saveas(figH, sprintf('m_%3.0f_deltaCita_%2.1f_SNR_%3.0f.jpg',m,deltaCita,SNR));

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by