How to Plot a matrix?

1 visualizzazione (ultimi 30 giorni)
khatereh
khatereh il 17 Lug 2012
Hi, I have a matrix that I want to visualize it. So the figure have a legend showing the greater values is with which color and vise versa.
thanks

Risposte (2)

Seyhan Emre Gorucu
Seyhan Emre Gorucu il 18 Lug 2012
I didn't understand your question exactly but scatter might be solution for you. You need a x vector y vector and a matrix. Google matlab scatter. I can help better if you have a simple example and if you can elaborate better.

Richard Zapor
Richard Zapor il 18 Lug 2012
Modificato: Richard Zapor il 18 Lug 2012
Visualizing a matrix for relative magnitudes can be done with surf or I like imagesc.
A=randi(256,[64 128]);
figure;imagesc(A)
You can threshold and change from color to grayscale.
figure;imagesc(A,[0 192]);colormap gray;axis equal;axis tight

Community Treasure Hunt

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

Start Hunting!

Translated by