How to plot a kernal function in MATLAB
4 次查看(过去 30 天)
显示 更早的评论
Unsure what I'm doing wrong here. May be the mathematical operation. Also unsure how to see what happens when the kernal = 0. Attached is the function given and the plot obtained from MATLAB code. Below is my current MATLAB code and plot.
% Evaluating kernal functions, kernal 2
Fs = 33600;
n = 0:Fs;
a = floor(n-(Fs/2));
c = (1200*pi)/Fs; % c is greek letter chi
g = pi/Fs; % g is greek symbol gamma
k2 = sin(n*c)-10*sin(9*n*c);
plot(n,k2)
0 个评论
回答(1 个)
Rishita
2022-7-15
SixMPG = [13;15;23;29;32;34];
figure
histogram(SixMPG)
figure
pdSix = fitdist(SixMPG,'Kernel','Width',4);
x = 0:.1:45;
ySix = pdf(pdSix,x);
plot(x,ySix,'k-','LineWidth',2)
% Plot each individual pdf and scale its appearance on the plot
hold on
for i=1:6
pd = makedist('Normal','mu',SixMPG(i),'sigma',4);
y = pdf(pd,x);
y = y/6;
plot(x,y,'b:')
end
hold off
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Labels and Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!