フィルターのクリア

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

1 回表示 (過去 30 日間)
Beibit Sautbek
Beibit Sautbek 2016 年 7 月 21 日
コメント済み: Geoff Hayes 2016 年 7 月 21 日
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 件のコメント
Geoff Hayes
Geoff Hayes 2016 年 7 月 21 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDirected Graphs についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by