How to display a message as flashing and in my desired color and font size?
古いコメントを表示
I want to display the following message in flashing and in my desired color and font size:
" Yes, the error is the same "
I am coding like this but it gives error:
disp('Yes, the error is the same','r','fontsize',5)
4 件のコメント
prasanth s
2023 年 2 月 1 日
to display in figure window, 'text' function will help
Sadiq Akbar
2023 年 2 月 1 日
prasanth s
2023 年 2 月 1 日
figure;
t=text(0.1,0.5,'text here','fontname','Courier','fontsize',30,'color','red');
for i=1:10
if mod(i,2)==0
t.Visible=1;
else
t.Visible=0;
end
pause(0.5)
end
Sadiq Akbar
2023 年 2 月 1 日
採用された回答
その他の回答 (1 件)
John D'Errico
2023 年 2 月 1 日
編集済み: John D'Errico
2023 年 2 月 1 日
1 投票
You can do that, but since disp is not written to accept those extra arguments, it might not work. Wanting code to do what you want is always a valid thing to try, but it rarely works.
You CAN use cprintf though, to do at least some of what you want.
3 件のコメント
Sadiq Akbar
2023 年 2 月 1 日
Walter Roberson
2023 年 2 月 1 日
Does the display need to be to the command window, or could it be text drawn in a figure?
If it must be to the command window then are you Livescript?
Sadiq Akbar
2023 年 2 月 1 日
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!