Hi there,

SNR values are usually presented in dB. So you scale should be in
logarithmetic scale. Here you have to use semilogxy function instead of
plot(x,y), check the function with help.

To get smoother curves you suppose that you have two values of SNR:

1- the one with dB values SNR1=1,2,3,.....20,...

2-SNR2^((SNR1)/10)

in your Gaussian noise formula use the values of
SNR2 and then you will get smmother curves.

regards

khmaies

Hi!

Great to see the solution also, other wise most of the time, only problems
where seen & no solution, after long time. Thanks Heart to share the
solution.

Regards,

Sohaib.

*Heart To Heart <h...@yahoo.com>*
wrote:

`Hello,`

Thanks guys for your advice,
finally, it is done with just 3 commands below.

Cheers,

HTH

1. polycoefficient =
polyfit(EbN0db,log10(ber_itn+10^(-30)),2);

%Find the coefficents of a
polynomial of order 2

% to
approximate log10(ber) of each iteration

%10^(-30) to make ber_itn
non-zero

2. poly_ber =
10.^polyval(polycoefficient,EbN0db);

%Approximate log10(ber) of each
iteration using the above coefficents

3.
semilogy(EbN0db,poly_ber,'-',EbN0db,ber_itn,'+'); grid on

%plot both actual data and
approximated data

hold
on;khmaies ouahada <k...@gmail.com> wrote:

Hi there,

SNR
values are usually presented in dB. So you scale should be in logarithmetic
scale. Here you have to use semilogxy function instead of plot(x,y), check the
function with help.

To get smoother curves you suppose that you have two
values of SNR:

1- the one with dB values SNR1=1,2,3,.....20,...

2-SNR2^((SNR1)/10)

in your Gaussian noise formula use the values of SNR2
and then you will get smmother curves.

regards

khmaies

To

___________________________________________________________

If I
have 3 letters: H, R, T.

I can add E, A to have HEART,

I
can also add U to get
HURT.

But:

I'd rather have U and get HURT than having a HEART without
U__________________________________________________

/

`NEW! You can now post a message or access and search the archives of
this group on DSPRelated.com:`

http://www.dsprelated.com/groups/matlab/1.php

_____________________________________

Note: If you do a simple "reply"
with your email client, only the author of this message will receive your
answer. You need to do a "reply all" if you want your answer to be
distributed to the entire
group.

_____________________________________

About this
discussion group:

Archives:
http://www.dsprelated.com/groups/matlab/1.php

To Post: Send an
email to m...@yahoogroups.com

Other DSP Related Groups:
http://www.dsprelated.com/groups.php

__________________________________________________