Simulation Lab Cycle Test Sample Questions
Simulation Lab Cycle Test Sample Questions
5. a. Create a two-dimensional line plots, use the plot and stem function.
b. Create a three dimensional plot using meshgrid.
6. Create a spreadsheet file and a text file containing meaningful values of rows and
columns, import the values, and display them in MATLAB. Modify the imported data
and save them by renaming the filename.
7. a. Create three matrices of the same size and add the color.
b. Create a quiver function plots 2-D vectors as arrows.
9. Create a spreadsheet containing the values of the x-axis and y-axis values of the graph in
rows and columns, Import the data to MATLAB, and plot the values as graphs of
various types with the same values of x and y columns created in the spreadsheet.
11. Write a script file for the following elementary functions and display the outputs in
single graph:
a. Create a variable x and assign any value. Let y may be square function of x. Plot
the bar graph for x and y. Give necessary labels and title for the graph.
b. Create variables and execute the output using the square root function, log
function and exponential functions.
16. a. Write a script file for the generation of the following basic signals and display the outputs in
single graph:
i. Continuous Sine signal.
ii. Discrete Sine signal
iii. Continuous cosine signal.
iv. Discrete cosine signal.
17. Write a MATLAB program to perform the following operations and display the output in a
single plot.
a. Read an image.
b. Convert RGB image to gray scale image.
c. Rotate the image by 90 degrees.
d. Crop the image.
20. Create the mathematical models for the following using Simulink.
a. Consider a sinusoidal signal of amplitude 2V, it needs to be amplified by a factor of 10
for distant transmission. Display the input and amplified waveform in single graph.
21. Create the mathematical models for the following using Simulink.
a. Create a simplified model for the motion of a car. A car is typically in motion while the
gas pedal is pressed. After the pedal is released, the car idles and comes to a stop. Here
the input pulse represents a press of the gas pedal — 1 when the pedal is pressed and 0
when it is not.
22. Write a MATLAB program to perform the following operations and display the output in a
single plot.
a. Read an image.
b. Convert RGB image to gray scale image.
c. Rotate the image by 180 degrees.
d. Crop the image.