IT Workshop (MATLAB)
1. What is MATLAB used for?
2. What is the full form of MATLAB?
3. What are the predefined variables in MATLAB?
4. Write the syntax for creating a row vector and a column vector.
5. What do you mean by M-file in MATLAB?
6. What is the role of inline functions?
7. What is the purpose of break and continue statements?
8. Write down basic logical operators available in MATLAB?
9. Write down basic relational operators available in MATLAB?
10. What are the basic conditional statements available in MATLAB?
11. What are the basic datatypes available in MATLAB?
12. How do you start and quit MATLAB?
13. Write the command to clear the workspace.
14. Give examples of MATLAB built-in functions.
15. What is the use of clc command?
16. Write the syntax of a function in MATLAB.
17. What is a function file?
18. What is a script file?
19. Write down the Command to create a 3×3 zero matrix.
20. What are the uses of colon operator?
21. What is the command to plot a line?
22. What does size() return?
23. What does length() return?
24. What is the use of disp()?
25. Define 2D plotting.
26. What is the difference between ‘break’ and ‘continue’?
27. What is the significance of semicolon (;) in MATLAB?
28. Write any two strengths of MATLAB.
29. What is a script file?
30. Write the command to label the x-axis.
31. What is the use of the colon (:) operator?
32. Write two mathematical functions in MATLAB.
33. What is the purpose of subplot()?
34. Write the command to find the square root of a number.
35. Write the syntax for a while loop.
36. Write the syntax for a for loop.
37. Write an example of a string in MATLAB.
38. Write two data types supported by MATLAB.
39. Write the command to clear the workspace.
40. Write the command to read data from a file.
41. Discuss about features and strengths of MATLAB.
42. Describe MATLAB desktop components with a diagram.
43. Explain MATLAB data types with examples.
44. Write notes on relational and logical operators.
45. Write a MATLAB script using switch-case statements.
46. Write a note on conditional statements.
47. Explain for and while loops with examples.
48. Explain array operations with examples.
49. How does a script file differ from a function file in MATLAB?
50. Give a brief note on the role of the workspace in the MATLAB environment.
51. List and explain the rules for defining variable names in MATLAB. Why is it necessary
to follow them?
52. Differentiate between the ‘break’ and ‘continue’ commands in MATLAB and illustrate
your answer with an example.
53. Explain the structure of a MATLAB function file.
54. List and describe the various data types available in MATLAB, providing an example for
each.
55. Explain common plot commands.
56. Discuss the purpose and usage of the ‘input’ function in MATLAB. Provide an example
demonstrating how ‘input’ can be used to accept user input for calculations.
57. Explain common plot commands (plot, xlabel, ylabel, title).
58. Discuss different 2D plots in MATLAB.
59. Give an overview of strings and common string operations in MATLAB.
60. What are cell arrays? Explain their use in MATLAB with examples.
61. Explain different special plots with examples.
62. Write a note on file handling in MATLAB.
63. Write a function file for temperature conversion between Celsius and Fahrenheit.
64. What is Get and Set in MATLAB?
65. Calculate first 10 numbers of Fibonacci series and Display on MATLAB.
66. Write MATLAB program to sort vector v = [23 45 12 9 5 0 19 17] using MATLAB
commands.
67. Provide a program that uses an if-else statement to determine if a number is even or odd.
68. Write a MATLAB script to calculate the factorial of a given positive integer n. Ensure
your script handles non-positive integers gracefully.
69. Explain MATLAB variable naming rules with suitable examples.
70. Write short notes on error messages and warnings in MATLAB.
71. Discuss MATLAB data types, variable rules, and predefined variables.
72. Explain the MATLAB environment in detail with a diagram.
73. Describe relational and logical operations with the help of truth tables.
74. Describe the use of if-else statements in MATLAB and illustrate with an example to
identify if a number is prime or not.
75. Discuss the concept of conditional statements (if-else) in MATLAB. Provide an example
where an if-else statement is used to check if a number is positive, negative, or zero.
76. Give an explanation of control statements along with their syntax and example programs.
77. Explain basic and advanced matrix operations with examples.
78. Write a MATLAB program that defines three variables (e.g., h1, h2, and h3) to represent
three different height values and calculates their average. Write a MATLAB program to
store five numbers in a vector and display the smallest and largest number.
79. Explain how to create plots in MATLAB and demonstrate the use of fundamental
plotting functions including ‘plot’, ‘xlabel’, ‘ylabel’, and ‘title’.
80. Write MATLAB code to:
o Read data from a text file named ‘[Link]’ containing numbers separated by
spaces.
o Compute the sum and average of the numbers.
o Display the sum and average using ‘fprintf’ function with appropriate formatting.
81. How can you pass multiple input and output arguments to a MATLAB function? Provide
an example.
82. Describe how to import and export data in MATLAB.
83. Write a note on advanced plotting customization.
84. Explain file management in MATLAB with examples.
85. Write and explain a MATLAB program to perform matrix operations (addition,
multiplication, transpose, inverse)
86. Describe the use of nested if-else statements in MATLAB with examples.
87. Explain MATLAB function files, scope of variables, and function calling mechanism.
88. Explain data visualization properties such as line style, markers, and colors.
89. Explain the role of MATLAB in scientific and engineering applications.
90. Write a MATLAB program to sort elements of a vector in ascending order without using
built-in sort functions.