Create a graph using ITA method

2 vues (au cours des 30 derniers jours)
Lakshi
Lakshi le 8 Fév 2019
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

Réponses (0)

Catégories

En savoir plus sur Networks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by