Conditional density plots in Matlab

4 次查看(过去 30 天)
Ali
Ali 2022-12-1
回答: Muskan 2023-3-20
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.

回答(1 个)

Muskan
Muskan 2023-3-20
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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by