How write a function that takes a matrix and period omega?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pratik Patel
am 15 Mär. 2020
Kommentiert: Sriram Tadavarty
am 15 Mär. 2020
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 Kommentare
Akzeptierte Antwort
Sriram Tadavarty
am 15 Mär. 2020
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 Kommentare
Sriram Tadavarty
am 15 Mär. 2020
There are few things missed in the code. Why is omega not used? Should the fft(x) be F rather than y?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!