3D Modeling MatLab Project
古いコメントを表示
Hi Matlab,
I have a question reguarding my 3D modeling project I am woking on in Matlab, I choose to show the snowfall in New England specifically I found data for the years 1990-2010. The data points are below in order from 1990 to 2010. My code is also shown below. I can't seem to get the XTick's labels to display from 90 to 10 it only shows 90 to 94 or 95 and when I expand my screen it shows up to 00 but then the YTick label's repeat. Can someone please help me and fix my code, If you look at the top view of my graph I also have holes in it which do not understand.
x = 0:20;
y = 0:5;
z = [42.5 79.2 116.8 107.2 60.5 100 95 93.9 70.7 76.4 122.4 56.2 83 94.7 89.7 70.4 94.6 120.2 91.4 96.5 98.5; 19.1 22 83.9 96.3 14.9 107.6 51.9 25.6 36.4 22.4 44.2 15.1 67.7 35.1 86.6 39.9 17.1 51.2 65.9 35.7 79; 32.4 58.6 115.6 76.2 38.6 102 43.3 54.5 53.5 41.1 99.3 32.6 63.9 46.7 102.1 47.2 54.9 103 81.1 37.1 69.3; 58.9 67.7 96.3 80.2 63.4 114.7 103.5 85.5 80.6 72.4 106.6 64.1 77.2 69 76 47.9 81.7 147 109.6 52.6 66.1; 18 18.6 33.3 55.8 11.7 75.7 28.1 7.4 39.2 16.9 37.5 9.1 49.9 41.6 65.2 28.4 13.6 14.1 47.8 37.5 64.4; 59.5 43.7 106.3 98.1 40.9 153.2 100.1 59.7 47.3 46.7 93.9 30.3 88.5 62 90.8 80.3 44 79.8 78.9 73.3 89.9];
xi = 0:0.05:20;
yi = 0:0.05:5;
[xi,yi] = meshgrid(xi,yi);
zc = interp2(x,y,z,xi,yi,'cubic');
mesh(xi,yi,zc);
surfc(xi,yi,zc);
xlabel('Years')
ylabel('Cities')
zlabel('Inches of Snow')
title('Snowfall in New England 1990-2010')
set(gca,'YTickLabel',{'Burlington, VT','Boston, MA','Portland Jetport, ME','North Conway, NH', 'Kingston, RI', 'Storrs,CT'})
set(gca,'XTickLabel',{'`90','`91','`92','`93','`94','`95','`96','`97','`98','`99','`00','`01','`02','`03','`04','`05','`06','`07','`08','`09','`10'})
text(0,6,86,'This is the maximum');
text(0,5, 12,'This is the minimum');
1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
Burlington, Vermont 42.5 79.2 116.8 107.2 60.5 100 95 93.9 70.7 76.4 122.4 56.2 83 94.7 89.7 70.4 94.6 120.2 91.4 96.5 98.5
Boston, Massachussetts 19.1 22 83.9 96.3 14.9 107.6 51.9 25.6 36.4 22.4 44.2 15.1 67.7 35.1 86.6 39.9 17.1 51.2 65.9 35.7 79
Portland Jetport, Maine 32.4 58.6 115.6 76.2 38.6 102 43.3 54.5 53.5 41.1 99.3 32.6 63.9 46.7 102.1 47.2 54.9 103 81.1 37.1 69.3
North Conway, New Hampshire 58.9 67.7 96.3 90.2 63.4 114.7 103.5 85.5 80.6 72.4 106.6 64.1 77.2 69 76 47.9 81.7 147 109.6 52.6 66.1
Kingston, Rhode Island 18 18.6 33.3 55.8 11.7 75.7 28.1 7.4 39.2 16.9 37.5 9.1 49.9 41.6 65.2 28.4 13.6 14.1 47.8 37.5 64.4
Storrs, Conneticut 59.5 43.7 106.3 98.1 40.9 153.2 100.1 59.7 47.3 46.7 93.9 30.3 88.5 62 90.8 80.3 44 79.8 78.9 73.3 89.9
1 件のコメント
Rena Berman
2019 年 10 月 28 日
(Answers Dev) Restored edit
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Axis Labels についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!