フィルターのクリア

Can I make a surface or colormap with latitude, longitude, and concentration using MATLAB? (photo example)

3 ビュー (過去 30 日間)
Hi there,
I am assisting in some research based on climate model outputs. I have datasets for various values (e.g. CO2 concentration, water vapor concentration) at various latitude and longitudes (of systematic intervals). I also need to create similar colored maps for latitude vs. altitude. [Picture examples are linked to below.] I basically have the datasets in txt files that are about a 20 x 20 matrix based on the lat/long intervals.
Can I create these graphs using MATLAB? How should I go about doing this?
Thank you so much!
Aaron

採用された回答

Patrick Kalita
Patrick Kalita 2011 年 8 月 17 日
Have you looked at the pcolor function? Here's an example:
[x,y,z] = peaks;
pcolor(x,y,z);
Based on your example pictures, you may also want to do this:
shading interp
The "vertical" picture also appears to have some contour lines:
[x,y,z] = peaks;
pcolor(x,y,z);
shading interp
hold on
contour(x,y,z, [-2, 2], 'EdgeColor', 'k');
Other commands you might want to look at: clabel, colorbar.
  2 件のコメント
Aaron Burdick
Aaron Burdick 2011 年 8 月 17 日
Thanks Patrick! I tried using the pcolor function. It changes my X (long) and Y (lat) vectors into matrices with min and max of -3 and 3. It also changes the Min/Max of my Z matrix to -6.5/8.07.
I need the axis values for X and Y to correctly maintain the Longtitude and Latitude values I've entered. Also I need the absolute values for matrix Z to remain unchanged, since these are gas concentrations differences and I need the color bar to reflect the actual concentration values.
Thanks again for your help!
Aaron
Patrick Kalita
Patrick Kalita 2011 年 8 月 19 日
I was just using the PEAKS function to generate sample data. Don't use that in your actual plot. Substitute your own data for x, y, and z.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by