User Tools

Site Tools


gibson:teaching:fall-2013:math445:hw3

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
gibson:teaching:fall-2013:math445:hw3 [2013/10/11 12:23]
gibson created
gibson:teaching:fall-2013:math445:hw3 [2013/10/22 07:14] (current)
gibson
Line 15: Line 15:
 using red for //sin(x)// and blue for //cos(x)//. Add a legend that indicates which function is which color. using red for //sin(x)// and blue for //cos(x)//. Add a legend that indicates which function is which color.
  
-7. Produce a vector whose components are random integers between 0 and 10, inclusive.+7. Produce a vector ​of length 13 whose components are random integers between 0 and 10, inclusive.
  
-8. Produce a vector whose components are random real numbers between 0 and 10, inclusive.+8. Produce a vector ​of length 13 whose components are random real numbers between 0 and 10, inclusive.
  
 9. Show how you would solve the following system of equations with Matlab 9. Show how you would solve the following system of equations with Matlab
Line 51: Line 51:
 y_i = \sum_{j=1}^n A_{ij} x_j y_i = \sum_{j=1}^n A_{ij} x_j
 </​latex>​ </​latex>​
 +
 +**A few more problems, added 1/14/2013**
 +
 +18. Set vector v to the 3rd column of matrix A.
 +
 +19. Set vector v to the 4th row of matrix A.
 +
 +20. Set vector v to the first 3 entries in the 7th row of A.
 +
 +21. Set the 4th row of the 8 x 5 matrix A to (1, 2, 9, 5, 0).
 +
 +22. Set the 2nd column of the 4 x 3 matrix A to a column vector with entries (3, 0, -1, 5).
 +
 +23. Zero all the entries in the last column of a matrix A.
 +
 +24. Produce a contour plot of $f(x,y) = \sin(x^2+y^2)/​\sqrt{x^2 + y^2}$ 
 +where //x// and //y// range from -10 to 10. Label the axes.
 +
 +----
 +
 +**A few more problems, added late 10/​14/​2013**. You don't have to turn these in, but they are fair game for the exam. I will add more example problems over the next few days.
 +
 +25. Write an expression that returns the positive elements of a vector v.
 +
 +26. Write an expression that returns the sum of the positive elements of a vector v.
 +
 +27. Write an expression that returns the number of positive elements in a vector v.
 +
 +** Even more practice problems! Hooray! added 10/22/3013 **
 +
 +28. Write a function that computes the factorial of an integer n using a ''​while''​ loop.
 +
 +29. Write an ''​isPrime(n)''​ function that returns 1 (true) is n is prime and 0 (false) if n is not prime. Don't worry about making the test efficient or doing it with integer arithmetic.
 +
 +30. Write a function that returns a vector of all the integer divisors of an integer n. Again, don't worry about efficiency or integer arithmetic. ​
 +
 +
 +
  
gibson/teaching/fall-2013/math445/hw3.1381519387.txt.gz ยท Last modified: 2013/10/11 12:23 by gibson