Matlab - ass#1

# Matlab - ass#1 - Hoon Shin Math 20D Section B52...

This preview shows pages 1–6. Sign up to view the full content.

Hoon Shin Math 20D Section: B52 Assignment #1 Exercise 1.1 >> log(12) / log(5) ans = 1.5440 Exercise 1.2 M = -3:0.4:12. This gives the possibilities of the answer which starts counting from -3 to 12 by substracting 0.4 each time If we type m(23), it gives us answer number 23 which can be obtained by -3 + (22*0.4) which is 5.8000 Exercise1.3 >> z = 30 - (100-2exp(4-sin(pi/6)) ??? z = 30 - (100-2exp(4-sin(pi/6)) | Error: Unexpected MATLAB operator. >> z = 30-[100-2*exp(4-sin(pi/6))] z = -3.7691

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Exercise 1.4 >> g = inline ('cos(x)/x') g = Inline function: g(x) = cos(x)/x >> fplot (g, [-20,20]) >> figure >> ezplot (g, [-20,20]) >>
-20 -15 -10 -5 0 5 10 15 20 -16 -14 -12 -10 -8 -6 -4 -2 0 2 x 10 12 the result of fplot -20 -15 -10 -5 0 5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 10/29/2008 for the course MATH 20D taught by Professor Mohanty during the Fall '06 term at UCSD.

### Page1 / 6

Matlab - ass#1 - Hoon Shin Math 20D Section B52...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online