Want to run same script for 100 times without changing any variable and then taking the average of the output.
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Prashant Bhagat
 el 17 de Ag. de 2022
  
    
    
    
    
    Comentada: Prashant Bhagat
 el 18 de Ag. de 2022
            Hi all, I want to run the same script multiple times and then want to take the average of the results and plot them. Is there any way I can do that. I am new to MATLAB so if someone can suggest a simple would great. Thanks in advance.
0 comentarios
Respuesta aceptada
  David Hill
      
      
 el 17 de Ag. de 2022
        for k=1:100
    yourScript;
    Output(k)=y;%whatever variable that is the output
end
m=mean(Output);
plot(Output);
Más respuestas (0)
Ver también
Categorías
				Más información sobre Graphics Object Properties 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!

