Plotting in 3D: Probability Density Plots Over Time

4 ビュー (過去 30 日間)
Matlab2010
Matlab2010 2014 年 1 月 7 日
編集済み: Matlab2010 2014 年 1 月 7 日
There are many ways of plotting in 3D in matlab. I have got some reasonable results using the following method. This post is to enquire how other people might tackle the common problem of representing PDFs moving over time.
N = 1E4; %number of experiments, eg Monte Carlo
T = 3E3; %number of timestamps
wHat= randn(T,N); %at each point in time you get a distribution of probabilities.
ksData = NaN(T,N);
binVals = linspace(0,1, N); %assign the probabilities to one of these buckets
for t = 1: T
ksData(t,:) = ksdensity(wHat(t,:), binVals);
end
surf(1:T, binVals, ksData');
colormap jet;
shading interp;
colorbar;
view(-37.50, 30);
set(gca, 'XLIM', [0 T]);
set(gcf, 'color', 'white');
grid on;
This seems to give a decent visual representation of whats going on.
However, I am aware that I haven't smoothed across time, only across experiments.

回答 (0 件)

カテゴリ

Help Center および File ExchangeExploration and Visualization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by