📄 example.m
字号:
clcecho on% An example of the histogram, KDE, and bKDE using a normal distribution%-----------------------------------------------------------------------------------%% produce a sample of 10000 points from a normal distributionx=rand+randn(1,10000);% calculate and plot the histogramhisto(x,0.4,0,'g--'); hold on% calculate and plot KDE using the triangle kernel kde(x,0.4,'ker1','b');% bin the data into 100 bins[xb,cb]=binden(100,x);% calculate and plot BKDE using the triangle kernelbkde(xb,cb,0.4,'ker1','r--'); hold off% Hint: the difference between KDE and bKDE can be increased% by reducing the number of bins used (in 'binden' function)echo off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -