I am using tutorial frequency domain linear regression but I can't understand some parts.

2 views (last 30 days)
tsdft = fft(ts-mean(ts));
freq = 0:1/72:1/2;
plot(freq.*12,abs(tsdft(1:length(ts)/2+1)),'o-', ...
'MarkerFaceColor','auto')
xlabel('Cycles/Year')
ylabel('Magnitude')
ax = gca;
ax.XTick = [1/6 1 2 3 4 5 6];
how you calculate freq?
why is multiply by 12?
In graph 1/6 used instead o??
kindly help me in regard
Waiting for your response

Answers (0)

Community Treasure Hunt

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

Start Hunting!