フィルターのクリア

How to plot a kernal function in MATLAB

1 回表示 (過去 30 日間)
Hamza Khan
Hamza Khan 2022 年 7 月 14 日
回答済み: Rishita 2022 年 7 月 15 日
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)

回答 (1 件)

Rishita
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

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by