Borrar filtros
Borrar filtros

How to make several run of m.file and report outputs in the figure?

1 visualización (últimos 30 días)
Beibit Sautbek
Beibit Sautbek el 21 de Jul. de 2016
Comentada: Geoff Hayes el 21 de Jul. de 2016
I have m.file as below. I have a matrix d, where values are randomly changed during the running of m.file.
I need to make 10 runs of m.file and to take 10 different results(Floss). Then taken different results should be represented in the Figure.
Figure should contain:: 10 results of Floss VS number of runs (which is 10).
Floss VS number of runs
I don't need loop function, because my real m.file is huge, and I have a lot of outputs which is connected between each other.
So I need to run my m.file several times, and record just certain output, and figure out my results in a graph
Could anyone help me?
My code in m.file:
d=rand(10,1);
fr=800; %(in Hz);
Floss=32.44+(20.*log10(d(:,1)))+(20*log10(fr));
  1 comentario
Geoff Hayes
Geoff Hayes el 21 de Jul. de 2016
Beibit - from the little code that you have shown, it appears that your m file is just a script. So I would change it to a function that returns the random numbers d and the Floss
function [d,Floss] = myFunction
so that you can call this function ten (or whatever) times and obtain the d and the Floss for each call.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Directed Graphs 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!

Translated by