How to plot one variable (density for example) at a 2D contour graph ( time and depth for example)?

I have the following array (761049x3 double), with the columns representing (time,depth,density). I would like to plot a graph of the density(z) ranging in time(x) and depth(y) in a 2D visualization. I tried many plot's command but none of them worked. Can someone help me with that?
Thanks for the attention,
Gustavo

 채택된 답변

Look at
doc meshgrid
for an example of how surf and friends expect the data. Depending on the arrangement of the independent variables in your array you may have to do some rearranging to get them in the proper sequence; we've no information to work from on that.

댓글 수: 4

Hi dpb,
Tks for the answer. I tried to generate a [X,Y]=meshgrid(x,y), where x=time<761049x1 double>, y=depth<761049x1 double>, and Z is the independent variable carrying backscatter values, as the same size double.
The first error is because the matrix is too big to generate a meshgrid. I read about some solutions working with 'griddata' and 'TriScatteredInterp', but I didn't run it correctly.
My objective is to plot a figure similar with the following:
Thank you,
Hmmmm....that's not what I envisioned you intended.
Try
scatter(time,depth,[],density)
May need to experiment with the area parameter which I omitted to default above and then the color map to match with the density.
Well, kewl!!! I wasn't sure but was the bestest starting point I could see from Matlab. How about pasting a copy of the image Matlab generated just to see?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2015년 3월 21일

댓글:

dpb
2015년 3월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by