Final Advance Programming 2024 2025 R1
Final Advance Programming 2024 2025 R1
Q1: ( 10 Marks)
Q2: ( 10 Marks)
Q3: ( 10 Marks)
Q4: ( 10 Marks)
----------------------------------------------------------------------------------------------------------------
Q5: Choose the correct answer : (10
Marks)
1. Group of MATLAB commands placed in a text file refer to :
A. m file B. command history C. workspace
2. y=(5>4)+(2>5)+(15/5==3*5), the value of y for logical answer ::
A. 5 B. 2 C. 1
3. Uses with two conditions:
A. if-end B. if-else-end C. if-elseif-else-
end
4. Use to get blank line in output format
A. % B. & C. not mentioned
5. Plot command used to plot points in a two-dimensional figure and connects them with
straight line segments.:
A. bar B. plot C. surf
6. Find indices of element that returns true of relational operators:
A. Find (A˃K) B. Find(A==K) C.
Find(A≥K)
7. The command use for repeatedly executes statement while the condition is true :
A. for B. switch C. while
8. To write a function that deals with one variable through input and output use :
A. Function name .m B. Function .m C. Function input .peg
9. (hist) command in Matlab use for plot :
Page 1 of 2
University of Basrah-College of Engineering
Department of Mechanical Engineering
Q6: Write a Matlab program to display the multiplication table. (10 Marks)
2-2