User Tools

Site Tools


gibson:teaching:fall-2012:math445:hw1

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

For each of the following, provide an answer in Matlab-digestable syntax 1. Assign the value 0.00014 to the variable //x//, using compact scientific notation. 2. Set the variable //x// to a vector whose components are the even numbers between 14 and 36. 3. Set the variable //x// to 200 evenly spaced points between 0 and 2. 4. Produce a plot of //y = x^2 - 2x + 3// for the //x// of the previous problem. Label the axes. 5. Plot //tan(x)// versus //x// for 200 evenly spaced points between 0 and 1.57 ≈ pi/2, using a logarithmic scale on the //y// axis. 6. Produce a vector whose components are random integers between 0 and 10, inclusive. 7. Produce a vector whose components are random real numbers between 0 and 10, inclusive. 8. Show how you would solve the following system of equations with Matlab <code> x + 2y - z = 5 3x + y + 6z = 37 -3x + y + 2z = -11 </code> 9. Write a conditional expression that is true if scalar variables //x// and //y// are both nonzero and false otherwise. 10. Set variable //A// to a 3 x 5 matrix of zeros. 11. Set variable //A// to a 4 x 7 matrix of random real numbers, using a guassian (normal) distribution. 11. Write a conditional expression that is true if a matrix //A// is square and false otherwise. 12. Write a conditional expression that is true if either //x// or //y// is an integer. Write a Matlab function that 13. returns 1 (true) if its argument is divisible by 3 and 0 (false) if it's not. 14. takes a vector //x// as input and returns 1 if the components of //x// are sorted in ascending order, 0 if not. 15. finds a zero of another function using the bisection search algorithm.

gibson/teaching/fall-2012/math445/hw1.1348540995.txt.gz · Last modified: 2012/09/24 19:43 by gibson