别人的问题,一组数据,最小的是0.
画contour。line=0就是不显示。
于是,想了个办法。
- clear all
- clc
- clf
- u=[10,10,10,10,10,10,10,10,10,10,10;
- 8.99606561348849,8.99389637088129,8.99057948106787,8.98584287732298,8.97986082228896,8.97392720747352,8.97098219239949,8.97392897366789,8.97985985255500,8.98584027510225,8.99057823988660;
- 7.99294380453954,7.98894554559840,7.98257288117157,7.97293488630887,7.95967124916292,7.94486712890525,7.93607440648736,7.94486440685254,7.95966869400389,7.97292707767319,7.98257721227369;
- 6.99138466365188,6.98635596383771,6.97784746908140,6.96364223396134,6.94102927192917,6.90978676803151,6.88358456426392,6.90978990345101,6.94102749074648,6.96363570550978,6.97785000325731;
- 5.99189576115424,5.98725292071087,5.97881888066394,5.96275095288146,5.93101124836315,5.86967517482537,5.77868795890293,5.86967811269316,5.93100777260755,5.96274666659170,5.97881778778785;
- 4.99440014846082,4.99193904759952,4.98741606777255,4.97752857365162,4.95059120797531,4.85922221183168,4.49180307794196,4.85921777364972,4.95058708196892,4.97752679736053,4.98741291448127;
- 3.99788443738197,3.99869338587360,4.00136478511077,4.00935782806326,4.03461651474653,4.12481249416311,4.49180307794196,4.12480405066883,4.03460910877425,4.00936130384753,4.00136651837721;
- 3.00068140972844,3.00357922715507,3.00999710896708,3.02393100755620,3.05369893103040,3.11360567060916,3.20406189912716,3.11359571987514,3.05369502494701,3.02393204077182,3.00999798692285;
- 2.00183422436574,2.00495646658616,2.01111664173164,2.02266680544938,2.04264449846031,2.07184041750403,2.09724149591301,2.07183372319457,2.04264343299161,2.02266408258801,2.01111893104151;
- 1.00138425901580,1.00329767551344,1.00684686717249,1.01297115386539,1.02236995696817,1.03386145726732,1.04124097336366,1.03386127121626,1.02236822177668,1.01297032425588,1.00684882868046];
- % your version
- % u=[u;zeros(1,11)];
- % mm version
- u=[u;zeros(1,11);-0.5*ones(1,11)];
- contour(flipud(u),[0:11],'LineWidth',4,'Showtext','on')
- axis([0.5 11 0.5 13.5])
- colorbar
复制代码
|