// WAV-3d-Analyse-25 /1.11.2021 // Nur mit Abtastfrequenz von 48000 // Es werden FFT Frequenzen von 1 bis 250 Hz berechnet // Das Signal kann von 1 bis 10 verstärkt werden // Es kann zwischen Kanal 1 und Kanal 2 gewechselt werden // Es wird im Textfeld Position Sek. die Laufzeit der WAV Datei angezeigt // Die Start-Position des zu berechnenden Abschnittes wird mit dem Zähler eingestellt // Es kann zwischen FFT Darstellung und Power Darstellung gewählt werden // Es kann die Grafik Anzeige auf der Frequenz Achse 1- 250 Hz gezoomt werden // Mit der Taste Titel Edit kann für die Grafik eine Überschrift erstellt werden // Mit der Taste Save Grafik wird die angezeigte Grafik in einer gif Datei gespeichert // Mit der Taste Start werden alle oben eingestellten Voreinstellungen aktiviert und neu berechnet // mit der Playposition wird ein Startpunkt ausgewählt und eine Sequenz // von 10 Sekunden Länge wird von diesem Startpunkt an abgespielt // Mit der Taste Neu wird eine neue WAV Datei ausgewählt // Nit der Taste Exit wird die Sitzung beendet ///////////////////////////////////////////////////////////////////////////// mclose('all'); clear; close(); z=struct('pfad','','datei','','pfaddatei','','info','','laufzeit',0,'samplerate',0,'ueberdeckung',0,'posi',0,'start1',0,'start2',0,'wa',0,'mono',0,'ff',0,'power',0,'aaff',0,'aapp',0,'fo1',250,'spiel1',0,'spiel2',0,'a1',0,'a2',0,'a3',0,'b1',0,'b2',0,'b3',0,'h1',0,'graph1',0,'graph2',0,'f',0,'cm',0,'kanal',1,'verstaerkung',1,'darst',1,'xa','','n',0,'i',0,'u',0,'p_1',0,'p_2',0,'k_1',0,'k_2',0,'v_1',0,'v_2',0,'u_1',0,'u_2',0,'rot',[16. -20.]); ///////////////////////////////////////////////////////////////////////////// function [z]=sub_neu(z) // NEUE DATEI AUFRUFEN // WAV Datei auswählen [z.datei,z.pfad]=uigetfile('*.wav','D:\Mdaten'); //WAV Datei wählen if isequal(z.datei,''); //Ist eine Date gewählt? else z.pfaddatei=z.pfad+'\'+z.datei; //Vollständigen Pfad erstellen z.info = wavread(z.pfaddatei,'info'); //WAV Info`s laden disp('//////////////////////////////////////////////////////////') disp('WAV-Datei: '+z.pfaddatei); //Ausgabe vollständiger Pfad disp('Kanäle: '+string(z.info(2))); //Ausgabe Anzahl der Kanäle disp('Samplerate: '+string(z.info(3))); //Ausgabe Samplerate disp('Dateilänge : '+string(z.info(8))); //Ausgabe Dateilänge disp('Laufzeit : '+string(z.info(8)/z.info(3))+' Sekunden'); //Laufzeit in Sek. disp('//////////////////////////////////////////////////////////') z.pfaddat=strsplit(z.pfaddatei,'.') z.laufzeit=floor(z.info(8)/z.info(3)); // lauzeit in sekunden set(se_dat_a,'string',z.pfaddatei); xtitle(strsplit(z.datei,'.')(1),'','',''); // FFT Window z.w=window('hn',48000); // fft window //VOREINSTELLUNGEN //POSITION set(se_pos_c,'value',1); set(se_pos_c,'max',z.laufzeit); set(se_pla_b,'value',1); set(se_pla_b,'max',z.laufzeit-10); z.posi=1; //KANALWAHL set(se_kan_b,'value',1); set(se_kan_b,'max',z.info(2)); //VERSTÄRKUNG set(se_ver_c,'value',1); // ÜBERDECKUNG set(se_ueb_g,'value',1); z.u_2=48000; //LAUFZEIT set(se_lau_b,'string',string(z.laufzeit)); // [z]=sub_ein_1(z);// [z]=sub_ein_2(z);// // [z]=rechenwerk1(z); // [z]=farbwerk(z) // [z]=malen0(z); // [z]=achsenx1(z) end endfunction ///////////////////////////////////////////////////////////////////////////// //Einstellungen übernehmen und berechnen function [z]=sub_ein(z) // berechnen if z.datei=='' then else [z]=sub_ein_1(z);// [z]=sub_ein_2(z);// // [z]=rechenwerk1(z); // [z]=farbwerk(z) // [z]=malen0(z); // [z]=achsenx1(z) end endfunction ///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // Rechenwerk1 function [z]=rechenwerk1(z) //RECHENWERK1 // 480 BERECHNUNGEN DURCHFÜHREN winH=waitbar('Fast Fourier Transformation und Power Spektrum wird 480 mal berechnet.'); z.start1=z.posi*48000-47999; z.start2=z.posi*48000; i=1; while i<481 waitbar(i/480,winH); //testen if z.start1z.info(8) then // auffüllen z.wa=wavread(z.pfaddatei,[z.start1 z.info(8)]); z.mono=z.wa(z.kanal,:); z.mono=z.mono.*z.verstaerkung d=size(z.mono,2); z.mono(d+1:48000)=zeros(1:48000-d); end // if z.start1>z.info(8) & z.start2>z.info(8) then // nullen z.mono(1:48000)=zeros(1:48000); end // [z]=rechenwerk2(z) z.aaff(i,1:500)=z.ff(1:500); // fft daten z.aapp(i,1:500)=z.power(1:500); // leistungsdaten z.start1=z.start1+z.ueberdeckung; z.start2=z.start2+z.ueberdeckung; i=i+1 end close(winH); // endfunction ///////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// // Rechenwerk2 function [z]=rechenwerk2(z) //RECHENWERK1 // FFT BERECHNEN POWER BERECHNEN z.mono=z.mono.*z.w;//windows anwenden z.ff=fft(z.mono,-1,'nonsymmetric'); //Die FFT wird berechnen z.ff=z.ff/48000; z.ff=abs(z.ff(2:48000)); // powerspektrum z.power=abs(z.ff.* conj(z.ff)); //Powerspektrum der FFT berechnen z.power=z.power(1:500); z.ff=z.ff(1:500); // normieren z.ff=z.ff*4000;// normieren z.power=z.power*4000;// normieren endfunction ///////////////////////////////////////////////////////////////////////////// function [z]=farbwerk(z) // farbwerk aufbauen fx=1:1:480; //X-Achse zum ploten aufbauen fy=1:1:500; //Y-Achse zum ploten aufbauen // [z.a1,z.a2,z.a3]=genfac3d(fx,fy,z.aaff(fx,fy)); //Plot fft [z.b1,z.b2,z.b3]=genfac3d(fx,fy,z.aapp(fx,fy)); //Plot leistung // endfunction ///////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// // EINSTELLUNGEN VORWAHL function [z]=sub_ein_1(z) //EINSTELLUNGEN //POSITION z.p_1=se_pos_c.value; //position übernehmen //KANALWAHL z.k_1=se_kan_b.value; // kanal übernehmen //VERSTÄRKUNG z.v_1=se_ver_c.value; // verstärkung übernehmen // ÜBERDECKUNG select 1 //überdeckung übernehmen case se_ueb_b.value then z.u_1=1500; case se_ueb_c.value then z.u_1=3000; case se_ueb_d.value then z.u_1=6000; case se_ueb_e.value then z.u_1=12000; case se_ueb_f.value then z.u_1=24000; case se_ueb_g.value then z.u_1=48000; end endfunction //////////////////////////////////////////////////////////////////////////// // EINSTELLUNGEN ÜBERNEHMEN function [z]=sub_ein_2(z) //EINSTELLUNGEN ÜBERNEHMEN z.p_2=z.p_1; z.k_2=z.k_1; z.v_2=z.v_1; z.u_2=z.u_1; //POSITION set(se_pos_b,'value',z.p_2); z.posi=z.p_2; z.start1=(48000*z.p_2-1)+1; z.start2=z.start1+48000; //KANAL set(se_kan_c,'string',string(z.k_2)); z.kanal=z.k_2; //VERSTÄRKUNG set(se_ver_b,'string',string(z.v_2)); z.verstaerkung=z.v_2; //ÜBERDECKUNG set(se_ueb_bb,'string',''); set(se_ueb_cc,'string',''); set(se_ueb_dd,'string',''); set(se_ueb_ee,'string',''); set(se_ueb_ff,'string',''); set(se_ueb_gg,'string',''); select z.u_2 case 1500 then set(se_ueb_bb,'string','X'); case 3000 then set(se_ueb_cc,'string','X'); case 6000 then set(se_ueb_dd,'string','X'); case 12000 then set(se_ueb_ee,'string','X'); case 24000 then set(se_ueb_ff,'string','X'); case 48000 then set(se_ueb_gg,'string','X'); end z.ueberdeckung=z.u_2; endfunction //////////////////////////////////////////////////////////////////////////// function [z]=malen0(z) // select z.darst case 1 [z]=malen1(z) case 2 [z]=malen2(z) end endfunction ///////////////////////////////////////////////////////////////////////////// function [z]=malen1(z) // graph 1 if z.graph1 ==0 then else delete(z.graph1);z.graph1=0; end; z.h1.visible = "on"; sca(z.h1); plot3d1(z.a1,z.a2,list(z.a3,z.a3),theta=-20,alpha=16,flag=[-1,2,3]) z.graph1=gce(); z.h1.axes_visible = ["on","on","on"]; //////////////////////////////////////////////////////////////////////////// endfunction ///////////////////////////////////////////////////////////////////////// function [z]=malen2(z) // graph 1 if z.graph1 ==0 then else delete(z.graph1);z.graph1=0; end; z.h1.visible = "on"; sca(z.h1); plot3d1(z.b1,z.b2,list(z.b3,z.b3),theta=-20,alpha=16,flag=[-1,2,3]) z.graph1=gce(); z.h1.axes_visible = ["on","on","on"]; //////////////////////////////////////////////////////////////////////////// endfunction //////////////////////////////////////////////////////////////////////////// function[z]=savgif1(z) // if z.pfaddatei=='' then else zd=getdate(); zs=z.pfaddat(1)+'_Datum_'+string(zd(1))+'_'+string(zd(2))+'_'+string(zd(6))+'_'+string(zd(7))+'_'+string(zd(8))+'_'+string(zd(9))+'.gif'; xs2gif(gcf(),zs); end endfunction //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// function [z]=abspielen(z) // if z.datei=='' then else st1=se_pla_b.value*48000-47999; st2=st1+480000; z.spiel1=wavread(z.pfaddatei,[st1 st2]); z.spiel2=z.spiel1(z.kanal,:); z.spiel2=z.spiel2*z.verstaerkung; playsnd(z.spiel2,48000); end endfunction /////////////////////////////////////////////////////////////////////////// function [z]=achsenx1(z) // //z.xa=["0","5","10","15","20","25","30",'35','40','45','50','55','60'] i=z.u_2; select i case 1500 //15 z.xa=[string(z.posi),string(z.posi+1),string(z.posi+2),string(z.posi+3),string(z.posi+4),string(z.posi+5),string(z.posi+6),string(z.posi+7),string(z.posi+8),string(z.posi+9),string(z.posi+10),string(z.posi+11),string(z.posi+12),string(z.posi+13),string(z.posi+14),string(z.posi+15)]; z.h1.x_ticks=tlist(['locations','labels'],[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,480],[z.xa]); ////////// z.h1.z_ticks=tlist(['locations','labels'],[0,100,200,300,400,500,600,700,800,900,1000],["0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"+' V= '+string(z.verstaerkung)]); // set(se_pla_b,'value',z.posi); // laufzeitwert value in formular play spinner case 3000 //30 z.xa=[string(z.posi),string(z.posi+5),string(z.posi+10),string(z.posi+15),string(z.posi+20),string(z.posi+25),string(z.posi+30)]; z.h1.x_ticks=tlist(['locations','labels'],[0,80,160,240,320,400,480],[z.xa]); ////////// z.h1.z_ticks=tlist(['locations','labels'],[0,100,200,300,400,500,600,700,800,900,1000],["0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"+' V= '+string(z.verstaerkung)]); // set(se_pla_b,'value',z.posi); // laufzeitwert value in formular play spinner case 6000 //60 z.xa=[string(z.posi),string(z.posi+5),string(z.posi+10),string(z.posi+15),string(z.posi+20),string(z.posi+25),string(z.posi+30),string(z.posi+35),string(z.posi+40),string(z.posi+45),string(z.posi+50),string(z.posi+55),string(z.posi+60)]; z.h1.x_ticks=tlist(['locations','labels'],[0,40,80,120,160,200,240,280,320,360,400,440,480],[z.xa]); ////////// z.h1.z_ticks=tlist(['locations','labels'],[0,100,200,300,400,500,600,700,800,900,1000],["0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"+' V= '+string(z.verstaerkung)]); // set(se_pla_b,'value',z.posi); // laufzeitwert value in formular play spinner case 12000 //120 z.xa=[string(z.posi),string(z.posi+10),string(z.posi+20),string(z.posi+30),string(z.posi+40),string(z.posi+50),string(z.posi+60),string(z.posi+70),string(z.posi+80),string(z.posi+90),string(z.posi+100),string(z.posi+110),string(z.posi+120)]; z.h1.x_ticks=tlist(['locations','labels'],[0,40,80,120,160,200,240,280,320,360,400,440,480],[z.xa]); ////////// z.h1.z_ticks=tlist(['locations','labels'],[0,100,200,300,400,500,600,700,800,900,1000],["0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"+' V= '+string(z.verstaerkung)]); // set(se_pla_b,'value',z.posi); // laufzeitwert value in formular play spinner case 24000 //240 z.xa=[string(z.posi),string(z.posi+20),string(z.posi+40),string(z.posi+60),string(z.posi+80),string(z.posi+100),string(z.posi+120),string(z.posi+140),string(z.posi+160),string(z.posi+180),string(z.posi+200),string(z.posi+220),string(z.posi+240)]; z.h1.x_ticks=tlist(['locations','labels'],[0,40,80,120,160,200,240,280,320,360,400,440,480],[z.xa]); ////////// z.h1.z_ticks=tlist(['locations','labels'],[0,100,200,300,400,500,600,700,800,900,1000],["0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"+' V= '+string(z.verstaerkung)]); // set(se_pla_b,'value',z.posi); // laufzeitwert value in formular play spinner case 48000 //480 //z.xa=[string(z.posi-1),string(z.posi+79),string(z.posi+159),string(z.posi+239),string(z.posi+319),string(z.posi+399),string(z.posi+479)]; z.xa=[string(z.posi),string(z.posi+30),string(z.posi+60),string(z.posi+90),string(z.posi+120),string(z.posi+150),string(z.posi+180),string(z.posi+210),string(z.posi+240),string(z.posi+270),string(z.posi+300),string(z.posi+330),string(z.posi+360),string(z.posi+390),string(z.posi+420),string(z.posi+450),string(z.posi+480)]; z.h1.x_ticks=tlist(['locations','labels'],[0,30,60,90,120,150,180,210,240,270,300,330,360,390,420,450,480],[z.xa]); ////////// z.h1.z_ticks=tlist(['locations','labels'],[0,100,200,300,400,500,600,700,800,900,1000],["0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"+' V= '+string(z.verstaerkung)]); // set(se_pla_b,'value',z.posi); // laufzeitwert value in formular play spinner end [z]=sub_was(z) endfunction //////////////////////////////////////////////////////////////////////// // WASSERFALL function [z]=sub_was(z) // WASSERFALL if se_was_a.value==1 then z.rot=z.h1.rotation_angles; z.h1.rotation_angles=[0 270] else z.h1.rotation_angles=z.rot; end endfunction ///////////////////////////////////////////////////////////////////////// // FARBTABELLEN function [z]=sub_far(z) // Farbtabellen select 1 case se_far_a.value then [z]=farbmanager1(z) case se_far_b.value then [z]=farbmanager2(z) case se_far_c.value then [z]=farbmanager3(z) end endfunction //FARBMASNAGEMENT function [z]=farbmanager1(z) // FARBE2 f=jetcolormap(1000); for i=1:1:1000 d(i)=floor(log(i)*144); end d(1)=1; for i=1:1:1000 nf(i,:)=f(d(i),:); end z.cm=nf; cmm=[0 0 0.2] z.cm(100,:)=cmm; z.cm(200,:)=cmm; z.cm(300,:)=cmm; z.cm(400,:)=cmm; z.cm(500,:)=cmm; z.cm(600,:)=cmm; z.cm(700,:)=cmm; z.cm(800,:)=cmm; z.cm(900,:)=cmm; //z.cm=jetcolormap(1000) z.f.color_map = z.cm; /////////////////////////////////////////// endfunction ////////////////////////////////////////////////////////////////////////////// //FARBMASNAGEMENT function [z]=farbmanager2(z) // FARBE1 Das Original for i=1:1200 cm(i,:)=[0 0 0] end cm(1:150,:)=jetcolormap(150) for i=130:1200 cm(i,:)=[1 0.2 0] end z.cm=cm(30:1030,:); cmm=[0 0 0.2] z.cm(100,:)=cmm; z.cm(200,:)=cmm; z.cm(300,:)=cmm; z.cm(400,:)=cmm; z.cm(500,:)=cmm; z.cm(600,:)=cmm; z.cm(700,:)=cmm; z.cm(800,:)=cmm; z.cm(900,:)=cmm; //z.cm=jetcolormap(1000) z.f.color_map = z.cm; /////////////////////////////////////////// endfunction ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //FARBMASNAGEMENT function [z]=farbmanager3(z) // FARBE2 f=parulacolormap(1000); for i=1:1:1000 d(i)=floor(log(i)*101); end d(1)=1; for i=1:1:1000 nf(i,:)=f(d(i),:); end z.cm=nf; cmm=[0 0 0.2] z.cm(100,:)=cmm; z.cm(200,:)=cmm; z.cm(300,:)=cmm; z.cm(400,:)=cmm; z.cm(500,:)=cmm; z.cm(600,:)=cmm; z.cm(700,:)=cmm; z.cm(800,:)=cmm; z.cm(900,:)=cmm; //z.cm=jetcolormap(1000) z.f.color_map = z.cm; /////////////////////////////////////////// endfunction ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////// S T A R T ////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Formular erstellen z.f=figure('position',[10,10,1400,900]); //z.f.axes_size = [1800,874] z.f.auto_resize = "on" z.f.viewport = [0,0] z.f.figure_name = "WAV-3D-Analyse (Laufzeit 15 bis 480 Sekunden)" //z.f.figure_id = 0 z.f.info_message = "" //cm=load('D:\Scilab\cm.dat') //z.cm=cm; //z.f.color_map = z.cm; z.f.pixel_drawing_mode = "copy" z.f.anti_aliasing = "off" z.f.immediate_drawing = "on" z.f.background = -2 z.f.visible = "on" z.f.rotation_style = "unary" //z.f.event_handler = "" //z.f.event_handler_enable = "off" z.f.user_data = [] z.f.resizefcn = "" z.f.closerequestfcn = "" z.f.resize = "on" //z.f.toolbar_visible = "on" z.f.dockable = "on" //z.f.layout = "none" //z.f.layout_options = "OptNoLayout" z.f.default_axes = "on" z.f.icon = "" z.f.tag = "" //'0 % 480s|50 % 240s|75 % 120s|87,5 % 60s|93,75 % 30s' // controls in das Formular einbauen ////////////////////////////////////voreinstellungen // LAUFZEIT se_lau_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 860 70 15],'string','Laufzeit Sek.'); se_lau_b=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 845 70 15],'string','0'); // KANALZAHL se_kan_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 820 70 15],'string','Kanalzahl'); se_kan_b=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 805 70 15],'string','1'); // POSITION se_pos_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 780 70 15],'string','Position Sek.'); se_pos_b=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 765 70 15],'string','1'); se_pos_c=uicontrol(z.f,"style","spinner", 'position', [1310 745 70 20],'HorizontalAlignment','center','VerticalAlignment','middle','min',1,'max',1,'SliderStep',[1,10],'Title_position','top','callback','[z]=sub_ein_1(z)'); z.posi=se_pos_c.value // KANAL se_kan_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 720 70 15],'string','Kanalwahl'); se_kan_b=uicontrol(z.f,"style","spinner", 'position', [1340 700 40 20],'HorizontalAlignment','center','VerticalAlignment','middle','min',1,'max',1,'SliderStep',[1,10],'Title_position','top','callback','[z]=sub_ein_1(z)'); se_kan_c=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 700 30 20],'string','1'); // VERSTÄRKUNG se_ver_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 675 70 15],'string','Verstärkung'); se_ver_b=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 655 30 20],'string','1'); se_ver_c=uicontrol(z.f,"style","spinner", 'position', [1340 655 40 20],'HorizontalAlignment','center','VerticalAlignment','middle','min',1,'max',10,'SliderStep',[1,10],'Title_position','top','callback','[z]=sub_ein_1(z)'); // ÜBERDECKUNG //1500/15s 3000/30s 6000/60s 12000/120s 24000/240s 48000/240s' se_ueb_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 630 70 15],'string','Überdeckung'); se_ueb_b=uicontrol(z.f,"style","radiobutton",'groupname','ueb','HorizontalAlignment','left','value',0,'position', [1325 610 55 20],'string','1500','callback','[z]=sub_ein_1(z)'); se_ueb_bb=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 610 15 20],'string',''); se_ueb_c=uicontrol(z.f,"style","radiobutton",'groupname','ueb','HorizontalAlignment','left','position', [1325 590 55 20],'string','3000','callback','[z]=sub_ein_1(z)'); se_ueb_cc=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 590 15 20],'string',''); se_ueb_d=uicontrol(z.f,"style","radiobutton",'groupname','ueb','HorizontalAlignment','left','position', [1325 570 55 20],'string','6000','callback','[z]=sub_ein_1(z)'); se_ueb_dd=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 570 15 20],'string',''); se_ueb_e=uicontrol(z.f,"style","radiobutton",'groupname','ueb','HorizontalAlignment','left','position', [1325 550 55 20],'string','12000','callback','[z]=sub_ein_1(z)'); se_ueb_ee=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 550 15 20],'string',''); se_ueb_f=uicontrol(z.f,"style","radiobutton",'groupname','ueb','HorizontalAlignment','left','position', [1325 530 55 20],'string','24000','callback','[z]=sub_ein_1(z)'); se_ueb_ff=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 530 15 20],'string',''); se_ueb_g=uicontrol(z.f,"style","radiobutton",'groupname','ueb','HorizontalAlignment','left','position', [1325 510 55 20],'string','48000','callback','[z]=sub_ein_1(z)'); se_ueb_gg=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','center' ,'backgroundcolor',[1 0.8 0.8],'position', [1310 510 15 20],'string',''); se_ueb_g.value=1; se_ueb_gg.string='X'; // EINSTELLUNG se_sta_a=uicontrol(z.f,"style","pushbutton","Relief", "raised",'HorizontalAlignment','center' ,'position', [1310 485 70 20],'string','Einstellung','callback','[z]=sub_ein(z)'); // NEU se_neu_a=uicontrol(z.f,"style","pushbutton","Relief", "raised",'position', [1310 450 70 20],'string','Neu','callback','[z]=sub_neu(z)'); // EXIT se_exi_a=uicontrol(z.f,"style","pushbutton","Relief", "raised",'position', [1310 415 70 20],'string','Exit','callback','close'); // FFT / POWER se_ffpo_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 380 70 15],'string','FFT / Power'); se_ffpo_b=uicontrol(z.f,"style","radiobutton",'groupname','darst','HorizontalAlignment','left','position', [1310 360 70 20],'string','FFT','callback','z.darst=1;[z]=malen0(z)'); se_ffpo_c=uicontrol(z.f,"style","radiobutton",'groupname','darst','HorizontalAlignment','left','position', [1310 340 70 20],'string','Power','callback','z.darst=2;[z]=malen0(z)'); se_ffpo_b.value=1; // ZOOM se_zoo_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 310 70 15],'string','X - Achse'); se_zoo_b=uicontrol(z.f,"style","spinner", 'position', [1310 290 70 20],'HorizontalAlignment','center','VerticalAlignment','middle','min',1,'max',250,'SliderStep',[1,10],'Title_position','top','callback','z.h1.zoom_box=[0,0,480,se_zoo_b.value]'); se_zoo_b.value=250; ///////////////////////////////////////////////////////////////////////////////////////////////// // SAVEGRAFIK se_sav_a=uicontrol(z.f,"style","pushbutton","Relief", "raised",'HorizontalAlignment','center' ,'position', [1310 260 70 20],'string','Save Grafik','callback','[z]=savgif1(z)'); // POSITION PLAY se_pla_a=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 230 70 15],'string','Play Position'); se_pla_b=uicontrol(z.f,"style","spinner", 'position', [1310 210 70 20],'HorizontalAlignment','center','VerticalAlignment','middle','min',1,'max',1,'SliderStep',[1,10],'Title_position','top','callback',''); z.spiel1=se_pla_b.value se_pla_c=uicontrol(z.f,"style","pushbutton","Relief", "raised", 'position', [1310 180 70 20],'string','Play 10 Sek.','callback','[z]=abspielen(z)'); // FARBTABELLEN se_far=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 150 70 15],'string','Farbtabellen'); se_far_a=uicontrol(z.f,"style","radiobutton",'groupname','far','HorizontalAlignment','left','value',1,'position', [1310 130 70 20],'string','Farben 1','callback','[z]=sub_far(z)'); se_far_b=uicontrol(z.f,"style","radiobutton",'groupname','far','HorizontalAlignment','left','value',0,'position', [1310 110 70 20],'string','Farben 2','callback','[z]=sub_far(z)'); se_far_c=uicontrol(z.f,"style","radiobutton",'groupname','far','HorizontalAlignment','left','value',0,'position', [1310 90 70 20],'string','Farben 3','callback','[z]=sub_far(z)'); //WASSERFALL se_was=uicontrol(z.f,"style","text",'HorizontalAlignment','center' ,'backgroundcolor',[0.1 1 0.8],'position', [1310 60 70 15],'string','Wasserfall'); se_was_a=uicontrol(z.f,"style","radiobutton",'HorizontalAlignment','left','value',0,'position', [1310 40 70 20],'string','Ein / Aus','callback','[z]=sub_was(z)'); // DATEIANZEIGE se_dat_a=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','left' ,'position', [50 10 900 20],'string',''); se_dat_b=uicontrol(z.f,"style","text",'FontWeight','bold','HorizontalAlignment','left' ,'position', [1000 10 280 20],'string',' Nur für Wav Dateien mit 48000 Hz Samplerate.'); // LINIEN NEBEN DEN SCHALTELEMENTEN se_lin_a=uicontrol(z.f,"style","text",'backgroundcolor',[1 0.8 0.8],'position', [1380 805 5 70],'string',''); se_lin_b=uicontrol(z.f,"style","text",'backgroundcolor',[0.1 1 0.8],'position', [1380 485 5 310],'string',''); se_lin_d=uicontrol(z.f,"style","text",'backgroundcolor',[0.1 1 0.8],'position', [1380 180 5 65],'string',''); //////////////////////////////////////////////////////////// [z]=achsenx1(z) //////////////////////////////////////garphicfenster einbauen z.h1 = newaxes(); // z.h1.axes_bounds = [-0.05,-0.05,1.17,1.05]; ///////////////////////////////////////////////beschriftung x achse /////////////////////////////////////////////// sca(z.h1) z.h1.visible = "on" z.h1.axes_visible = ["on","on","on"] z.h1.axes_reverse = ["on","off","off"] z.h1.grid = [1,1,1] z.h1.grid_position = "background" z.h1.grid_thickness = [1,1,1] z.h1.grid_style = [1,1,1] z.h1.x_location = "bottom" z.h1.y_location = "left" z.h1.auto_ticks = ["off","off","off"] z.h1.z_ticks=tlist(['locations','labels'],[0,100,200,300,400,500,600,700,800,900,1000],["0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1"+' V= '+string(z.verstaerkung)]); z.h1.y_ticks=tlist(['locations','labels'],[0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250],["0","10","20","30","40","50","60","70","80","90","100","110","120","130","140","150","160","170","180","190","200","210","220","230","240","250"]); z.xa=[string(z.posi),string(z.posi+30),string(z.posi+60),string(z.posi+90),string(z.posi+120),string(z.posi+150),string(z.posi+180),string(z.posi+210),string(z.posi+240),string(z.posi+270),string(z.posi+300),string(z.posi+330),string(z.posi+360),string(z.posi+390),string(z.posi+420),string(z.posi+450),string(z.posi+480)]; z.h1.x_ticks=tlist(['locations','labels'],[0,30,60,90,120,150,180,210,240,270,300,330,360,390,420,450,480],[z.xa]); //z.h1.x_ticks=tlist(['locations','labels'],[0,40,80,120,160,200,240,280,320,360,400,440,480],["0","5","10","15","20","25","30",'35','40','45','50','55','60']); //z.h1.x_ticks=tlist(['locations','labels'],[0,40,80,120,160,200,240,280,320,360,400,440,480],[z.xa]); z.h1.ticks_format = ["","",""] z.h1.ticks_st = [1,1,1;0,0,0] z.h1.box = "back_half" z.h1.filled = "on" z.h1.sub_ticks = [9,9,9] z.h1.font_style = 6 z.h1.font_size = 2 z.h1.font_color = -1 z.h1.fractional_font = "off" z.h1.title.font_size=2; //z.h1.title.text=z.pfaddatei; z.h1.x_label.font_size=2; z.h1.x_label.text="Sekunden"; z.h1.x_label.visible="on"; z.h1.y_label.font_size=2; z.h1.y_label.text="Frequenz"; z.h1.y_label.visible="on"; z.h1.z_label.font_size=2; z.h1.z_label.text="Amplitude"; z.h1.z_label.visible="on"; //z.h1.legend=z.pfaddatei; z.h1.isoview = "off" z.h1.cube_scaling = "on" z.h1.view = "3d" z.h1.rotation_angles = [10,-10] z.h1.log_flags = "nnn" z.h1.tight_limits = ["on","on","on"] z.h1.zoom_box = [] z.h1.auto_margins = "off" z.h1.margins = [0.07,0.165,0.08,0.11] z.h1.axes_bounds = [-0.05,-0.05,1.17,1.05] z.h1.auto_clear = "off" z.h1.auto_scale = "off" z.h1.hidden_axis_color = 4 z.h1.hiddencolor = 4 z.h1.line_mode = "on" z.h1.line_style = 1 z.h1.thickness = 1 z.h1.mark_mode = "off" z.h1.mark_style = 0 z.h1.mark_size_unit = "tabulated" z.h1.mark_size = 0 z.h1.mark_foreground = -1 z.h1.mark_background = -2 z.h1.foreground = -1 z.h1.background = -2 z.h1.arc_drawing_method = "lines" z.h1.clip_state = "off" //z.h1.clip_box = [] z.h1.user_data = [] z.h1.tag = "" zh(1,3)=0;// Amplitude zh(2,3)=1000;// Amplitude zh(1,2)=0;// Frequenz zh(2,2)=250;// Frequenz zh(1,1)=0;// Zeit zh(2,1)=480;//Zeit z.h1.data_bounds =zh; ///////////////////////////////////////////////////////////////////////// [z]=sub_far(z) ////////////////////////////////////////////////////////////////////////// ////farbe //for i=1:1200 // cm(i,:)=[0 0 0] //end //cm(1:150,:)=jetcolormap(150) //for i=130:1200 // cm(i,:)=[1 0.2 0] //end //z.cm=cm(30:1030,:); //cmm=[0 0 0.2] //z.cm(100,:)=cmm; //z.cm(200,:)=cmm; //z.cm(300,:)=cmm; //z.cm(400,:)=cmm; //z.cm(500,:)=cmm; //z.cm(600,:)=cmm; //z.cm(700,:)=cmm; //z.cm(800,:)=cmm; //z.cm(900,:)=cmm; ////z.cm=jetcolormap(1000) //z.f.color_map = z.cm; ///////////////////////////////////////////