3D Normal distribution plot for 2 random variable

3 views (last 30 days)
Dear Support and collegues
Please see attachment.
Can matab do 3D plot for Normal distribution with 2 random variable ?
First,
How to define Normal distribution with 2 random variable
For, one random varialbe, Nomral distribution is defined, y=pdf('Normal',x,0,1)
Second,
How to plot it in 3D ?
Thank you.
Gunmo

Answers (1)

Luna
Luna on 8 Jan 2019
Hello Gun Gu,
You can use surf function to do that plot.
Here is the link: surf
Also you can look at below function in fileexchange (Create your x and y vectors, calculate your z with the function you have given). Call vecsurf with 3 vectors, x,y,z.
Demo 6 and 7 suits for your case.
Here is the link: vecsurf

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!