Announcements

Additional reading

Matlab Assignments

Assignment5.zip SOLUTIONS

Directions

taylor_example.m

Extra Credit:
For extra credit worth 1/2 lab, do the following:

  • Write a function that, given two polynomials as lists of coefficients, computes their product;
  • Write a test for this function (using polynomials that you can multiply by hand);
  • Write a test that computes the 7'th degree Taylor polynomial for f(x)=sin(x)cos(x) in two ways:
    1. First, by using your taylor_poly method on sin(x)cos(x);
    2. And secondly, by calling it on sin(x) and cos(x) separately and then using your polynomial multiplication function to get the polynomial.
    Compare the results.
Assignment4.m Solutions
Assignment3.m Matlab 3 handout (now complete!)
Directions
Solutions
Assignment2.m
segment.m
Directions
Solution:
Solution + Output
Assignment1.m Directions
Solution:
Solution + Output
M-File

Quizzes

Quiz 1Solutions
Quiz 2Solutions
Quiz 3Solutions
Quiz 4Solutions
Quiz 5Solutions
Quiz 6Solutions
Quiz 7
Quiz 8
Quiz 9
Quiz 10

MATLAB examples

Useful in class:

Example1.m All you need to know for Assignment 1.
no_magic_example.m Integration, differentiation and zero finding using only the most basic numeric tools with MATLAB.

Neat examples:

sierp.m Draws the Sierpinski triangle
sierp_better.m Draws the Sierpinski triangle in even a simpler way
dragon.m Draws the Dragon curve
mandelbrot.m Draws the Mandelbrot fractal
game_of_life.m Plays Conway's game of Life
anim_simple_graph.m A simple neat, animated graph.
hor_cycloida.m Animates a rolling circle tracing a cycloida.
cycloida_anim.m Animates a circular hypocycloid curve.
a_3D_curve_plot_anim.m Draws an animated curve in 3-dimensional space
a_3D_surf_plot_anim.m Draws an animated surface plot
rand_walk.m Animated random walk on a plane.
approximate_pi.m Approximate Pi with square roots
circ_anim.m Animated rotating circles
nested_circles.m Pretty nested circles
pretty.m Pretty colors
You can download these examples as one zip file.

Useful Links