a matrix with a dirac delta function

조회 수: 2 (최근 30일)
Chien-Cheng Chiu
Chien-Cheng Chiu 2020년 7월 3일
답변: Walter Roberson 2020년 7월 3일
I am having trouble multiply a matrix with a dirac comb.
My matrix is the following
and I am to multiply? it by this Dirac function
to get this:
.
If I just multiply the two together, then I will just get 0's, but I shouldn't. This is my code currently.
for j = 1:n + 1
u_approx_dirac = u_approx * dirac(x - c - j*delta);
end
x is a vector of 3001 elements,
t is a vector of 6001 elements.
Also, c = a for my code.
Please help me directly and not send me to other links. Thank you.

답변 (1개)

Walter Roberson
Walter Roberson 2020년 7월 3일
Guessing:
for j = 1:n + 1
u_approx_dirac(:,j) = u_approx(:,j) .* dirac(x - c - j*delta);
end

카테고리

Help CenterFile Exchange에서 Multivariate Distributions에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by