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

def_spectre.m
function [y,U,matrice,s]=def_spectre(fe,N,s)

delete(gcf)
figure(1)
e=ecran;
if e(1)<0
    e(1)=0;
end;
set(gcf,'position',e)
set(gcf,'color','w')
matrice.time=[];
matrice.signals.values=zeros(N,1);
matrice.signals.dimensions=1;
y=zeros(N,1);
 U1=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.75 0.3 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string','Dfinition de l''amplitude des raies','fontunits','normalized','fontsize',0.5,'fontweight','bold');
U2=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.70 0.8 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string','Exemple : k=[-N/2+1:2:N/2-1];X(k+N/2+1)=-(2/pi)*i./k;','fontunits','normalized','fontsize',0.5,'fontweight','bold'); 
U3=uicontrol(gcf,'style','text','unit','normalized',...
		'position',[0.1 0.65 0.8 0.05],'backgroundcolor','w',...
	           'foregroundcolor','b','string','          X(N/2+1) correspond  la composante continue !','fontunits','normalized','fontsize',0.5,'fontweight','bold'); 

if isempty(s)
       s='k=[-N/2+1:2:N/2-1];X(k+N/2+1)=-(2/pi)*i./k;';
end;

U=uicontrol(gcf,'style','edit','unit','normalized',...
		'position',[0.1 0.55 0.9 0.05],'backgroundcolor','y',...
	    'foregroundcolor','b','max',1,...
		'string',s,'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		'callback','s=get(U,''string'');');
bouton_ok=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.6 0.1 0.1 0.1],...
	    'string','OK','foregroundcolor','r','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
        'callback','[X,erreur]=calcul_spectre_X(s,N,fe);[y,te,matrice]=fft_calcul_inv(X,N,fe,erreur);');
 bouton_fin=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.1 0.1 0.1 0.1],...
	    'string','FIN','foregroundcolor','r','fontunits','normalized','fontsize',0.5,'fontweight','bold',...
        'callback','fin;cd ..;liste_logiciels');   
    
    

Contact us