Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 2 (MATLAB): (i) Using MatLab, find the first 21 coefficients Q, and f the Fouries series in terms of sines and cosines, of the
Problem 2 (MATLAB): (i) Using MatLab, find the first 21 coefficients Q, and f the Fouries series in terms of sines and cosines, of the discontinuous top-hat function (what is L). Consicer the truncated series g(z, Nina.) which converges to the starting function in the Nmax oo limit, an cos Show visually how including more and more terms improves the convergence, by plotting (10) Hints: The Matlab expression for a definite integrsin (), is int (sin (z) 0, 1) You can have the code compute all the 21 Fourier coefficients through 21 Or, more efficiently, you an introduce alint = a(n) int(. . .) b-(n) int.) (12) where instead of. you have to write the corresponding definite integral for that coefficient. The term a0 is introduced as a number, while and b 88 a functions of n that will be evaluated later for given values of n (remember to add the line that introduces and n a8 variables; if you later need to introduce a do, cycle, do not call the loop variable 'n'). Then the Matlab expression fr the partial series 5-1 akcs( kr) i8 put a name = (z) symsum(a(k) * cos(. . . kr), k, 1,5) (13) Problem 2 (MATLAB): (i) Using MatLab, find the first 21 coefficients Q, and f the Fouries series in terms of sines and cosines, of the discontinuous top-hat function (what is L). Consicer the truncated series g(z, Nina.) which converges to the starting function in the Nmax oo limit, an cos Show visually how including more and more terms improves the convergence, by plotting (10) Hints: The Matlab expression for a definite integrsin (), is int (sin (z) 0, 1) You can have the code compute all the 21 Fourier coefficients through 21 Or, more efficiently, you an introduce alint = a(n) int(. . .) b-(n) int.) (12) where instead of. you have to write the corresponding definite integral for that coefficient. The term a0 is introduced as a number, while and b 88 a functions of n that will be evaluated later for given values of n (remember to add the line that introduces and n a8 variables; if you later need to introduce a do, cycle, do not call the loop variable 'n'). Then the Matlab expression fr the partial series 5-1 akcs( kr) i8 put a name = (z) symsum(a(k) * cos(. . . kr), k, 1,5) (13)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started