想要画一个平面的应力分布,图中左上角的黄色网格其实是无效数据(值为25),研究的对象不包含这个区域,但是因为矩阵的关系必须赋值,这样如果想画图如何只画非黄色部分的网格的应力云图。
Nx=10;F=10;Ny=10;
p=[14.2326082364292,14.2354313519458,15.1879480393866,15.7599915916900,16.1441690130225,16.4186566064745,16.6198924184618,16.7668778895062,16.8703101371108,16.9364105032299,16.9686706230690;
15.1657524626031,15.1658739576724,15.5683492041636,15.9477778165657,16.2537736052658,16.4918193444434,16.6740509242441,16.8103372387136,16.9075467094892,16.9701545234182,17.0008340692846;
15.7747477849327,15.7748068640511,15.9717197555136,16.2089143539641,16.4312414908928,16.6207061833359,16.7740621088773,16.8927789544880,16.9792891130387,17.0357301174603,17.0635799415523;
16.2261199536838,16.2261525393233,16.3347257565591,16.4848322190603,16.6414826029248,16.7856099426801,16.9086183995449,17.0073317365142,17.0810038497877,17.1297992879185,17.1540776476489;
16.5905535653839,16.5905732459599,16.6561106331832,16.7541162012694,16.8641546243931,16.9715384508201,17.0673739695653,17.1468285322824,17.2074970297012,17.2482866278793,17.2687544677737;
16.9024793251041,16.9024920812053,16.9449349913424,17.0112736312461,17.0893860188439,17.1689185532342,17.2424124527176,17.3050122482109,17.3537691220874,17.3869951734973,17.4037982912245;
17.1803717282764,17.1803805702726,17.2097672753872,17.2565600488909,17.3130989182413,17.3722378389714,17.4282445687237,17.4769375461981,17.5154700209966,17.5420241759230,17.5555425224243;
17.4346736032909,17.4346803552602,17.4570934727808,17.4919997032885,17.5341103145175,17.5785870435337,17.6212873878960,17.6589196222507,17.6890449806218,17.7099843592421,17.7207002850591;
17.6709611395309,17.6709674478906,17.6918231078650,17.7201310434031,17.7526510752610,17.7866074979960,17.8192925899570,17.8483023251111,17.8716992529044,17.8880610377874,17.8964668672762;
17.8904178850021,17.8905001401202,17.9189937617523,17.9439431888602,17.9696478956518,17.9957912626927,18.0208646748580,18.0431889589244,18.0612794671136,18.0739842437620,18.0805297344067;
25,18.1362939128542,18.1495987530815,18.1668898514377,18.1860954960084,18.2059340598009,18.2250746175605,18.2421977886217,18.2561335819078,18.2659547285363,18.2710259941747;
25,18.3493557470814,18.3567586199364,18.3684218153485,18.3823641671940,18.3971814843056,18.4116628662577,18.4247140302290,18.4353891028942,18.4429384037979,18.4468447203735;
25,18.5350788806292,18.5397046605079,18.5476932707882,18.5577432308045,18.5687148222255,18.5795967338730,18.5894906017034,18.5976291452412,18.6034057874567,18.6064011600718;
25,18.6957969537695,18.6988975451347,18.7044939764761,18.7117672666193,18.7198782465656,18.7280330691188,18.7355132976114,18.7417024565816,18.7461120154493,18.7484033950418;
25,18.8326514071073,18.8348241580395,18.8388340289697,18.8441524517414,18.8501773007535,18.8563039995404,18.8619692035519,18.8666827306267,18.8700532565782,18.8718083723188;
25,18.9462433125361,18.9478186660736,18.9507609703461,18.9547139525040,18.9592428614642,18.9638901522637,18.9682169870997,18.9718349519371,18.9744308062262,18.9757851729399;
25,19.0368988430951,19.0380814405554,19.0403054256547,19.0433182797129,19.0467979798692,19.0503936041087,19.0537601525836,19.0565871570876,19.0586215185980,19.0596847815904;
25,19.1047942958834,19.1057225233897,19.1074753977677,19.1098629527697,19.1126360576273,19.1155164298517,19.1182251218356,19.1205075149659,19.1221539817598,19.1230157667429;
25,19.1500219263077,19.1507971481580,19.1522646927092,19.1542703786381,19.1566085493194,19.1590457396467,19.1613447261860,19.1632866857354,19.1646900820047,19.1654254344594;
25,19.1726267496286,19.1733300139683,19.1746629059471,19.1764875904350,19.1786187091762,19.1808441217401,19.1829467367269,19.1847251621522,19.1860116175302,19.1866860902892];
[X,Y]=meshgrid(1:1:Ny+1,1:1:Nx+F);
pcolor(X,Y,p),colorbar;
QQ截图20180917204815.jpg