How write a function that takes a matrix and period omega?
3 次查看(过去 30 天)
显示 更早的评论
function F = fftfuntion(D, omega)
%Input: a matrix D ∈ RN×2, Di = (xi,yi), and the period ω
check = 0;
x = D(:,1);
y = D(:,2);
end
I need to write a function that takes as input a matrix D ∈ RN×2, Di = (xi,yi), and the period ω. Here is what I have so far. Am I on the right track?
0 个评论
采纳的回答
Sriram Tadavarty
2020-3-15
Hi Prathik,
You are on the right track itself.
Ensure that you define the output variable F and use omega input in the function.
Regards,
Sriram
4 个评论
Sriram Tadavarty
2020-3-15
There are few things missed in the code. Why is omega not used? Should the fft(x) be F rather than y?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!