Displaying a matrix in command window with certain elements being different colors (elements selected by index)
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I would like to know how to display a matrix to the command window, with all formatting intact, and depending on the index set the element to whatever color.
I've used the following to display the matrix A to the command window, and it works.
disp([repmat('%5.0f',1,size(A,2)) '\n'],A)
Is it possible to set a few elements, say (1,1), (1,2), and (1,3), to display in red versus the standard black font the command window uses?
Thanks for any help?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!