Dairy Command?

Hi Guys, I want to use the diary command which seems perfect what I want to intend with the exception of not been able to use variable filename with it. That is I would like to pass variable filename with date stamp on it with diary command each time .m script is run. Can anybody has suggestion? Example currently i can use: diary temp.log but i want diary temp_date.log where date is variable? Thanks in advance.

回答 (3 件)

Walter Roberson
Walter Roberson 2012 年 5 月 9 日

2 投票

dfilename = ['temp_' date '.log'];
diary(dfilename)
Wayne King
Wayne King 2012 年 5 月 9 日

0 投票

Why can't you create filename as a string variable (character array) and then use
diary(FILENAME)
Sean de Wolski
Sean de Wolski 2012 年 5 月 9 日

0 投票

Like:
load hogg.mat %?

カテゴリ

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

質問済み:

2012 年 5 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by