- For the scatter plot, you can use the “scatter” function: Scatter plot - MATLAB scatter - MathWorks India
- To overlay the density on top, you will have to extract the density information from the data using “ksdensity”: Kernel smoothing function estimate for univariate and bivariate data - MATLAB ksdensity - MathWorks India
- Use the “surf” command now to obtain a surface plot of the density information in 3D space: Surface plot - MATLAB surf - MathWorks India
Plot a stochastic process together with a density plot
3 ビュー (過去 30 日間)
古いコメントを表示
Consider a stochastic process X_t, for 0<t<1. I discretize the time interval (having t = 0.01, 0.02, 0.03..., 0.99), and obatain 100 realized paths for X_t. Now I have 100 "bivariate" data points with each point having coordinate (t, X_t). I want to have a graph with a scatter plot in the bottom illustrating these 100 points (the axis will be t and x), and a 3D density surface on top that shows me the density of my 100 realizations X_t at any given point t for t = 0.01, 0.02, 0.03..., 0.99. Please see attached for an example. I have searched how to do this but it seems like i can only find hist3 which plots a histogram of the density, however I want a surface.
Can anyone kindly help me with this?

0 件のコメント
回答 (1 件)
Joel
2023 年 6 月 5 日
Hi,
Here is a general idea about how you can try to achieve this. Please go through relevant attached documentation:
Note: Use the “hold on” command to overlay the density information on top of the scatter plot.
Hope this helps !!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Scatter Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!