You are on page 1of 1

University of Mosul Final Exam.

College: Petroleum & Mining Engineering Time: 3 Hrs.


Dept.: Mining Engineering Date: / / 2019
Class: 2 nd Year
Lecturer: Dr. Sama T.
Subject: programming.ii
Code:

Q1) A) fill the blanks (7 marks)


1- Callback is _______.
2- _________ used to make the axis is invisible.
3- The symbol _______ means dashed line, right pointing triangle and red color.
4- GIF is abbreviated of _________.
5- String property in GUI object used to _________ .
B) what is the differents between: (6 marks)

1- figure and msgbox 2- FCN and matlab function 3- popup and list menu
C) draw plot([1 4 5],[5 2 4]); (2 marks)

Q2) A) what is the matlab function that used to convert RGB (color map) image to
gray scale, then write the equation that used for this purpose. (3 marks)

B) write matlab program for (6 marks)


1- read 'trees.tif' image with its colormap
2- Convert its colormab to gray scale
3- create figure with 2 sections.
1st section to show 'trees.tif' image with its new gray scale
2nd section to show the complement of original image
Q3) answer the following with out using any program or subprogram
A) Design simulation model that display the summation of posative numbers of the
constant m1. ex: m1= [ 3 -7 1 2 -1] so the output= 6 (5 marks)
B) Design simulation model for (
∑ (3 X ) ) 2 where x =[4 2 8] (5
X
marks)
C) Design four different models for √ 16 (4 marks)
Q4) A) design (draw) GUI has one list box for 2 marks(88, 45), when pass mark is
selected,message box(pass) will appear. when fail mark is selected, message
box( fail) will appear. write program section for this task. (6 marks)
B) draw GUI with : (6 marks)
1- One edit texts with tag(t1) ,used to enter one value (n1)
2- One button group has 2 radio button tags(r1,r2),string(factorial, sequare)
3- One static texts with tag(s1).
4- Pushbutton1 When it is pressed and r1 is on, s1 = n1 ! , when r2 is on, s1=n1* n1
5- Write the program for pushbutton1-callback.

You might also like