发布网友 发布时间:2022-05-15 19:07
共2个回答
热心网友 时间:2024-02-27 05:17
怎样从C中提取出轮廓信息?A:matlab网站上Duane Hanselman分享了一个.m函数来解决这个问题- Extract contour data from contour matrix C。链接。该函数如下:function s=contourdata(c)% S = CONTOURDATA(C) extracts the (x,y) data pairs describing each contour% line and other data from the contour matrix C. The vector array structure% S returned has the following fields:%% S(k).level contains the contour level height of the k-th line.% S(k).numel contains the number of points describing the k-th line.% S(k).isopen is True if the k-th contour is open and False if it is closed.% S(k).xdata contains the x-axis data for the k-th line as a column vector.% S(k).ydata contains the y-axis data for the k-th line as a column vector.%% For example: PLOT(S(k).xdata,S(k).ydata)) plots just the k-th contour.if nargin<1 || ~isfloat(c) || size(c,1)~=2 || size(c,2)<4'Input Must be the 2-by-N Contour Matrix C.')endtol=1e-12;k=1; % contour line numbercol=1; % index of column containing contour level and number of pointswhile col<size(c,2); % while less than total columns in cs(k).level = c(1,col); %#ok
热心网友 时间:2024-02-27 05:17
就是要画等于0的等值线