How to call multiple functions that connected each other with a single GUI push button?
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Epri Pratiwi
 el 7 de Ag. de 2020
  
    
    
    
    
    Comentada: Epri Pratiwi
 el 7 de Ag. de 2020
            I have this m.file. It links to 4 function file. 
How to write the code under push button GUI, so that it will process a '1.wav' file, then play and store it as '1_ace_8.wav'?
clc;clear;close all;
[y, fs] = audioReadNCU();
[y, fs] = wavToPreprocWav(y, fs);
band = wavToElectrode(y, fs);
y = electrodeToWav(band, fs);
sound(y, fs);
audiowrite('1_ace_8.wav',y,fs);
0 comentarios
Respuesta aceptada
  Rik
      
      
 el 7 de Ag. de 2020
        Just put everything you want to happen in a single function.
And stop with the habit of including clc,clear all,close all. You obviously are not thinking about what that does, so don't include it.
Más respuestas (0)
Ver también
Categorías
				Más información sobre Function Creation en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!