Borrar filtros
Borrar filtros

How to plot a kernal function in MATLAB

1 visualización (últimos 30 días)
Hamza Khan
Hamza Khan el 14 de Jul. de 2022
Respondida: Rishita el 15 de Jul. de 2022
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)

Respuestas (1)

Rishita
Rishita el 15 de Jul. de 2022
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

Categorías

Más información sobre Labels and Annotations en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by