How to find a probability density function please?

I have the following system :
dxdt = A.*x.^2 ;
how can I find a PDF for this system for different values of A and t = 0:0.1:100?
Regards

回答 (1 件)

Torsten
Torsten 2015 年 5 月 11 日

0 投票

What do you want to be stochastic in the above ODE ?
Best wishes
Torsten.

9 件のコメント

Avan Al-Saffar
Avan Al-Saffar 2015 年 5 月 11 日
The parameter A to be A0*cos(t) , I want to find pdf for different A0.
Can you help me please?
Regards
Torsten
Torsten 2015 年 5 月 11 日
The pdf of what ? The pdf of the solution at a fixed time t ?
Best wishes
Torsten.
Avan Al-Saffar
Avan Al-Saffar 2015 年 5 月 11 日
Yes, please.
Regards
Torsten
Torsten 2015 年 5 月 11 日
Solve the ODE analytically, fix x(t=0) and t, generate random numbers for A0 and insert the random numbers in the analytical solution. This gives you a vector of random numbers for the result of your ODE at time t. Use hist to make a normed histogram of this solution vector to get the pdf.
Best wishes
Torsten.
Avan Al-Saffar
Avan Al-Saffar 2015 年 5 月 11 日
Many thanks for your help. Can you also inform me how to do it if I need to find pdf at different time please?
Regards Avan
Torsten
Torsten 2015 年 5 月 11 日
Yes, loop over different values for t and insert these values in the analytical solution. This will give you multiple result vectors, multiple histograms and thus multiple pdfs.
Best wishes
Torsten.
Avan Al-Saffar
Avan Al-Saffar 2015 年 5 月 11 日
Many thanks.
Regards
Avan
Avan Al-Saffar
Avan Al-Saffar 2015 年 5 月 11 日
But what is about the following commands please?
- ksdensity(x)
- [muhat,sigmahat] = normfit(x);
y = normpdf(x,muhat,sigmahat);
plot(x,y,'r')
- a = pdf('Normal',x,mu,sigma);
I found them while I was looking for some help through different websites.
Torsten
Torsten 2015 年 5 月 12 日
You can use ksdensity, but if you use enough random numbers for A0, a histogram will give you the same quality for the pdf.
Normfit, normpdf etc. can not be used because even if you assume that A0 is normally distributed, x(t,A0) usually won't.
You will have to find out what distribuion x(t,A0) follows if you assume a certain distribution type for A0.
Best wishes
Torsten.

この質問は閉じられています。

タグ

質問済み:

2015 年 5 月 11 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by