How to do a double fourier transform or double summation equation in Matlab?
10 views (last 30 days)
Iam very confused to this equation, because it should be written in a double fourier transform which re very difficult for me.... SO here is the equation i should solve in my Thesis :
T is hour of the years (it can be replaced with a datenum, right?) and M is month number. I just want to know how this difficult equation should be written as a code in Matlab... Im very confused.... I think it would be written in a combination of symsum, syms, and etc, but i still doubt how to write it correctly in Matlab.... WOuld anyone lend me a hand for this equation, please... Thank you so much, everyone... /.\ /.\ /.\
Walter Roberson on 30 May 2022
T cannot be replaced by a datetime. datetime objects cannot be multiplied by anything.
At one level, T could potentially be replaced by a duration() object, as durations can be multiplied... but you cannot take cos() of a duration.
syms T M
syms A [6 6]
syms alpha [1 6]
syms beta [1 6]
n = (1:6).';
m = 1:6;
Sq_est = sum(sum(A .* cos(m .* T + alpha) .* cos(n .* M + beta)))