Here we have mentioned most frequently asked MatLab Interview Questions and Answers specially for freshers and experienced.

**1. What does MatLab consist of?**

Ans:

MatLab consists of five main parts

- MatLab Language
- MatLab working environment
- Handle Graphics
- MatLab function library
- MatLab Application Program Interface (API)

**2. What are MATLAB system parts?**

Ans:

Following are the 5 main parts of MATLAB.

- MATLAB Languange.
- MATLAB working environment.
- Graphics handler.
- MATLAB mathematical library.
- MATLAB Application Program Interface.

**3. Explain MatLab API (Application Program Interface)?**

Ans:

MatLab API is a library that enables you to write Fortran and C programs that interact with MatLab. It contains the facilities for calling routines from MatLab, for reading and writing Mat files and calling Matlab as a computational engine.

**4. Explain about MATLAB language.**

Ans:

MATLAB language is a high-level matrix language.

It has control structures, functions, data structures, I/O and OOP features.

Allows rapid creation of throw-away programs.

Allows creating large and complex application programs.

MATLAB API allows to author C and FORTRAN programs to interact with MATLAB.

**5. What are the types of loops does Matlab provides?**

Ans:

Matlab provides loops like

- While Loop
- For Loop
- Nested Loops

**6. Describe the MATLAB working environment.**

Ans:

MATLAB working environment has various tools to work with MATLAB.

It has facilities to manage variables.

MATLAB supports export and import data across applications.

Certain tools are available to develop and manage MATLAB files.

Debugging and profiling of MATLAB applications are more flexible with MATLAB.

**7. List out the operators that MatLab allows?**

Ans:

Matlab allows following Operators

Arithmetic Operators

Relational Operators

Logical Operators

Bitwise Operations

Set Operations

**8. What is MATLAB mathematical function library?**

Ans:

MATLAB mathematical functions include computational algorithms.

The elementary computational functions are sum, sine, etc.

Matrix functions are available including matrix inversion.

Special functions like Bessel are available.

MATLAB includes transformation functions, namely Fourier Transformation Functions.

**9. Explain what is Simulink?**

Ans:

Simulink is an add-on product to MatLab, it provides an interactive, simulating, graphical environment for modeling and analyzing of dynamic systems.

**10. Explain about stress analysis in MATLAB.**

Ans:

MATLAB is used in aerospace engineering, space environment.

MATLAB is suitable for flexible dynamics.

These domain experts conduct stress analysis on various structures like metallic and composite structures.

To analyze the stress, NASTRAN, IDEAD, Oracle and PATRAN levels of proficiency is needed.

The tasks are also used on aircraft that is metallic structure.

The stress analysis includes control surface stiffness understanding, loop calculations, finite element modeling and fatigue testing requirement and analysis.

**11. Mention what is the sign convention used in MatLab’s fft routines?**

Ans:

The sign convention used in MatLab’s fft routines are defined as sum(x(i)*exp (-j*i*k/N)) and not sum (x(i)exp(j*i*k/N)). The first version is used by engineers, and the second is used by mathematician.

**12. In MatLab is it possible to handle multi-dimensional arrays?**

Ans:

No, it is not possible in MatLab to handle multi-dimensional arrays. Matlab’s internal data structure is limited to a two-dimensional matrix. But to handle multi-dimensional arrays in Matlab, you can create your own functions in Matlab language.

**13. Explain Handle Graphics in MATLAB.**

Ans:

Handle Graphics is a subsystem of MATLAB that handles graphics.

Handle Graphics has high level commands for 2D and 3D data visualization.

Image processing, animation and presentation graphics can be generated using Handle Graphics.

Low level commands allow customizing the graphics appearances.

Handle Graphics allows to build customized Graphics User Interfaces

**14. Explain about 3D visualization elements in MATLAB.**

Ans:

3D visualization elements allow MATLAB to deal with 3D graphics.

Surface and Mesh Plots – It includes plot matrices, visualize functions, color maps.

View Control – Used to control camera viewpoint, rotation, zooming, and aspect ratio and set axis limits.

Lighting – Used for adding and controlling scene lighting.

Transparency – Used to specify object transparency.

Volume Visualization – Used for volume data grid.

**15. What are the four basic functions to solve Ordinary Differential Equations (ODE)?**

Ans:

The four basic functions that MatLab has to solve ODE’s are

Quad

Quad8

ODE23

ODE45

**16. How to Pre Allocate a Non Double matrix?**

Ans:

Preallocating a block of memory for holding a non double matrix is memory efficient.

It is faster to use the function ‘repmat’.

While allocating block of memory for a matrix, zeros are pre allocated to a matrix.

The function to pre allocate memory is int8().

Ex: matrix = int8(zeros(100));

repmat function is used to create a single double matrix.

Ex: matrix2 = repmat(int8(0), 100, 100);

Thus non double matrix is pre allocated.

**17. Explain how polynomials can be represented in MatLab?**

Ans:

A polynomial in MatLab is denoted by a vector. To create a polynomial in MatLab enter each co-efficient of the polynomial into the vector in descending order

**18. Describe the memory management functions.**

Ans:

Below is the list of memory management functions.

clear – Removes variables from memory

pack – Saves the existing variables to disk, and then reloads them contiguously.

save – Selectively persists variables to disk.

load – Reloads a data file

quit – Exits MATLAB and returns all allocated memory to the system.

**19. What is the type of program files that MatLab allows to write?**

Ans:

Matlab allows two types of program files

Scripts: It is a file with .m extension. In these files, it writes series of command that you want to execute together. It does not accept inputs and do not return any outputs

Functions: They are also files with .m extension. Functions can accept inputs and return outputs.

**20. How to call MATLAB in batch mode?**

Ans:

Batch mode execution of MATLAB can be done from command line or from makefile.

A script is needed with extension .m.

Specify all the commands that are to execute in sequential order in the script.

The commands are placed in the script by using the command makefile

To add the commands in command line mode, type all the commands at the command line in sequential order.

The commands are executed soon after typing them at the command line.

**21. Explain how to modify the MatLab Path?**

Ans:

To modify the MatLab Path use the PathTool GUI. Also, you can use add path directories from the command line and add the path to rc to write the current path back to ‘pathdef.m.’ In the case if you don’t have permission to write for ‘pathdef.m’ then pathrc can be written into a different file, you can execute from your ‘startup.m.’

**22. What is LaTeX in MATLAB?**

Ans:

MATLAB allows Greek letters.

These letters are to be encoded.

To encode these Greek letters, LaTeX is used.

MATLAB already handles naturally simple LaTeX encodings that allow introducing Greek lettters or modifying the font size and appearance in plots.

**23. Explain how you can pre-allocate a Non-Double Matrix?**

Ans:

Pre-allocating a block of memory for holding a non-double matrix is memory efficient. While allocating blocks of memory for a matrix, zeros are pre-allocated to a matrix.

The functions to pre allocate memory is int8(), example matrix =int8(zeros(100));

Repmat function is used to create a single double matrix, example matrix2=repmat(int8(0), 100, 100)

**24. Can MATLAB run without graphics?**

Ans:

At times scripts need to run without displaying the plots.

By doing this, the script statement need not be commented.

When working from home, running graphics over the network may be too slow.

To perform the process, add the following lines of code:

%setenv DISPLAY /dev/null % MATLAB.

By using these simple tricks, we can run MATLAB without graphics.

**25. What is Xmath-Matlab? Mention the Xmath features?**

Ans:

For Xwindow workstations, Xmath is an interactive scripting and graphics environment.

Following are the X-math features

Scripting language with OOP features

Libraries that are LNX and C language compatible

A debugging tools with GUI features

Color graphics can be pointed and clickable

**26. Explain about Image arithmetic functions in MATLAB.**

Ans:

Following is the list of image arithmetic functions and their usage.

imabsdiff – Returns absolute difference of two images.

imadd – Performs addition of two images or addition of constant to image.

imapplymatrix – Applies linear combination of color channels.

imcomplement – Complements an image.

imdivide – Divide one image into another or divide image by constant.

imlincomb – Linear combination of images.

immultiply – Multiplies two images or multiplies image by constant.

imsubtract – Subtracts one image from another or subtracts constant from image.

**27. Name the graphic system used in MatLab?**

Ans:

Graphic system used in MatLab is known as handle graphics. It has a high level and low-level commands.

High Level Commands: High level command performs image processing, data visualization and animation for 2D and 3D presentation graphics

Low Level Commands: Full customization of the appearance of graphics and building of complete graphical user interface

**28. What is the process to change default settings for an object’s properties?**

Ans:

Following is the process to change the default settings:

Find the parent object by the statement

Hm=get(object’s_handle, ‘Parent’)

To specify the default , specify the following statement

Set(h,’DefaultObjectPropertyName’,’PropertyValue’)

Followed by this process, any line is plotted, will certainly have 25 as the line width.

**29. Explain what is M-file and MEX files in MatLab?**

Ans:

M files: They are just a plain ASCII text that is interpreted at run time. They are like sub-programs stored in text files with .m extensions and are called M-files. For most of the MatLab, development M-files are used.

MEX files: They are basically native C or C++ files which are linked directly into the MatLab application at runtime. MEX files have efficiency to crash the MatLab application.

**30. Which Graphic sytem is used in MATLAB? Explain it.**

Ans:

The graphic system which is used in Matlab is known as handle graphics. It has few high level and low level commands.

High level commands performs data visualization, image processing, and animation for two dimensional and three dimensional presentation graphics.

Full customization of the appearance of graphics and building of complete Graphical user interfaces on is done by low level commands in MATLAB applications

**31. Explain what is Interpolation and Extrapolation in Matlab? What are their types?**

Ans:

Interpolation: Taking out function values between different data points in an array is referred as Interpolation

Extrapolation: Finding function values beyond the endpoints in array is referred as Extrapolation

The two types of Interpolation and Extrapolation are

Linear Interpolation and Extrapolation

Quadratic Interpolation and Extrapolation

**32. Describe the various system parts of MATLAB**

Ans:

Various system parts of MATLAB include:

The MATLAB language: consists of high level array language.

The MATLAB working environment: set of tools and facilities that you work with as matlab user.

Handle Graphics: It includes high level and low level commands.

The MATLAB mathematical function library: It’s a collection of computational algorithms.

The MATLAB Application Program Interface (API): It’s a library which allows to write C and Fortran programs.

**33. List out some of the common toolboxes present in Matlab?**

Ans:

Some of the common toolboxes in Matlab are

Control System

Fuzzy Logic

Image Processing

LMI control

Neural Networks

Robust Control

System Identification

**34. What are the functions used to read text files from a certain format in Matlab?**

Ans:

Following functions can be used to read a text file:

DLMREAD: It allows you to read files with fields delimited by any character.

TEXTREAD: It allows you to skip lines at the beginning, ignore certain comment lines, read text as well as numbers, and more.

myfile.txt: It is for the file which has nothing but numbers separated by space, and has a constant number of columns through the entire file.

Other functions are FOPEN, FREAD, FSCANF, FGETL, FSEEK and FCLOSE

**35. What is Get and Set in Matlab?**

Ans:

Get and Set are referred as getter and setter functions. For assigning properties, setter functions are used while for accessing properties getter functions are used.

**36. What is a P-code?**

Ans:

P-code files are purposely obscured; they offer a secure means of distribution outside of your organization. Pcode is a preparsed and encoded version of the M-file. It saves on the load time of the function. This is most likely not an issue except for very large M-files, since most are parsed only once anyway. Pcode also lets you hide the source code from others. There is no way to convert Pcode back to the M-file source. Pcode is platform independent.

**37. Explain about the mentioned tools in matlab: who, whos, pi, eps, type**

Ans:

Who: will tell you all the variables you have currently defined.

whos: will tell you the variables, their sizes, and some other info.

pi: is a function of that returns the value of pi.

eps: is a function that returns Matlab’s smallest floating point number. This is useful if you have a vector that might contain zeros that is going to wind up in the denominator of something. If you add eps to the vector, you aren’t actually adding anything significant, but you won’t run into divide by zero problems anymore

Type: function name for any function in Matlab’s search path lets you see how that function is written.

**38. How the source code can be protected in Matlab?**

Ans:

By default the code is saved in (.m) extension, which is secured but if the user wants it to be stored in a more secured way then he can try the following methods:

Make it as P-code — Convert some or all of your source code files to a content-obscured form called a P-code file (from its .p file extension), and distribute your application code in this format.

Compile into binary format — Compile your source code files using the MATLAB Compiler to produce a standalone application. Distribute the latter to end users of your application.

**39. What is pseudo random binary sequence and numeric precision in matlab?**

Ans:

A form of generating 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 pseudo random binary sequence. It is also known as mlbs (for Maximum Length Binary Sequence).

Numeric quantities which are represented as double precision floating point numbers is called numeric precision. On most computers, such numbers have 53 significant binary bits, which is about 15 or 16 decimal digits

**40. What is Interpolation and extrapolation in Matlab? What are its different types?**

Ans:

Interpolation can be defined as taking out function values between different data points in an array whereas finding function values beyond the endpoints in an array is called extrapolation. Commonly both can be done by using nearby function values to define a polynomial approximation to the function that is good over a small region.

There are two types of Interpolation and Extrapolation:

Linear Interpolation and Extrapolation

Quadratic Interpolation and Extrapolation

**41. Explain what is MatLab? Where MatLab can be applicable?**

Ans:

MatLab is a high-level programming language with an interactive environment for visualization, numerical computation and programming function.

Matlab can be applicable at numerous instances like

• Allows matrix manipulations

• Plotting of functions and data

• Implementation of algorithms

• Creation of user interfaces

• Analyze data

• Develop algorithm

• Create models and applications

• Interfacing with programs written in other languages ( C++, C, Java and Fortran)

**42. What does MatLab consist of?**

Ans:

MatLab consists of five main parts

• MatLab Language

• MatLab working environment

• Handle Graphics

• MatLab function library

• MatLab Application Program Interface (API)

**43. Explain MatLab API (Application Program Interface)?**

Ans:

MatLab API is a library that enables you to write Fortran and C programs that interact with MatLab. It contains the facilities for calling routines from MatLab, for reading and writing Mat files and calling Matlab as a computational engine.

**44. What are the types of loops does Matlab provides?**

Ans:

Matlab provides loops like

• While Loop

• For Loop

• Nested Loops

**45. List out the operators that MatLab allows?**

Ans:

Matlab allows following Operators

• Arithmetic Operators

• Relational Operators

• Logical Operators

• Bitwise Operations

• Set Operations

**46. Explain what is Simulink?**

Ans:

Simulink is an add-on product to MatLab, it provides an interactive, simulating, graphical environment for modeling and analyzing of dynamic systems.

**47. In MatLab is it possible to handle multi-dimensional arrays?**

Ans:

Yes, it is possible in MatLab to handle multi-dimensional arrays. Matlab’s internal data structure is limited to a two-dimensional matrix. But to handle multi-dimensional arrays in Matlab, you can create your own functions in Matlab language.

**48. Mention what is the sign convention used in MatLab’s fft routines?**

Ans:

The sign convention used in MatLab’s fft routines are defined as sum(x(i)*exp (-j*i*k/N)) and not sum (x(i)exp(j*i*k/N)). The first version is used by engineers, and the second is used by mathematician.

**49. What are the four basic functions to solve Ordinary Differential Equations (ODE)?**

Ans:

The four basic functions that MatLab has to solve ODE’s are

• Quad

• Quad8

• ODE23

• ODE45

**50. Explain how polynomials can be represented in MatLab?**

Ans:

A polynomial in MatLab is denoted by a vector. To create a polynomial in MatLab enter each co-efficient of the polynomial into the vector in descending order

**51. What is the type of program files that MatLab allows to write?**

Ans:

Matlab allows two types of program files

• Scripts: It is a file with .m extension. In these files, it writes series of command that you want to execute together. It does not accept inputs and do not return any outputs

• Functions: They are also files with .m extension. Functions can accept inputs and return outputs.

**52. Explain how to modify the MatLab Path?**

Ans:

To modify the MatLab Path use the PathTool GUI. Also, you can use add path directories from the command line and add the path to rc to write the current path back to ‘pathdef.m.’ In the case if you don’t have permission to write for ‘pathdef.m’ then pathrc can be written into a different file, you can execute from your ‘startup.m.’

**53. Explain what is LaTex in MatLab?**

Ans:

MatLab handles naturally simple LaTex encoding which allows introducing greek letters or modifying the font size and appearance in plots.

**54. Explain how you can pre-allocate a Non-Double Matrix?**

Ans:

Pre-allocating a block of memory for holding a non-double matrix is memory efficient. While allocating blocks of memory for a matrix, zeros are pre-allocated to a matrix.

The functions to pre allocate memory is int8(), example matrix =int8(zeros(100));

Repmat function is used to create a single double matrix, example matrix2=repmat(int8(0), 100, 100)

**55. What is Xmath-Matlab? Mention the Xmath features?**

Ans:

For Xwindow workstations, Xmath is an interactive scripting and graphics environment.

Following are the X-math features

• Scripting language with OOP features

• Libraries that are LNX and C language compatible

• A debugging tools with GUI features

• Color graphics can be pointed and clickable

**56. Name the graphic system used in MatLab?**

Ans:

Graphic system used in MatLab is known as handle graphics. It has a high level and low-level commands.

• High Level Commands: High level command performs image processing, data visualization and animation for 2D and 3D presentation graphics

• Low Level Commands: Full customization of the appearance of graphics and building of complete graphical user interface

**57. Explain what is M-file and MEX files in MatLab?**

Ans:

M files: They are just a plain ASCII text that is interpreted at run time. They are like sub-programs stored in text files with .m extensions and are called M-files. For most of the MatLab, development M-files are used.

MEX files: They are basically native C or C++ files which are linked directly into the MatLab application at runtime. MEX files have efficiency to crash the MatLab application.

**58. Explain what is Interpolation and Extrapolation in Matlab? What are their types?**

Ans:

• Interpolation: Taking out function values between different data points in an array is referred as Interpolation

• Extrapolation: Finding function values beyond the endpoints in array is referred as Extrapolation

The two types of Interpolation and Extrapolation are

• Linear Interpolation and Extrapolation

• Quadratic Interpolation and Extrapolation

**59. List out some of the common toolboxes present in Matlab?**

Ans:

Some of the common toolboxes in Matlab are

• Control System

• Fuzzy Logic

• Image Processing

• LMI control

• Neural Networks

• Robust Control

• System Identification

**60. What is Get and Set in Matlab?**

Ans:

Get and Set are referred as getter and setter functions. For assigning properties, setter functions are used while for accessing properties getter functions are used.

**61. What Is MATLAB?**

Ans:

MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include:

* Math and computation

* Algorithm development

* Modeling, simulation, and prototyping

* Data analysis, exploration, and visualization

* Scientific and engineering graphics

* Application development, including Graphical User Interface building

**62. What are the MATLAB System Parts?**

Ans:

The MATLAB system consists of five main parts:

* The MATLAB language.

* The MATLAB working environment.

* Handle Graphics.

* The MATLAB mathematical function library.

* The MATLAB Application Program Interface (API).

**63. Explain The MATLAB language?**

Ans:

This is a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented programming features. It allows both “programming in the small” to rapidly create quick and dirty throw-away programs, and “programming in the large” to create complete large and complex application programs.

**64. Explain The MATLAB working environment?**

Ans:

This is the set of tools and facilities that you work with as the MATLAB user or programmer. It includes facilities for managing the variables in your workspace and importing and exporting data. It also includes tools for developing, managing, debugging, and profiling M-files, MATLAB’s applications.

**65. Explain Handle Graphics in Matlab?**

Ans:

This is the MATLAB graphics system. It includes high-level commands for two-dimensional and three-dimensional data visualization, image processing, animation, and presentation graphics. It also includes low-level commands that allow you to fully customize the appearance of graphics as well as to build complete Graphical User Interfaces on your MATLAB applications.

**66. Explain The MATLAB mathematical function library?**

Ans:

This is a vast collection of computational algorithms ranging from elementary functions like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix eigenvalues, Bessel functions, and fast Fourier transforms.

**67. Explain The MATLAB Application Program Interface (API)?**

Ans:

This is a library that allows you to write C and Fortran programs that interact with MATLAB. It include facilities for calling routines from MATLAB (dynamic linking), calling MATLAB as a computational engine, and for reading and writing MAT-files.

**68. how to Add noise to an image in Matlab?**

Ans:

The function noise.m, now installed on ashland too, adds Gaussian, uniform, salt and pepper, additive or multiplicative noise to an image.

**69. What can we use Matlab for?**

Ans:

Simple calculations 2. Plotting and analyzing mathematical relationships (2D and 3D) 3. List & Matrix Operations 4. Writing script files (a type of programming) 5. Symbolic manipulation of equations 6. Advanced visualization, animation and GUI interface tools

**70. Vectorization What is that in Matlab? How to do it ?**

Ans:

Thinking is terms of full matrices/vectors and also some related functions for that * Use of filter(), which works beautifully for some time series models

**71. On what machines Matlab should be run?**

Ans:

We will run it from sthelens, and only if sthelens is down, from cher, orsay or tiree. It works on other machines too, but some of the other machines have older versions of the OS and core dump upon exiting from matlab. Some other local machines with new setups work fine. Try your local machine. Matlab is blocked from running on the servers

**72. Explain LaTeX in Matlab?**

Ans:

Matlab already handles naturally simple LaTeX encodings that allow introducing Greek lettters or modifying the font size and appearance in plots.

**73. Can we run Matlab without graphics?**

Ans:

Sometimes you may want to run scripts which contain plotting commands without displaying the plots and without going into the script to comment out the commands. An example: if you’re working from home and it’s too slow to run graphics over the network. You can play a simple UNIX trick: % setenv DISPLAY /dev/null % matlab

**74. How to correctly apply the graphics patches in Matlab?**

Ans:

Open a LOCAL MACHINE window and type: xhost +ashland # Add the following code sequence just before the plot command that was giving you problems: figure; set(gcf,’renderer’,’zbuffer’); [s,w] = unix(‘echo $DISPLAY’); set(gcf,’XDisplay’,w);

**75. How to call matlab in batch mode?**

Ans:

This can be done from the command line or from a makefile. You need a script (filename.m). Just type at the command line, or include in the makefile: matlab

**76. Explain about stress analysis in Matlab?**

Ans:

People working on these areas as a aerospace engineers should have familiarity and exposure to NASTRAN and MATLAB with knowledge on space environment and modeling of flexible dynamics. These aerospace engineers will be responsible to conduct stress analysis on metallic and composite structures. NASTRAN, IDEAD, Oracle and PATRAN proficiency level is required. Their duties also include on aircraft which are metallic and composite structures. This includes and understanding of control surface stiffness and loop calculations, finite element modeling (FEM), fatigue testing requirement and analysis.

**77. Explain Matlab applications?**

Ans:

its used for best in human reality

**78. How can i simulate a 2 phases voltage dip in simulink/matlab?**

Ans:

You need to use Simulink Simpower toolbox and voltage source. Use any RL branch as load and add acircuit breaker between source and load to create voltage dip at specified simulation time.

**79. Do you know about MATLAB system parts?**

Ans:

Following are the 5 main parts of MATLAB.

- MATLAB Languange.
- MATLAB working environment.
- Graphics handler.
- MATLAB mathematical library.
- MATLAB Application Program Interface.

**80. Explain briefly about MATLAB language?**

Ans:

MATLAB language is a high-level matrix language.

- It has control structures, functions, data structures, I/O and OOP features.
- Allows rapid creation of throw-away programs.
- Allows creating large and complex application programs.
- MATLAB API allows to author C and
- FORTRAN programs to interact with MATLAB.

**81. What is MATLAB working environment?**

Ans:

MATLAB working environment has various tools to work with MATLAB.

It has facilities to manage variables.

MATLAB supports export and import data across applications.

Certain tools are available to develop and manage MATLAB files.

Debugging and profiling of MATLAB applications are more flexible with MATLAB.

**82. Explain briefly MATLAB mathematical function library?**

Ans:

MATLAB mathematical functions include computational algorithms.

The elementary computational functions are sum, sine, etc.

Matrix functions are available including matrix inversion.

Special functions like Bessel are available.

MATLAB includes transformation functions, namely Fourier Transformation Functions.

**83. What is stress analysis in MATLAB?**

Ans:

MATLAB is used in aerospace engineering, space environment.

MATLAB is suitable for flexible dynamics.

These domain experts conduct stress analysis on various structures like metallic and composite structures.

To analyze the stress, NASTRAN, IDEAD, Oracle and PATRAN levels of proficiency is needed.

The tasks are also used on aircraft that is metallic structure.

The stress analysis includes control surface stiffness understanding, loop calculations, finite element modeling and fatigue testing requirement and analysis.

**84. What is handle graphics in MATLAB?**

Ans:

Handle Graphics is a subsystem of MATLAB that handles graphics.

Handle Graphics has high level commands for 2D and 3D data visualization.

Image processing, animation and presentation graphics can be generated using Handle Graphics.

Low level commands allow customizing the graphics appearances.

Handle Graphics allows to build customized Graphics User Interfaces

**85. What are 3D visualization elements in MATLAB?**

Ans:

3D visualization elements allow MATLAB to deal with 3D graphics.

Surface and Mesh Plots – It includes plot matrices, visualize functions, color maps.

View Control – Used to control camera viewpoint, rotation, zooming, and aspect ratio and set axis limits.

Lighting – Used for adding and controlling scene lighting.

Transparency – Used to specify object transparency.

Volume Visualization – Used for volume data grid.

**86. What are the Basic Plots and Graphs of MATLAB?**

Ans:

Following table describes basic plots and graphs.

Box – Axis border

Errorbar – Plots error bars along curve

Hold – Retains current graph while adding new graphs

Line – Creates line object

LineSpec (Line Specification) – Syntax of Line Specification String

Loglog – Log to log scale plot

Plot – 2-D line plot

Plot3 – 3-D line plot

Plotyy – 2-D line plots with y-axis on both left and right side

Polar – Polar coordinate plot

Semilogx – Semilogarithmic plot

Semilogy- Semilogarithmic plot

Subplot- Creates 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

**87. Do you know how to Pre Allocate a Non Double matrix?**

Ans:

Preallocating a block of memory for holding a non double matrix is memory efficient.

It is faster to use the function ‘repmat’.

While allocating block of memory for a matrix, zeros are pre allocated to a matrix.

The function to pre allocate memory is int8().

Ex: matrix = int8(zeros(100));

Repmat function is used to create a single double matrix.

Ex: matrix2 = repmat(int8(0), 100, 100);

Thus non double matrix is pre allocated.

**88. What is memory management functions in MATLAB?**

Ans:

Below is the list of memory management functions.

Clear – Removes variables from memory.

Pack – Saves the existing variables to disk, and then reloads them contiguously.

Save – Selectively persists variables to disk.

Load – Reloads a data file saved with the save function.

Quit – Exits MATLAB and returns all allocated memory to the system.

**89. Suppose if you know then tell me how to call MATLAB in batch mode?**

Ans:

Batch mode execution of MATLAB can be done from command line or from makefile.

A script is needed with extension .m.

Specify all the commands that are to execute in sequential order in the script.

The commands are placed in the script by using the command makefile

To add the commands in command line mode, type all the commands at the command line in sequential order.

The commands are executed soon after typing them at the command line.

**90. Do you know what is LaTeX in MATLAB?**

Ans:

MATLAB allows Greek letters.

These letters are to be encoded.

To encode these Greek letters, LaTeX is used.

MATLAB already handles naturally simple LaTeX encodings that allow introducing Greek lettters or modifying the font size and appearance in plots.

**91. Do you know how to correctly apply the graphics patches in MATLAB?**

Ans:

Following is the sequence of commands to apply graphic patches in MATLAB.

Open the LOCAL MACHINE window.

Type the command xhost + ashland.

Add the following code sequence before the plot command.

Figure;

Set(gcf,’renderer’,’zbuffer’);

[s,w] = unix(‘echo $DISPLAY’);

Set(gcf, ‘XDisplay’,w);

**92. Tell me can MATLAB run without graphics?**

Ans:

At times scripts need to run without displaying the plots.

By doing this, the script statement need not be commented.

When working from home, running graphics over the network may be too slow.

To perform the process, add the following lines of code:

%setenv DISPLAY /dev/null % MATLAB.

By using these simple tricks, we can run MATLAB without graphics.

**93. What is image arithmetic functions in MATLAB?**

Ans:

Following is the list of image arithmetic functions and their usage.

Imabsdiff – Returns absolute difference of two images.

Imadd – Performs addition of two images or addition of constant to image.

Imapplymatrix – Applies linear combination of color channels.

Imcomplement – Complements an image.

Imdivide – Divide one image into another or divide image by constant.

Imlincomb – Linear combination of images.

Immultiply – Multiplies two images or multiplies image by constant.

Imsubtract – Subtracts one image from another or subtracts constant from image.

**94. What is Xmath?**

Ans:

Xmath is an interactive scripting and graphics environment for Xwindow workstations.

With its significant improvement features on MATLAB-type software, interactive mathematics, scripting functionalities are elaborated.

Following are the Xmath features:

Sripting languages with OOP features.

Libraries that are LNX and C language compatible.

A debugging tools with GUI features.

Color graphics can be pointed and clickable.

A special layer is available that is programmable for MOTIF GUI.

**95. Do you know MatLab consist of what?**

Ans:

MatLab consists of five main parts

MatLab Language

MatLab working environment

Handle Graphics

MatLab function library

MatLab Application Program Interface (API)

**96. Do you know what are the types of loops does Matlab provides?**

Ans:

Matlab provides loops like

While Loop

For Loop

Nested Loops

**97. What are the operators that MatLab allows?**

Ans:

Matlab allows following Operators

Arithmetic Operators

Relational Operators

Logical Operators

Bitwise Operations

Set Operations

**98. Do you know what is Simulink?**

Ans:

Simulink is an add-on product to MatLab, it provides an interactive, simulating, graphical environment for modeling and analyzing of dynamic systems.

**99. Do you know what are the four basic functions to solve Ordinary Differential Equations?**

Ans:

The four basic functions that MatLab has to solve ODE’s are

Quad

Quad8

ODE23

ODE45

**100. What are Xmath features?**

Ans:

Scripting language with OOP features

Libraries that are LNX and C language compatible

A debugging tools with GUI features

Color graphics can be pointed and clickable

**101. What graphic system used in MatLab?**

Ans:

Graphic system used in MatLab is known as handle graphics. It has a high level and low-level commands.

High Level Commands: High level command performs image processing, data visualization and animation for 2D and 3D presentation graphics

Low Level Commands: Full customization of the appearance of graphics and building of complete graphical user interface

**102. What are M-file?**

Ans:

They are just a plain ASCII text that is interpreted at run time. They are like sub-programs stored in text files with .m extensions and are called M-files. For most of the MatLab, development M-files are used.

**103. What common toolboxes present in Matlab?**

Ans:

Some of the common toolboxes in Matlab are

Control System

Fuzzy Logic

Image Processing

LMI control

Neural Networks

Robust Control

System Identification

**104. Do you know what is Get and Set in Matlab?**

Ans:

Get and Set are referred as getter and setter functions. For assigning properties, setter functions are used while for accessing properties getter functions are used.

**105. What is MEX in MATLAB?**

Ans:

They are basically native C or C++ files which are linked directly into the MatLab application at runtime. MEX files have efficiency to crash the MatLab application

#### About the author

#### One comment

### Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

stays on topic and states valid points. Thank you.