We check our definition by plotting f over 3 3 In4 Plotfx x

We check our definition by plotting f over [-3, 3]. In[4]:= Plot[f[x], {x, -3, 3}, AxesLabel rightarrow {\"x\", \"f(x)\"}] We check our earlier calculation that f[3] = -2. This looks a little complicated because Mathematical does not know jet that n is an integer. We now simplify this expression under the assumption that n is an integer. We call the result b{n}. We now define the Mth partial sum of the Fourier series, as a function of x and M. Finally we define a function graph[M] which produces a graph of the Mth partial sum. along with a graph of the original function. We graph the original function in blue and the partial sum in red. (C) We now construct the graphs for M = 5, 10, and 20.

Solution

In Mathematica there is a function called ToMatlab[], but you have to download it.
First type the code in matiematica and then use the function ToMatlab[], it will convert the convert to matlab script

 We check our definition by plotting f over [-3, 3]. In[4]:= Plot[f[x], {x, -3, 3}, AxesLabel rightarrow {\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site