How PDF and CDF work?

4 views (last 30 days)
Oliver Lestrange
Oliver Lestrange on 20 Aug 2020
Hi,
I need to make a pdf and cdf. I saw the documentation but I didn't understand how exactly can I used it.
I have power values. How can I make the cdf and pdf plot's with this values?
I am using that vector with the Power's values but in the plot appears a range absolutily nonsense. The power values are values between -140 and 10, and the values in the plot are like 0.1 ...
% --- Executes on button press in densityButton.
function densityButton_Callback(hObject, eventdata, handles)
% hObject handle to densityButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear handles.Antena handles.nAntena handles.Movel
i = handles.map.img(:,:,1)==255 & handles.map.img(:,:,2)==255 & ...
handles.map.img(:,:,3)==255;
Prx = handles.maxPrxArray;
minPower = round(handles.minPrx);
maxPower = round(handles.maxPrx);
eixoXX = minPower:maxPower;
size = length(Prx);
figure
plot(eixoXX,pdf('Normal',eixoXX))
grid on;
figure
plot(eixoXX, cdf('Normal', eixoXX))
grid on;
What I am doing wrong?
Thanks

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!