Funphysicist.weebly.com



Assignment 1 Key

Answers for assignment 1

Section 2.1, Problem 2 1

Section 2.1, Problem 4 1

Section 2.11, Problem 1, Publishing Reports - A Simple Example 2

A Spiral Plot 2

Create vectors theta and r 2

Now plot theta vs r using polar plot 2

Polar to Cartesian Coordinates (Addition to script for Problem 2) 3

Polar to Cartesian with pol2cart 4

Problem 4 - not output 5

Section 2.2, Problem 1 5

Section 2.2, Problem 3 5

Section 2.2, Problem 5 6

Section 2.1, Problem 2

exp(3)

log(exp(3))

log10(exp(3))

log10(10^5)

exp(pi*sqrt(163))

x=log(17)/log(3)

3^x % should equal 17

ans =

20.0855

ans =

3

ans =

1.3029

ans =

5

ans =

2.6254e+17

x =

2.5789

ans =

17.0000

Section 2.1, Problem 4

(1+3*i)/(1-3*i) % Should equal -0.8 + 0.6i

exp(i*pi/4)

cos(pi/4)+i*sin(pi/4)

exp(pi/2*i)

exp(pi/2i)

ans =

-0.8000 + 0.6000i

ans =

0.7071 + 0.7071i

ans =

0.7071 + 0.7071i

ans =

0.0000 + 1.0000i

ans =

0.0000 - 1.0000i

Difference from exp(pi/2*i) has to do with order of operations. exp(pi/2*i) executes division first so the imaginary part of argument positive. exp(pi/2i) executes multiplication first making the complex of argument the reciprocal of i and, therefore, negative.

Section 2.11, Problem 1, Publishing Reports - A Simple Example

A Spiral Plot

Let us plot a spiral given by r(t) = exp(-theta/10), 1 ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download