Conditional density plots in Matlab
8 views (last 30 days)
Show older comments
Is there an option to visualize the conditional relationship between two variables using a conditional density plot, in a similar manner as done in R using the cdplot command.
I have looked through the statistics toolbox provided by Matlab but cannnot seem to find any similar commands.
0 Comments
Answers (1)
Muskan
on 20 Mar 2023
Hi Ali,
As per my understanding, using the “ksdensity” function to estimate the data’s density and then using the “contour” or “contourf” function to produce the density plot, you may view the conditional density between two variables in a conditional density plot in MATLAB.
You may have a look at the following MATLAB documentation page for reference:
I hope the above information will be helpful in resolving your query.
Thanks,
Muskan
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!