How to do this unusual Fourier transform?

조회 수: 4 (최근 30일)
L'O.G.
L'O.G. 2023년 8월 24일
댓글: Walter Roberson 2023년 8월 25일
I am trying to compute a sine transform:
I'm not sure about the non-standard bound of the integral (why it's not infinity???).
Anyway, let's say f_t = rand(40,1). Then,
N = 1000;
omega = logspace(-2,2,N);
for ii = 1:N
f_omega{ii} = omega(ii).*integral(@(t) f_t.*sin(omega(ii).*t),0,2*pi./omega(ii),'ArrayValued',true);
end
gives a vector of length 40 for each omega, which doesn't seem right to me. I should have just a vector of length N at the end. How do I do this integral? And should it matter what range in t I choose for f(t)?
  댓글 수: 3
L'O.G.
L'O.G. 2023년 8월 25일
@Star Strider How would you recommend doing this integral then? Please see my comment below as well.
Star Strider
Star Strider 2023년 8월 25일
I could not get it to work numerically, even using the non-random sine function for ‘f_t’ so that I could be certain that it had a non-random result. I did the symbolic calculation and plot to see what the correct result would be (sort of like looking in the back of the book to see what the correct answer is).

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

답변 (1개)

Walter Roberson
Walter Roberson 2023년 8월 25일
Anyway, let's say f_t = rand(40,1).
Let's not say that.
f is a function of t. By saying that f_t = rand(40,1) you are saying that f is constant in t, and is a 40-dimensional (constant) point. When you integrate that, of course you are going to end up with a 40-dimensional result.
  댓글 수: 5
L'O.G.
L'O.G. 2023년 8월 25일
편집: L'O.G. 2023년 8월 25일
Thank you both. @Walter Roberson Excellent point about f(t). I was trying to simplify the notation, but I might've simplified it too much. The actual equation is:
where is the "unit vector along the element axis". is just a constant. only has nonzero values in x, so I think the element axis here should just be the x-axis. There's just one value of for a particular time t, so perhaps constructing it as a vector is not right as you indicated. Based on what you're saying, I would also not regard as the transform of . I am really in the dark about how to do this. Would appreciate your and @Star Strider's insight.
Walter Roberson
Walter Roberson 2023년 8월 25일
Using that notation, but with the same functionality as Star Strider already posted:
syms f(t) G(omega) varepsilon_0 e_1
Pi = sym(pi);
sympref('AbbreviateOutput',false);
f(t) = cos(5*Pi*t)
f(t) = 
G(omega) = omega/(varepsilon_0 * Pi) * int((f(t)*e_1) * sin(omega*t), t, 0, 2*Pi/omega);
G = simplify(G, 500)
G(omega) = 
G_representative = subs(G, {e_1, varepsilon_0}, {1,1})
G_representative(omega) = 
figure
fplot(G_representative,[0.01 1000])
grid
Ax = gca;
Ax.XScale = 'log';

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by