how to stop the working of format longg after some line execute in matlab

4 ビュー (過去 30 日間)
singh
singh 2015 年 6 月 13 日
回答済み: Jan 2015 年 6 月 13 日
format longg
t=clock;
T1=(t([5,6]))
CT=text(X6,Y6,num2str(N3),'FontWeight','bold','fontsize',12,'color','r'),pause(.4)
now i wish to format longg is used before CT execute or terminate the working of long before CT execute. because it will be long the value of CT like
CT=604.002563476563

回答 (1 件)

Jan
Jan 2015 年 6 月 13 日
The format command has effects only for the display in the command window. It does not concern the values inside the code. In your example format does not influence the value of T1, only the display in the command window.
The value displayed for CT is the handle of the text object. The format command is not useful here, but set a semicolon at the end of the command to suppress the output to the command window:
CT = text(X6,Y6,num2str(N3),'FontWeight','bold','fontsize',12,'color','r');

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by