Assignment Problems: y X Z y X Z
Assignment Problems: y X Z y X Z
1. Write a program in Matlab using the technique of example 1 to draw the graph of the surfaces defined by each of the following equations. Use subplot command to compare the plots. Label the axes and provide an appropriate title. Obtain a printout of your result and hand in after the class. YOU WILL MAKE ONLY ONE M-FILE FOR BOTH EQUATIONS.
( a ).z = 9 x 2 y 2 ( b ).z = x 2 + y 2
2. Use the technique of example 2 and example 3 (remember, advance planning can eliminate complex numbers) to draw the graph of the surfaces defined by each of the following equations. Use subplot command to implement your solution. Label the axes, provide an appropriate title, and obtain a printout of your result to hand in after the class. - YOU WILL MAKE ONLY ONE M FILE FOR BOTH EQUATIONS.
( a) x 2 + y
2
4 2 ( b) x + y + z 2 = 1 4 9
z2 = 1
3. Write a function in MATLAB which accepts any positive integer ,if it is even, divide it by 2:if it is odd multiply it by 3 and add 1. Repeat this process until the integer becomes 1.