Subjects > MATLAB >Practice Test

MATLAB

0. How can MATLAB be used in the following fields:
  1. Robotics
  2. Linear Algebra
  3. Calculus
  4. Electrical circuits
  5. Mechanical engineering
Show answer
MATLAB is used to generate numerical solutions in each of the above-listed fields and many more fields.
1. How does one start writing a MATLAB script? Show answer
Control + N or File > New
2. What is a .mat file? Show answer
A .mat file is a file that contains variables saved from the workspace. This can be useful when evaluating various scenarios.
3. How can you plot multiple plots on the same window as shown below solar calc
A plot showing cumulative solar energy collected by a solar thermal collector Show answer
Use subplot(m,n,p) function.
Review the code that generated the plot shown earlier here.
4. How can you solve a set of ordinary differential equations (ode)?
Show answer
Use MATLAB solvers such as ode45, ode23, e.t.c.
Contact River Hawk Tutors for specific advice
5. You are a new intern at a children's hospital. One day your boss asks that you make a MATLAB animation using 2-years-worth of data. The animation should show data being plotted and nothing else. Show answer
Contact River Hawk Tutors for a detailed solution
Think about using a 'for loop' and saving each plot as a frame of a video. Once we talk about videos, be aware of the video frames per second (fps), codecs, and color.
6. It so happens that during your research on solar PV cells, you come across a collection graphs that will be useful in your research data analysis (such as shown below). How can you use MATLAB to read this collection of graphs? You do not have time to read each one of the graphs manually. Eventually, for each graph, you want to have a 2D array of x and y points.

Image showing the original and extracted spectral response of an experimental solar PV cell Show answer
Find the code here
A simplified flow chart of the proposed solution is shown below

flow chart
7. How can you change a transfer function to its digital form? Show answer
Contact River Hawk Tutors for a detailed solution
Scroll to Top