MATLAB Answers

Probability Density Function ??

조회 수: 19(최근 30일)
gwangyeol baik
gwangyeol baik 2019년 9월 30일
답변: Dimitris Kalogiros 2019년 9월 30일
i have Excel data. there is two line. one is about time. an other is about velocity.
how cna i get Probability Density Function ?
could you help me? about code...


Dimitris Kalogiros
Dimitris Kalogiros 2019년 9월 30일
After that, you can calculate your PDF function, following this example:
clear; clc;
%calulation of PDF
[pdfValues,edges] = histcounts(x, 'Normalization', 'probability');
%plot Probability Density Function
plot(xIntervalCenters, pdfValues); grid on; zoom on;
xlabel('data value'); ylabel('pdf');
Of course, in the this example, I had to produce some data ( x=randn(1,50000) ). Instead of x , you can use your imported data.

Community Treasure Hunt

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

Start Hunting!

Translated by