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!