Producing a distribution for categorical data

5 ビュー (過去 30 日間)
cwj2000
cwj2000 2020 年 8 月 25 日
コメント済み: cwj2000 2020 年 8 月 25 日
Hi,
I am relatively new to MATLAB, and to this point have been following tutorials slowly and effectively although came unstuck today.
In the following video, at around 37:00
the presenter uses the data he is extracted to produce a distribution. However as I understand it, my matlab package does not allow for the use of the function 'mpgdistribution()'. I don't fully understand how this function has been formed. I am looking for an alternative way of producing the same plot. I am capable of producing a histogram for MPG, but am unable to separate the data into two different distributions based on their category, (City/Highway).
Using R, I would use GGPlot. However, after around an hour of googling, Ive found no alternative.

採用された回答

Abdolkarim Mohammadi
Abdolkarim Mohammadi 2020 年 8 月 25 日
編集済み: Abdolkarim Mohammadi 2020 年 8 月 25 日
You can find all of the files in the video at the end of the discription, including mpgdistribution(). It basically contains codes to fit the Normal distribution to the data and draw some figures. It contains functions like fitdist() for distribution fitting and pdf() for probability density function, which requires Statistics and Machine Learning toolbox. You couldn't find documentation for mpgdistribution() because it is not a standard MATLAB library.
https://www.mathworks.com/matlabcentral/fileexchange/64219-beyond-excel-enhancing-your-data-analysis-with-matlab-august-2017
  3 件のコメント
Abdolkarim Mohammadi
Abdolkarim Mohammadi 2020 年 8 月 25 日
Exactly. You should also notice that mpg in mpgdistribution() refers to Mile Per Gallon (MPG), which is one of the variables in that example, so it wouldn't be a general MATLAB function.
cwj2000
cwj2000 2020 年 8 月 25 日
Thanks.
Yes, I had understood what MPG was referring to, and was therefore confused how the function came about. Thanks for all your help

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by