contour plot not working because of duplicate value

12 visualizaciones (últimos 30 días)
Samaneh Arzpeima
Samaneh Arzpeima el 4 de Jun. de 2018
Comentada: Samaneh Arzpeima el 6 de Jun. de 2018
Hello Everybody
I have 3 vectors with 95000 rows. X, Y,and T(time of rupture). Now I need to draw contour using these 3 vectors.but it sounds there are duplicates data(an error message say so! I guess there might be some data with same X and Y ) . I would like to removes them before drawing contour plot. Can anyone help. Thank You for your time.

Respuestas (1)

Varun Garg
Varun Garg el 4 de Jun. de 2018
Hi Samaneh,
My understanding of your question is that for the vectors X and Y you want to find values which are common in both.
For that you can use
intersect
Example snippet:
x=[1 2 3 4 5 10 20 30];
y=[4 5 10 100 90 22 33];
[z ix iy]= intersect(x,y)
x(ix)=[]
y(iy)=[]
Hope my understanding was right. You can refer documentation here .
  11 comentarios
Varun Garg
Varun Garg el 5 de Jun. de 2018
Okay. That's a bit better explanation. One more doubt If
X(i,1)=X(j,1)=X(k,1)
and
Y(i,1)=Y(j,1)=Y(k,1)
Should they both hold true together for me to keep only i row and delete j,k.. Or any of (1) or (2) hold true, I should delete j,k.. from both X and Y?
Samaneh Arzpeima
Samaneh Arzpeima el 6 de Jun. de 2018
Thamk you again
I just need one set of (x,y) to have one value of time or slip. for a point with coordinate lets say (x=2,y=3) if I have 3 value for time like
x y t
2 3 3
2 3 2
2 3 5
I want to keep point(2,3) with the lowest time, so I have to delete first and third row.

Iniciar sesión para comentar.

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by