PROBLEM #2
- During SARS period, people who passed the airport gate should have their temperatures measured. Suppose that B is the recorded body temperatures in Fahrenheit and B=[98 100 102 104 98.4 98.2 98.5 101 102 99.5]. Please workout a program to do: a) Converse the unit of B into Centigrade b)Decide who got the temperature? Design a matrix D to show that "1" for the one who has a fever (>38C) and "0" for the normal.
- There are two matrices A and B, in which A=[ -10 8 6 4 -5 20] and B=[2 8 5 10 -6 3]. Find D using both Matlab commands .(a) D= (A>B) (b) D= (A>5) (f) D=A+B.
- Suppose that x=[10 20 30] and y=[1 4 6], Calculate the following combinations using Matlab commands:(a) A= 3x +y (b) B=5y/x (c) C=4x2y (d) D=sin(x)cos(y) (e)5x sin(2y)
- A set of resistors are expressed in an array as R=[ 10 30 200 400]ohms. Write a M-file program to calculate the equivalent resistance if (a) all the resistors are in series (b) all of the resistors are in parallel.
- Suppose matrix A=1:24, please reform A into matrices B in size 3x8; C in size 6x4; D in size 2x12.
Due Date: October 6, 2006
沒有留言:
張貼留言