0% found this document useful (0 votes)
8 views

Simulation Lab Cycle Test Sample Questions

Uploaded by

sarvanansrinath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Simulation Lab Cycle Test Sample Questions

Uploaded by

sarvanansrinath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. a. Create script file to solve the quadratic equation x2 -7x +12 = 0.

b. Create and plot a sphere with a radius equal to 1.

2. a. Write a MATLAB program for four plots in 2-by-2 grid.


b. Create a multiple plot in single window.
3. a. Write a MATLAB code to know the pixel information.
b. Write a MATLAB code to Improve Image Contrast.

4. a. Create and plot a sphere with radius r.


b. Convert any Linear Equations to Matrix Form.

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.

8. a. Convert Original image into gray converter.


b. Write a program to convert rgb to gray converter and use subplot.

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.

10. a. Write a code to display bar graph, pie chart.


b. Write a code to display area, scatter, plot matrix, stem.

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.

12. Write a MATLAB program for the following.


a. Create combined plot of sine and cosine wave. Use different colors to discriminate the two
waveform.
b. Define X, Y and Z as coordinates of a unit sphere. Plot the unit sphere centered at the origin.
Define X2, Y2 and Z2 as coordinates of a sphere with a radius of 5 by multiplying the
coordinates of the unit sphere. Plot the second sphere, centering it at (5,-5, 0).
13. a. Write a code to display the plot, bar graph, pie chart, area, scatter, stem for the
given values.
x = 1900:10:2000
y = [75 91 105 123.5 131 150 179 203 226 249 281]

14. Write a program for the following using MATLAB software.


a. Load image into the workspace. Shrink the image by a factor of two. Display the
original image and the resized image.
b. Display the propertied of the image loaded in the workspace.

15. Write a program for the following using MATLAB software.


a. Load image into the workspace.
b. Convert RGB image to Gray scale image and HSV color model.
c. Display the propertied of the image loaded in the workspace.

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.

18. Do the following operations using SCILAB.


a. To create an array with four elements in a single row and display its length.
b. Find the transpose of the vector.
Create a two-dimensional square matrix assign the matrix value to a variable X and display the
result.

19. Do the following operations using SCILAB.


a. Find transpose and inverse of matrix X.
b. Create two 3-by-3 matrix named A and B. Perform addition, subtraction,
Multiplication and division.

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.

You might also like