Assignment (1)

Image Processing Spring 2001

Due : Wednesday Jan. 24


Please note that all the problems must be completed using Matlab. Create a file that contains all parts and print that file and submit it in class. Remove extra blank lines to save some paper. Since you are running Matlab on Unix, you can use an editor to cut and paste the results of your work in Matlab into a file. Then you can print the file.


Problems that are marked with G. are for graduate students only. Note that all problems are related to what you have learned and practiced in Lab (1). Use the values given in Lab (1) for t, A, and B. You can use the Matlab help or tutorial on our web page to find the commands that you do not know.


Problem (1) : sin(2t) = 2 sin(t).cos(t). Use Matlab to find the values for sin(2t)using the procedure given in the lab (obtain 2t, then sin(2t) ) and using 2sin(t).cos(t). Confirm that both methods generate the same results.


Problem (1) G.: (Graduate students only) : sin2(t) + cos2(t) = 1, use Matlab to prove this using array operations and array t given in the lab.


Problem (2): If A was a complex matrix, what procedure would you use to generate its

transpose? What was the outcome of the transpose operation in that case?


Problem (3) How do you multiply the corresponding elements of matrix A and B ?

Please note that I didn't ask you to multiply A * B. I want you to tell me how to

multiply A(1,1) by B(1,1), and A(1,2) by B(1,2), ....? Find the results of your work using A and B that are given in the lab.


Problem (3) G. How do you find the cube of matrix A?


Problem (4) (Challenging): Suppose you have the following 4x4 matrix. Suppose the values in A were selected from the 0 to 255 range. Assume for now that in that scale, 0 represents the black and 255 represents the white colors. Can you revert the matrix, i.e., can you covert x(i,j) to 255- x(i,j). Note that x(i,j) represents the value at each location, x(1,1) corresponds to the first value in the matrix. By reverting the matrix, you will change the black color to white and white to black. A similar thing will happen to all values in between.