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

조회 수: 6 (최근 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 CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by