Create a graph using ITA method

2 ビュー (過去 30 日間)
Lakshi
Lakshi 2019 年 2 月 8 日
I used following codes to create graph using ITA method.So, how can I increase the length of two lines near 1:1 line. Also how can I create vertical lines in -1.5 and 1.5 points.
Codes :-
dataset=xlsread('Allai Tank - SPI.xlsx','SPI 12','B3:B49');
piece = 2;
xmin=min(dataset);
xmax=max(dataset);
m = length(dataset);
if mod(m,2)~=0;
dataset=dataset(2:end);
m=m-1;
end
n=m/2;
x=dataset(1:n);
x=sort(x);
meanx=mean(x);
y=dataset(n+1:m);
y=sort(y);
Dv = 10*(y-x)/meanx;
D = mean(Dv);
k = length(Dv);
pin = k/piece;
for ii = 1:piece-1
num(ii) = floor(ii*pin);
end
num(piece) = n;
arrspl{1} = Dv(1:num(1));
for ii = 2:piece
arrspl{ii} = Dv(num(ii-1)+1:num(ii));
end
%Dvpie = arrspl{ii}
for ii = 1:piece
Dmm(ii) = mean(arrspl{ii});
end
if figure~=0
plot(x,y,'.','markersize',15);
hold on
axis([xmin*2.5 xmax*1.5 xmin*2.5 xmax*1.5])
plot([xmin*2.5,xmax*4],[xmin*2.5,xmax*4]);%1:1 line
% 10%Ïß
A=meanx*1;
plot([A,xmax*2+A],[0,xmax*2],'-','color',[0.23 0.695 0.125]);
plot([0,xmax*2],[A,xmax*2+A],'-','color',[0.93 0.695 0.125]);
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeNetworks についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by