Ältere Kommentare anzeigen
Hi there, I am relatively new to matlab and am using it for a very important project. I am hoping to use a .grd file to plot a topographic map of a major fault in Turkey and some data (my results) over it. However, I am really struggling to plot the .grd file in Matlab - I have tried grdinfo2 and grdread2 but i keep getting errors.
I have tried youtube and looking on here for relevant documentation but can't get anything to work. If anyone would be so kind as to help/ advise it would be very much appreciated.
Many thanks
5 Kommentare
Walter Roberson
am 24 Feb. 2019
I had no difficulty using grdread2() with that file.
P_L
am 25 Feb. 2019
Walter Roberson
am 25 Feb. 2019
I used
[X, Y, Z] = grdread2('FileNameWasHere.grd');
surf(X, Y, Z, 'edgecolor', 'none');
You could
[X, Y, Z] = grdread2('FileNameWasHere.grd');
h = pcolor(X, Y, Z);
h.EdgeColor = 'none';
When you have a high enough density of data in an axes, then the black edge between cells can end up turning the whole graph black, because it is fixed width but the cell sizes gets smaller to fit in the axes.
Walter Roberson
am 28 Feb. 2019
shadem() would be for the Mapping Toolbox; some of the routines you are using such as plot() are not appropriate if you are working with a mapping axes. If you are using a mapping axes then you should use surfm() instead of pcolor(), and plotm() instead of plot()
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Mapping Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
