필터 지우기
필터 지우기

Dirac Comb as a function of x

조회 수: 17 (최근 30일)
Chien-Cheng Chiu
Chien-Cheng Chiu 2020년 6월 15일
댓글: Chien-Cheng Chiu 2020년 7월 2일
Hi,
I am having trouble creating a function of a Dirac comb of unit amplitude of 1. It should be a function of x.
I keep seeing codes of plotting a non-moving multiple Dirac combs on one plot using Matlab function "stem", but I only need one Dirac comb that moves to the right on one plot, using Matlab function "plot".
Below is an example of how it probably should look like. I have successfully coded up a Gaussian function that can move on one plot using Matlab function "plot" and it's a function of varepsilon and x. However, for Dirac comb, I need it as a function of x only.
function [alpha] = gaussian(varepsilon, x)
for i = 1:numel(x)
alpha(i) = (1/(varepsilon*sqrt(2*pi)))*exp(-x(i)^2/(2*varepsilon^2));
end

답변 (1개)

Navya Seelam
Navya Seelam 2020년 6월 19일
  댓글 수: 1
Chien-Cheng Chiu
Chien-Cheng Chiu 2020년 7월 2일
I have checked this link already, but I am having trouble understanding how to convert that code in that link to my format of code.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by