0% found this document useful (0 votes)
27 views1 page

Assignment Problems: y X Z y X Z

The document provides three MATLAB assignment problems. The first asks to write a program to draw and compare the graphs of two surfaces defined by equations using subplot, with labels and titles. The second asks to do the same for two other surfaces using subplot. The third asks to write a function that takes a positive integer and repeatedly divides evens by 2 or multiplies odds by 3 and adds 1 until the integer is 1.

Uploaded by

Ali Ahmad
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Assignment Problems: y X Z y X Z

The document provides three MATLAB assignment problems. The first asks to write a program to draw and compare the graphs of two surfaces defined by equations using subplot, with labels and titles. The second asks to do the same for two other surfaces using subplot. The third asks to write a function that takes a positive integer and repeatedly divides evens by 2 or multiplies odds by 3 and adds 1 until the integer is 1.

Uploaded by

Ali Ahmad
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment Problems

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.

You might also like