-3

I have a figure like x axis Bit Error Rate and y axis Data Rate. And I want to find minimum Bit Error Rate and maximum Data rate in this figure. Namely I want to do thing that in this figure there are 18 points and I want to find optimal result but I cannot it ?

enter image description here

4
  • 1
    What issues do you face? Please include some code to support your question. Commented Jan 26, 2022 at 14:04
  • I have Data rate array and Bit error rate array and this is the figure. I want to eliminate the worst data rate and bit error rate from this figure compared to others, I asked how can I write a code for this. Commented Jan 26, 2022 at 14:17
  • min(BitErrorRate), max(DataRate)? Commented Jan 26, 2022 at 14:25
  • Yes ı want to this.But you assume that Bit error rate is 0.000176742 and Data rate 3125 .this two values are together so ı cannot use min and max function because this time confusion occurs Commented Jan 26, 2022 at 14:31

1 Answer 1

0

I believe what you are asking is to find the optimal ratio between BitErrorRate and DataRate, in that case you need to calculate the ratio of BitErrorRate per DataRate and then find the min or max of that depending on whether you are looking for fewer or more BitErrorRate per DataRate. Assuming the BitErrorRate and BitRate are saved in arrays you could use code like this:

% Give some random numbers to illustrate functionality
BitErrorRate = [2 7 3 5 8 1];
DataRate = [1 3 4 2 6 5];

% Find the ratio of BitErrorRate per DataRate
ErrorRatio = BitErrorRate ./ BitRate;

% Optimal ratio with minimal errors per data rate and corresponding index
[MinError, MinIndex] = min(ErrorRatio);

% Print results in console
disp(['Optimal error rate ratio is ' num2str(ErrorRatio(MinIndex)) ...
      ' BitErrorRate per DataRate with a Bit Error Rate of ' ...
      num2str(BitErrorRate(MinIndex)) ' and a Bit Rate of ' ...
      num2str(BitRate(MinIndex)) '.']);

% Sort in ascending manner according to top row, below this is DataRate
SortedForDataRate = sortrows([DataRate;BitErrorRate;ErrorRatio]')';

fig = figure(1);
subplot(3,1,1)
plot(SortedForDataRate(1,:))
title('BitErrorRate')
subplot(3,1,2)
plot(SortedForDataRate(2,:))
title('DataRate')
subplot(3,1,3)
plot(SortedForDataRate(3,:))
title('ErrorRatio')
Sign up to request clarification or add additional context in comments.

5 Comments

You saved my life, thanks a lot. Apart from that, I actually had something else in mind: for example, there are 18 points in total in the figure, I want to be able to reduce these 18 points. If the bit error rate and data rate of one point is better than the other point, I will take this point and the bad one I won't take it, no, if the data rate of one point is better than the other point, but the bit error rate is bad, this will stay and I want to have it checked by all points.
I can write code about this code but ı can not find absolute result
You will have to think of a question you want me to answer because I'm not sure what I can help you with. I have added some code to help you sort your data and not lose the link between the two datapoints, this might help you visualize the data.
Than you very very much for your helping:)
You're welcome! If my answer helped you it would be nice if you mark it as solved, unless you have further questions, in which case i might be able to help you further.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.