On 9/25/2012 11:08 PM, Elnaz wrote:
...
>
> a) This should do it:
> ber = berawgn(-2:10,'oqpsk','nondiff');
> pl =[0.886482908609522 0.886482908609522 0.886482908609522
> 0.886482908609522 0.886482908609522 0.886482908609522 0.886482908609522
> 0.886482908609522 0.886482908609522 0.886482908609522 0.886482908609522
> 0.886482908609522 0.166645626439589];
> pu =[1 1 1 1 1 1 1 1 1 1 1 1 0.478761210116602];
>
> errorbar(-2:10,10*log10(ber),pl,pu);
> set(gca,'yscale','log');
>
> b&c) I expect to get a curve with error bars as this one:
> errorbar(-2:10,10*log10(ber),pl,pu);
> ber = [0.13 0.10 0.078
> 0.056 0.037 0.022
> 0.012 0.0059 0.0023
> 0.00077 0.00019 3.36e-05 3.87e-06];
OK, your expectations are out of line w/ reality in expecting anything
at all like that w/ simply changing the linear axis to log...
Look at the values you passed errorbar()...
>> [ber+pu ber-pl]
ans =
1.1306 -0.7554
1.1037 -0.7823
1.0786 -0.8074
1.0560 -0.8300
1.0375 -0.8485
1.0228 -0.8632
1.0125 -0.8735
1.0059 -0.8801
1.0024 -0.8836
1.0008 -0.8852
1.0002 -0.8858
1.0000 -0.8860
1.0000 -0.4800
>>
What's log10(negative value) ??? I'm not familiar w/ the Wilson score
interval altho the code looks like +/-2Z but clearly returning a
negative value is in error (as I presume is >1).
Oh, just had a thought--perhaps the reason the dB plot looks reasonable
is that the error score is already in dB and by using errorbar() w/ the
ber value and it you've mixed metaphors, so to speak. Either way,
something isn't kosher when you get the above limits...
If you want the scale in dB then you'll have to compute the dB
transformation--as your argument shows, it isn't _just_ the log scale
change.
Changing scale on errorbar() isn't "messed up"; it's doing what it's
asked to do. It's just that isn't what you want/need.
--