I want to name my figures with 2 pieces of information, one that is constant for all images and one that arises from a loop. For example, I want the code to generate 4 plots with the following titles:
Doubling Time Tobramycin
Doubling Time Amikacin
Doubling Time Clindamycin
Doubling Time Tetracycline
I am making the 4 plots using a loop and I have the antibiotic names saved as Drug.{1}, 2 , 3. etc. How should I write it so that part of the title stays constant and the second part changes each time.
Thanks.

 採用された回答

KL
KL 2017 年 11 月 2 日

0 投票

for k = 1:numel(D)
f(k) = figure(k)
h(k) = plot(...)
title(['Doubling Time ' D{k}])
end

1 件のコメント

Mehrnaz
Mehrnaz 2017 年 11 月 2 日
Brilliant, thanks so much.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

質問済み:

2017 年 11 月 2 日

コメント済み:

2017 年 11 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by