www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/FlowDataSetContoursInVolumeSlicePlanesExample.m
%% Contour Slices of Fluid Flow % Store the matrices |X|, |Y|, |Z|, and |V| from the |flow| data set. % Copyright 2015 The MathWorks, Inc. [X,Y,Z,V] = flow; %% % Create nine contour plots in the y-z plane, no plots in the x-z plane, and one plot % in the x-y plane by specifying |Sx| as a vector of nine elements, |Sy| as an % empty vector, and |Sz| as a scalar. Sx = 1:9; Sy = []; Sz = 0; %% % Draw 10 contour lines between -8 and 2 by specifying |cvals| as a % 10-element vector of linearly spaced values between -8 and 2. cvals = linspace(-8,2,10); %% % Create the contour slice plots and set the axis limits. Set the data aspect % ratio, change the camera position, and display the black box outline. figure contourslice(X,Y,Z,V,Sx,Sy,Sz,cvals) axis([0,10,-3,3,-3,3]) daspect([1,1,1]) campos([0,-20,7]) box on