필터 지우기
필터 지우기

color in output in matlab

조회 수: 104 (최근 30일)
ali hassan
ali hassan 2022년 2월 5일
댓글: Arif Hoq 2022년 2월 7일
let say if i want my output for certain condition in red or green clor,can it be done so?
a=[1 2 3 4 4];
b=[1 2 3 4 5];
if any(abs(a-b))==1
sprintf('ali')
end
what should i add so that it will print 'ali' in red?

채택된 답변

Arif Hoq
Arif Hoq 2022년 2월 5일
It might be helpful
a=[1 2 3 4 4];
b=[1 2 3 4 5];
if any(abs(a-b))==1
fprintf(2,'\n ali \n')
end
1 for default, 2 for red

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Support에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by