Probability Density Function ??
1 回表示 (過去 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...
0 件のコメント
回答 (1 件)
Dimitris Kalogiros
2019 年 9 月 30 日
First you have to import data from your excel file
After that, you can calculate your PDF function, following this example:
clear; clc;
%data
x=randn(1,50000);
%calulation of PDF
[pdfValues,edges] = histcounts(x, 'Normalization', 'probability');
xIntervalCenters=(1/2)*(edges(1:end-1)+edges(2:end));
pdfValues=pdfValues/(edges(2)-edges(1));
%plot Probability Density Function
figure;
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!