1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
| function [IC2,IC3]=controlchartspectralonoct(X)
#function whos plots the control charts for spectralon
#input : X= matrix of the new spectralon what we want to compare with
#the reference spectralon
#%
#%output :
#IC2 : confidence intervalle for warning limits
#IC3 : confidence intervalle for tolerance limits
#%
#[IC2,IC3]=controlchartspectralonoct(X);
#
#%
load ("-mat","C:/Octave/3.2.4_gcc-4.4.0/bin/Test_spectralon_1","Matrix","VarLabels","ObjLabels")
[n m]=size(Matrix);
Xm=mean(Matrix);
l=str2num(VarLabels);
stand=std(Matrix);
#%limites de surveillance
IC2=2*(stand/sqrt(n));
#%limites de controles
IC3=3*(stand/sqrt(n));
#%plot
figure(1)
h=plot(l,Xm+IC2);
hold on
grid on
h1=plot(l,Xm-IC2);
set(h,'Color','black','LineWidth',2)
set(h1,'Color','black','LineWidth',2)
figure(1)
h2=plot(l,Xm+IC3);
h3=plot(l,Xm-IC3);
set(h2,'Color','red','LineWidth',2)
set(h3,'Color','red','LineWidth',2)
title('red: alarm limits, black : warning limits')
xlabel('wavelenghts')
ylabel('A.U.')
#%projection des spectres des spectralon sur le graphe control charts
Xm2=mean(X);
figure(1)
hold on
plot(l,Xm2,'b-')
endfunction |
Partager