Borrar filtros
Borrar filtros

color in output in matlab

104 visualizaciones (últimos 30 días)
ali hassan
ali hassan el 5 de Feb. de 2022
Comentada: Arif Hoq el 7 de Feb. de 2022
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?

Respuesta aceptada

Arif Hoq
Arif Hoq el 5 de Feb. de 2022
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

Más respuestas (0)

Categorías

Más información sobre Language Support en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by