Clear Filters
Clear Filters

How can I Plot a matrix in a new figure window?

4 views (last 30 days)
Galo
Galo on 21 Nov 2018
Answered: Image Analyst on 21 Nov 2018
Hello everybody, I have a matrix like the one below and I want to show it in a new figure window, I don't want it to appear just in the command window. I don't know if that is possible to do in Matlab.
The second question is if it is possible to display some columns or rows of a matrix in the command window with different color, for example I would like the first and third column to be red, is that possible?
T =
1 1 0 0 0 0 0 1 0 1
0 0 0 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0
0 1 0 0 1 0 0 1 0 0
0 1 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 0 1 1 0 0
1 0 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0 1 0
0 1 0 0 0 1 0 0 0 0
1 0 1 0 0 1 1 0 0 1
0 0 1 0 1 0 0 0 1 0
0 0 0 0 0 0 0 0 1 1
0 0 0 0 1 0 1 0 0 0
1 0 0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0 1 0

Answers (1)

Image Analyst
Image Analyst on 21 Nov 2018
You could call figure(), followed by uicontrol(), or else use GUIDE to place a static text label on the window. Then use sprintf() to create a string to send to the text control.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!