Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Help with contour of a matrix

1 Ansicht (letzte 30 Tage)
aurc89
aurc89 am 24 Apr. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I have to plot a bidimensional map of a matrix using 'contour', and what I obtain is plotted in figure.
The problem is that in this way I have discrete lines, while I need to see a continuum between minimum and maximum values, with a gradual change of colors, with no blank spaces. Is it possible to do that? Maybe using a function different from 'contour'? Thanks!

Antworten (1)

Doubutsu
Doubutsu am 24 Apr. 2014
I have about the same kind of image if I try to use contour on my data. Instead I plotted it using 'imagesc'. It works good enough for me (since I just want to see something), but I don't know if it is what you are looking for.
  2 Kommentare
aurc89
aurc89 am 24 Apr. 2014
Bearbeitet: aurc89 am 24 Apr. 2014
Thank you, now it looks better! Just one question: by using imagesc the image is not at the same position, because the vertical axis is reversed, while I prefer not to reverse it. How can I do it? In the figures below you can see what I mean (the first one is obtained by using contour, the second one with imagesc)
Chad Greene
Chad Greene am 25 Jun. 2014
Indeed, imagesc will flip your data vertically. So you'll need to do imagesc(flipud(yourData)). Alternatively, you could use pcolor(yourData).

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by