How do I ifft two vectors?
Mostrar comentarios más antiguos
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 comentario
Image Analyst
el 11 de Oct. de 2021
Editada: Image Analyst
el 11 de Oct. de 2021
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)
Respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!