clear; clc; fprintf('Fourieranalysis of signals\n\n'); fprintf('Figuur 1: input and output signals of the Fourierbox\n\n') fprintf('\nWARNING!This script looks for the file in the working directory.\n\n'); f_name=input('Filenaam: ','s'); freq=input('frequency=1 kHz (j/n): ','s'); if freq=='n'; f=input('frequency [Hz]: '); else f=1000; end; [data]=dlmread(f_name,' ',0,0); %cd(wd); T=1/f; t=0:3*T/2500:3*T; s_data=size(data); nr_punt=s_data(2); signaal_in=data(2500:5000); signaal_uit=data(5001:7501); figure(1); set(clf,'PaperType','A4'); set(clf,'Color',[1,1,1]); subplot(2,1,1); plot(t,signaal_in); axis([0,3*T,-5,5]); ylabel('Vin [V]','Fontsize',10); subplot(2,1,2); plot(t,signaal_uit); axis([0,3*T,-0.5,0.5]); xlabel('time [s]','Fontsize',10); ylabel('Vuit [V]','Fontsize',10);