MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayTo resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Asked by mary on 27 Dec 2012

i ran the same program twice in two cases to get the value of SNR & BER and i got two list of values for each .. how can i apply it in a runnable table plz?

*No products are associated with this question.*

Answer by Rick Rosson on 28 Dec 2012

Edited by Rick Rosson on 28 Dec 2012

Accepted answer

Maybe you can create an M x N matrix to store the result of M values of SNR for each of N experiments. So, for example, you could pre-allocate:

M = size(snr,2); N = ... errorCount = zeros(M,N); ... ... ber = errorCount/I; ... ...

HTH.

mary on 28 Dec 2012

I want to recall M different values of SNR and M different values for BER from two different programs. I want to use them to drow two curves

Rick Rosson on 29 Dec 2012

So that means N = 2, and you can use the method that I proposed in my answer above. Does that make sense to you? If not, what specifically is not clear?

Answer by Image Analyst on 27 Dec 2012

What is a "runnable table"? What does "apply" mean? If you want to save variables from a run of your program, you can use the save() function. If you need to recall them into another run of your program, you can use the load() function. If you want to have a table, you can use the uitable() function or GUIDE to create a grid/table. Beyond that, I have no more guesses about what you mean.

Show 1 older comment

Image Analyst on 28 Dec 2012

I don't have randsrc() so I can't run your program. You can use uitable() to create a table, then do something like

set(handleToYourTable, 'Data', yourMatrix);

mary on 28 Dec 2012

I want to recall M values of SNR and M values of BER from two different programs so this didn't work

Answer by Rick Rosson on 29 Dec 2012

Please take a look at this self-paced tutorial:

It will answer this question along with many others that you may have.

## 0 Comments