MATLAB comp progHW6

MATLAB comp progHW6 - Fall 2010 Dr Frank Shih CS 101...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Fall 2010, Dr. Frank Shih Homework #6 DUE: 11:55pm, December 2, 2010 Name: ( Robert Crescenzi ) NOTES: Submit the homework solution in Microsoft Word format to http://moodle.njit.edu/ before the above deadline. Absolutely, no late submission is accepted. Write the answers in your own words individually. Any plagiarism will post a “ZERO” score or cause a “FAIL” grade. 6.1 (35 points) Write a function to_polar that accepts a complex number c, and returns two output arguments containing the magnitude mag and angle theta of the complex number. The output angle should be in degrees. The error message must be displayed when the number of input parameters is not equal to one. (a) Show the Matlab function. (b) Test the function by using: [a b]=to_polar(3+i*4). Answer: (a) function [a b]=to_polar(c) a=abs(c); b=angle(c)*180/pi; (b) >> [a b]=to_polar(3+i*4) a = 5 b = 53.1301 6.2 (35 points) Suppose that George, Sam, Betty, Charlie, and Suzie contributed $25, $15, $10, $5,
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/21/2011 for the course PHYS 111A taught by Professor Universal during the Fall '10 term at NJIT.

Page1 / 3

MATLAB comp progHW6 - Fall 2010 Dr Frank Shih CS 101...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online