plot_lset.m

来自「FISMAT accommodates different arithmetic」· M 代码 · 共 56 行

M
56 行
字号
function plot_Lset(Lset,col)% plot_Lset(Lset,col)%% Plots contour function of random set that is given as a level set in% ACUT. COL (string) determines the color of the plot.%% The set is assumed to be unimodal, i.e. Lset has three columns.% The first column contains the levels with the highest level in the first% row. The second and third column describe the left and right boundary % respectively.%% If levels are not existing (rows filled with NaN), these levels are ignored.%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 20 June 1996% Last change 21 June 1996if nargin==1,  col='y';end;% Remove levels that are marked by NaN:i=1;[nol,c]=size(Lset);while i<=nol,  if sum(isnan(Lset(i,:))==c-1),    Lset(i,:)=[]; nol=nol-1;  else, i=i+1; end;end;if sum(isinf(Lset(:,3))) >=1,   % right open interval.  to = Lset(1,2)+(Lset(1,2)-Lset(nol,2))/100*10;  Lset(:,3) = ones(nol,1).*to;  plot(Lset(:,2:3)',[Lset(:,1)';Lset(:,1)'],col,...  Lset(:,2)',Lset(:,1)',[col,'+']);elseif sum(isinf(Lset(:,2))) >=1, % left open interval.  from = Lset(1,3)-(Lset(nol,3)-Lset(1,3))/100*10;  Lset(:,2) = ones(nol,1).*from;  plot(Lset(:,2:3)',[Lset(:,1)';Lset(:,1)'],col,...  Lset(:,3)',Lset(:,1)',[col,'+']);else,  plot(Lset(:,2:3)',[Lset(:,1)';Lset(:,1)'],col,...  Lset(:,2:3)',[Lset(:,1)';Lset(:,1)'],[col,'+']);end;   %axis([Lset(nol,2)-(Lset(nol,3)-Lset(nol,2))/100*10 Lset(nol,3)...%+(Lset(nol,3)-Lset(nol,2))/100*10 0 1.1]);%set(gca,'YTick',sort([Lset(:,1);0]));%set(gca,'XTick',chop(sort([Lset(:,2);Lset(:,3)]),2));    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?