Code covered by the BSD License  

Highlights from
Logiciels temps réel

Logiciels temps réel

by

 

Real-time software concerning the domains of the signal processing, feedback and regulation

trace_courbes.m
h=get(figure(2),'child');
% test pour l'affichage des calibres
if isempty(h)
    position=0;
else
    position=position+1;
end;
set(gcf,'windowstyle','normal')
set(gcf,'position',ecran)
set(gcf,'color','w')
hold on
couleurs=['k','r','b','m','g','c','y','k'];
for k=-7.5:0.5:7.5
    plot([0 20],[k k],':k')
end;
for k=-7:1:7
    plot([0 20],[k k],'k')
end;
for k=0:0.5:20
    plot([k k],[-7.5 7.5],':k')
end;
for k=0:1:20
    plot([k k],[-7.5 7.5],'k')
end;
axis([0 20 -7.5 7.5])
bdt=[20e-3,50e-3,0.1,0.2,0.5,1,2,5,10,20];
cal_bdt=get(MOG(1,2),'value');
echelle_t=bdt(cal_bdt-1);
dim=ScopeData.signals.dimensions;
if cal_bdt-1==1
    for k=1:1:dim
            plot((ScopeData.time(1:401)-ScopeData.time(1))/echelle_t,ScopeData.signals.values(1:401,k),couleurs(k),'linewidth',2)
    end
else
    for k=1:1:dim
            plot((ScopeData.time-ScopeData.time(1))/echelle_t,ScopeData.signals.values(:,k),couleurs(k),'linewidth',2)
    end
end
s='Base de temps';
text(-2.5,7.5,s,'fontunits','normalized','fontsize',0.023,'fontweight','bold')
s=[num2str(echelle_t),' s/cm'];
text(-2,7-0.5*position,s)
s='Calibres';
text(-2,5,s,'fontunits','normalized','fontsize',0.023,'fontweight','bold')
choix_calibre_y={'','2 V/cm','1 V/cm','0,5 V/cm','0,2 V/cm','0,1 V/cm','50 mV/cm','20 mV/cm','VAR'};
for k=1:1:dim
    cal_y=get(MOG(1+k,2),'value');
    s=choix_calibre_y(cal_y);
    n=get(MOG(12,2+k),'value');
    if n==3
        nb=get(MOG(11,2+k),'string');
        s=[char(s),' (F : ',nb,' pts)'];
    end;
    text(-3,4.5-k*0.5-0.5*(dim+1)*position,s,'color',couleurs(k),'horizontalalignment','left')
end
 s='rglages zro :';
text(20,5,s,'fontunits','normalized','fontsize',0.023,'fontweight','bold')
n=get_param(gcs,'name');
for k=1:1:dim
    nom_bloc=[n,'/Constant',num2str(k+1)];
    z_y=get_param(nom_bloc,'value');
    s=['VOIE',num2str(k),' : ',z_y,' cm'];
    text(20,4.5-k*0.5-0.5*(dim+1)*position,s,'color',couleurs(k),...
        'fontunits','normalized','fontsize',0.023,...
        'horizontalalignment','left')
    end
   
title(nom,'fontunits','normalized','fontsize',0.023,'fontweight','bold')
hgcf=get(gcf,'child');
test=[];
lgcf=length(hgcf);
% cration d'UImenu
for kgcf=1:1:lgcf
    test=[test;strcmp(get(hgcf(kgcf),'type'),'uimenu')];
end
if ~any(test)
    hh=uimenu('label','SAUVEGARDE','foregroundcolor','r');
end;
hp=uimenu('parent',hh,'label','VOIE Y');
switch dim
    case 1
        ht1=uimenu('parent',hp,'label','1','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');
    case 2
        ht1=uimenu('parent',hp,'label','1','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');
        ht2=uimenu('parent',hp,'label','2','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');

    case 3
        ht1=uimenu('parent',hp,'label','1','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');
        ht2=uimenu('parent',hp,'label','2','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');
        ht3=uimenu('parent',hp,'label','3','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');
    case 4
        ht1=uimenu('parent',hp,'label','1','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');
        ht2=uimenu('parent',hp,'label','2','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');
        ht3=uimenu('parent',hp,'label','3','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');    
        ht4=uimenu('parent',hp,'label','4','callback','c=str2num(get(gcbo,''label''));sauvegarde_courbe(c,MOG,ScopeData)');
end;
if exist('fichier_sauvegarde.mat')
    hh2=uimenu('label','Rappel courbe sauve','foregroundcolor','r','callback','[e_t,h_r]=choix_retard_courbe_sauvee(MOG);');
end;

Contact us