Matlab Question and answers

Can We Run MATLAB without Graphics?

Sometimes we may want to run scripts that involve plotting commands without showing the plots and without going into the script to comment out the commands.

An example: if we are working from home and it’s too slow to run graphics over the network. We can play a simple UNIX trick:
%setenv DISPLAY /dev/null % matlab

Matlab Question and answers

What Is Pseudo-Random Binary Sequence and Numeric Precision In MATLAB?

Pseudorandom binary sequence: A form of creating an M-file in the new Frequency Domain System Identification Toolbox, for a specified set of lengths (2^2-1 to 2^30-1) is called a pseudo-random binary sequence. It is also called a mlbs (Maximum Length, Binary Sequence).

Numeric precision: Numeric quantities that are represented as double-precision floating-point numbers is called numeric precision. In systems, such numbers have 53 significant binary bits, which is about 15 or 16 decimal digits.

Matlab Question and answers

What Is Xmath?

Xmath is an interactive design and graphics environment for Xwindow?s workstations.

Following are the Xmath features:

  • Scripting languages with OOP features.
  • Libraries that are LNX and C language compatible.
  • Debugging tools with GUI features.
  • Color graphics can be pointed and clickable.
  • A specific layer is feasible that is programmable for MOTIF GUI.
Matlab Question and answers

What are the standard toolboxes present in MATLAB and how these toolboxes can be accessed?

Various types of toolboxes available are:

  • Control Systems
  • Fuzzy Logic
  • Image Processing
  • LMI Control
  • Neural Networks
  • Optimization
  • Partial Differential Equation
  • Robust Control
  • Signal Processing
  • Statistics
  • Symbolic Math
  • System Identification
  • Wavelets

To create this Toolbox, go to the MATLAB Start menu, then go to the Toolboxes submenu, then select the Toolbox which we want to use.

Matlab Question and answers

What are the MEX files?

MEX files are native C or C++ files that is dynamically connected directly into the MATLAB application at runtime. It allows using C, C++, and Fortran programs in MATLAB. They must be compiled for each hardware structure on which they are to be run.

Matlab Question and answers

What do you mean by M-file in MATLAB?

M-files are nothing but just a plain ASCII script that is interpreted at run time. We can say these are the subprograms stored in text files with .m extensions and are known as M-files. M-files are used for most of the MATLAB development, and platform independence and maintainability. It is parsed once and “just-in-time” compiled, but it is also transparent to the customer.

Matlab Question and answers

What are the basic Plots and Graphs of MATLAB?

Following table defines basic plots and graphs:

  • Box: Axis Border
  • Errorbar: Plots error bars along the curve.
  • Hold: Retains the current graph while adding a new graph.
  • Line: Creates a line object.
  • LineSpec (Line Specification): Syntax of Line Specification String.
  • Loglog: Log to the log-scale plot.
  • Plot: 2-D Line Plot.
  • Plot3: 3-D Line Plot.
  • Plotyy: 2-D Line plots with y-axis on both the left and right side
  • Polar: Polar coordinate plot.
  • Semilogx: Semilogarithmic plot.
  • Semilogy: Semilogarithmic plot.
  • Subplot: It creates an axis in tiled positions.
  • Xlim: Sets or queries x-axis limits.
  • Ylim:: Sets or queries y-axis limits.
  • Zlim: Sets or queries z-axis limits.
Matlab Question and answers

What is memory management functions in MATLAB?

Following are the lists of memory management functions.

  • Clear: It removes variables from memory.
  • Pack: It saves the existing variables to disk, and then reloads them contiguously.
  • Save: It selectively persists variable to disk.
  • Load: Reloads a data file stored with the save function.
  • Quit: Exits MATLAB and all allocated memory to the system.
Matlab Question and answers

What is 3D-Visualization elements in MATLAB?

3D-Visualization elements allow MATLAB to handle 3D graphics.

  • Surface and Mesh Plots: It includes plot matrices, visualizes functions, and color maps.
  • View Control: It is used to control camera viewpoint, rotation, zooming, and aspect ratio and set axis limits.
  • Lighting: It is used for adding and controlling scene lighting.
  • Transparency: It is used to specify object transparency.
  • Volume Visualization: It is used for the volume data grid.
Matlab Question and answers

What are the types of Loops does MATLAB provides?

MATLAB provides loops like

  • While Loop
  • For Loop
  • Nested Loops