how to make a 2d contour graph

How to make a 2d colour contour graph. I attached two files.
from the excel file:
x = blue values
y = yellow colour
z = green colour
I tried matlab programme using txt book with same data:
filename = 'a.txt';
A = importdata(filename);
x = A(:,1);
y = A(:,2);
[xx,yy]=meshgrid(x,y);
z=A(:,3);
[zz]=meshgrid(z);
figure
contour(x,y)

5 comentarios

madhan ravi
madhan ravi el 26 de Abr. de 2019
Editada: madhan ravi el 26 de Abr. de 2019
contourf(xx,you,zz) % ? Perhaps
madhan ravi
madhan ravi el 26 de Abr. de 2019
Editada: madhan ravi el 26 de Abr. de 2019
Agree with Adam , meant contourf() but then typed the other.
Adam Danz
Adam Danz el 26 de Abr. de 2019
contour() is also a possibility, though. Depends if you want fill or not.
Amit Kumar
Amit Kumar el 29 de Abr. de 2019
Thank you so much Madhan and Adam.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Contour Plots en Centro de ayuda y File Exchange.

Preguntada:

el 26 de Abr. de 2019

Comentada:

el 29 de Abr. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by