Скачиваний:
18
Добавлен:
08.04.2022
Размер:
1.32 Кб
Скачать
function part2()
global hMenu1 hA2 hA3 hA4 RR3 RR

r = get(hMenu1,'Value');
if r == 1
axes(hA2)
cla
axes(hA3)
cla
axes(hA4)
cla
else
RR = RR3(:, r-1);
axes(hA2)
cla
hold on
for i = 1:450
x(1) = i;
x(2) = i;
R(1) = 0;
R(2) = RR(i);
plot(x, R);
hold on
end
maxRR = max(RR)*1.2;
set(hA2, 'Ylim',[0 maxRR])

axes(hA3)
dH = 0.05;
X = 0:dH:maxRR;
H = histc(RR,X)
SH = sum(H);
PH= H/SH*100;
bar(X,PH, 'histc')
maxh = max(PH)*1.2;
set(hA3, 'Ylim',[0 maxh])

axes(hA4)
NRR = length(RR);
plot( RR(1:NRR - 1), RR(2:NRR), 'o');
maxr = max(RR)*1.2;
set(hA4, 'Ylim',[0 maxRR],'Xlim',[0 maxRR])

RRsr = mean(RR);
RRmin = min(RR);
RRmax = max(RR);
dRR = RRmax - RRmin;
[AMo, iMo] = max(PH);
Mo = iMo*dH;
axes(hA3)
xt = maxRR/20;
yt = maxh;
dyt = maxh/15;
text (xt, yt - dyt, ['RRsr = ' num2str(RRsr) ' c'])
text (xt, yt - 2*dyt, ['RRmin = ' num2str(RRmin) ' c'])
text (xt, yt - 3*dyt, ['RRmax = ' num2str(RRmax) ' c'])
text (xt, yt - 4*dyt, ['dRR = ' num2str(dRR) ' c'])
text (xt, yt - 5*dyt, ['Mo = ' num2str(Mo) ' c'])
end
return
end
Соседние файлы в папке Лаба 10