How do I ifft two vectors?

This is the question:
Use fft() and ifft() functions provided by MATLAB, while X[k] = fft(x[n]).Compute the result for the following equations and plot the result. Describe your findings.
i)H1[k] =fft(h[n]), y[n] =ifft(X[k]H1[k])
ii)H2[k] =fft(h[n+ 12] +h[n] +h[n−12]), y[n] =ifft(X[k]H2[k])
iii)H3[k] =fft(h[n+ 5] +h[n] +h[n−5]), y[n] =ifft(X[k]H3[k])
How do I find y[n] in each of these, I have tried
ifft( (X[k])*(H1[k]))
and
ifft( (X[k]).*(H1[k]))
, but I get the error message, "Arrays have incompatible sizes for this operation." So how do i make them the same length and then appy that to the ifft.
Thank you!

1 件のコメント

Image Analyst
Image Analyst 2021 年 10 月 11 日
編集済み: Image Analyst 2021 年 10 月 11 日
What does x[n] mean? You can't fft a single value, so is x a 2-D array and x[n] is the nth row or column of that array? You use parentheses to reference array indices in MATLAB, not square brackets. Square brackets are for creating matrices, not referencing elements from them. If you're using the whole matrix, then maybe you meant:
ft = ifft(x .* h1)

サインインしてコメントする。

回答 (0 件)

カテゴリ

質問済み:

2021 年 10 月 11 日

編集済み:

2021 年 10 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by