MATH1052 Semester 1 2001

Practical Exercise 2

 

This weeks assignment continues the basic introduction to Matlab. Today we will plot some simple functions and some parameterised curves. Begin by reading section 4.1of the Matlab introduction notes.

Assignment: There are many ways to plot functions in Matlab.

A Lissajous curve is of the form

y=sin(nt+c), x=sin(t).

  1. Plot the curve using the ezplot command for various values of n and c. Find values of n and c such that the Lissajous curve becomes the ABC television symbol.

2. A moon has a circular orbit around a planet at a radius of 1 and makes 12 revolutions in a year. The planet itself revolves in a circular orbit around a sun at a distance of 5 and makes one revolution per year. If time t is measured in years, explain why the x and y coordinates for the moon are given by

x(t) = 5cos(2pt) + cos(24pt) and y(t) = 5sin(2pt) + sin(24pt)

Plot x and y individually versus 0 < t < 1, then plot the motion in the xy-plane. Differentiate these expressions and find the velocity vector.

  1. Using the ezplot3 command (see section 4.2 of the Matlab notes) plot the following parametrized curves for 0<t<5.

x=cos(2pt), y=sin(2pt), z=t

x=t.cos(2pt), y=t.sin(2pt), z=t.