Unit Test 10D - Unit 10 Readiness Test D Note: All Programs...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Unit 10 Readiness Test D Note: All Programs have to be submitted as m-files pasted in a word doc or text file 1. Create a function that has three inputs x , y and o . Based on the value of o determine the o th root and the o th power of x and y . Hint : You cannot compute the square root for a negative number. You can use the example on page 377 of the book (Engg. Prog. C, MATLAB, JAVA) as a model.) X = input( 'Input the value of X: ' ); Y = input( 'Input the value of Y: ' ); o = input( 'Input the value of o: ' ); othRoot = 1/o; fprintf( 'The oth root of X is: ' ); rootX = X^othRoot fprintf( 'The oth root of Y is: ' ); rootY = Y^othRoot fprintf( 'The oth power of X is: ' ); powerX = X^o fprintf( 'The oth power of Y is: ' ); powerY = Y^o 2. Create a n x m matrix with n and m being inputs. Output the maximum matrix element value in each row and column of the matrix and print the position in the matrix as well. value in each row and column of the matrix and print the position in the matrix as well....
View Full Document

This note was uploaded on 03/19/2008 for the course ME 205 taught by Professor Koen during the Spring '07 term at University of Texas at Austin.

Page1 / 2

Unit Test 10D - Unit 10 Readiness Test D Note: All Programs...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online