|
|
Plotting a graph in simulink
Dear all,
I am building a MIMO model using simulink. The channel model is fading with AWGN block (with a particular value of Eb/N0), for each time I run the program, I have one BER result (on BER Display). Now I wanna plot a graph to show BER against Eb/N0, That means I need to calculate a range of BER corresponding to a range input Eb/N0. Now I have to do that manually, each time I get one pair of (BER, Eb/N0). How can I restore the result in a data file and plot the graph with only one time running the program.
I've just started to use simulink, could anyone helps me pls.
Thanks alot
|
|
0
|
|
|
|
Reply
|
Thanh
|
8/10/2010 1:21:05 PM |
|
"Thanh " <thanh_hoangtrungbk@yahoo.com> wrote in message <i3rjo1$ai1$1@fred.mathworks.com>...
> Dear all,
> I am building a MIMO model using simulink. The channel model is fading with AWGN block (with a particular value of Eb/N0), for each time I run the program, I have one BER result (on BER Display). Now I wanna plot a graph to show BER against Eb/N0, That means I need to calculate a range of BER corresponding to a range input Eb/N0. Now I have to do that manually, each time I get one pair of (BER, Eb/N0). How can I restore the result in a data file and plot the graph with only one time running the program.
>
> I've just started to use simulink, could anyone helps me pls.
> Thanks alot
I think you want to run the same model multiple times with different Eb/N0 values correct?
You can create a script to run the model from matlab. see the command
>>sim
Set the value of Eb/N0 as a variable in the workspace then get the output from either an output port or toWorkspace block.
You can then use standard MATLAB code to plot
If you only want to run the model once and you have the code that does the plot do the plotting in a post run callback function (i forget it's proper name)
|
|
0
|
|
|
|
Reply
|
neil
|
8/17/2010 3:02:05 AM
|
|
|
1 Replies
810 Views
(page loaded in 0.034 seconds)
|
|
|
|
|
|
|
|
|