extract data from one Matrix into three matices

1 次查看(过去 30 天)
I have created meshgrid [x,y] on which i have to contourf z.
But the problem is that i have 3 different types of data in z;
1- -999 (which shows no-data) 2- -9999 (which shows invalid-data) 3- valid data on which I would like to plot the actual contour.
I am trying to show all three types of data in z on the contour.
My strategy is to separate z into three matrices each containing one particular type of data among three mentioned types, keeping the size of all three matrices same as original z, so that i can contour all the three new matrices on same [x,y] grid.
Any Idea how to separate z into three matrices of same size as original ("No values" in the matrix can be treated as no vales)? I can use find(z=-999) to get the index of data type 1 in z but don't know how can i get the matrix from that index.
Best regards

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by