====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
gibson:teaching:spring-2015:math445:lab4 [2015/02/05 03:57] gibson |
gibson:teaching:spring-2015:math445:lab4 [2015/02/05 03:58] (current) gibson |
||
---|---|---|---|
Line 41: | Line 41: | ||
this question very quickly by writing one line of Matlab code that evaluate the truncated sum for a fixed value of $N$, and then rerunning it with changing values of $N$. | this question very quickly by writing one line of Matlab code that evaluate the truncated sum for a fixed value of $N$, and then rerunning it with changing values of $N$. | ||
- | Helpful Matlab commands: ''sum, format, exp'' (for getting the correct value of $e$ to sixteen digits), dot syntax, and ''log10'' (for counting digits of precision). | + | Helpful Matlab commands: ''sum, format, exp'' (for getting the correct value of $e$ to sixteen digits), colon syntax, dot syntax, and ''log10'' (for counting digits of precision). |
----- | ----- | ||
Line 53: | Line 53: | ||
Like the exponential function, in practice one truncates this sum at $n=N$. How large does $n$ need to | Like the exponential function, in practice one truncates this sum at $n=N$. How large does $n$ need to | ||
be to calculate $\sin \pi/3$ to sixteen digits? | be to calculate $\sin \pi/3$ to sixteen digits? | ||
+ | |||
+ | Helpful Matlab commands: same as problem 4. |