MATLAB_ K24AS11_Tutorial 6(content+question) (1)
MATLAB_ K24AS11_Tutorial 6(content+question) (1)
Tutorial-6
MATLAB stands for Matrix Laboratory. It is a high-performance language that is used for technical
computing. It was developed by Cleve Molar of the company MathWorks.Inc in the year 1984. It is
written in C, C++, Java. It allows simple calculation, Array (matrix) manipulations, plotting of
functions, implementation of algorithms and creation of user interfaces.
• Command Window: In this window one must type and immediately execute the
statements, as it requires quick prototyping. These statements cannot be saved. Thus, this
can be used for small, easily executable programs. It is indicated by the command
prompt(>>). Then using upward key for editing previous command.
• Command History window: This window displays a log of statements that you run in the
current and previous MATLAB sessions. The Command History lists the time and date of
each session in the short date format for your operating system, followed by the statements
from that session.
• Workspace: In this window the values of the variables that are created in the course of the
program (in the editor) are displayed.
• Editor (Script): In this window one can execute larger programs with multiple statements,
and complex functions These can be saved and are done with the file extension ‘.m ‘
• MATLAB Library comes with a set of many inbuilt functions. This library is the vast
collection of tools for computational algorithms of trigonometrical, complex
arithmetic, matrix computation, eigen value and eigen vectors, Bessel function,
Fourier transform, backpropagation, fuzzy, genetic algorithm and many more.
Although MATLAB is encoded in C, C++ and Java, it is a lot easier to implement than these
three languages. It provides an easier alternative for vector operations. It can perform only
one command instead of multiple statements as in other programming language.
Basic Functions in MATLAB
Function Description
The values or the text printed within single quotes is displayed on the
disp()
output screen
Operators (arithmetic)
Operations such as addition, subtraction, multiplication and division can be done using a single
command instead of multiple loops
+ Addition
- Subtraction
* Multiplication
/ Division
^ Power
‘ Complex conjugate transpose
KIET Group of Institutions, Delhi – NCR, Ghaziabad
Department of Applied Sciences
B.Tech. I SEM
Tutorial No: 6, (2024-25)
MATLAB (Calculus for Engineers (K24AS11))
Q. No. Questions CO BL
2 1 1 1
Evaluate 23+5 + 4 × 5 , in the command window of MATLAB 3
If two sides of right triangle have lengths 31 and 45, evaluate the length of
3 3
the hypotenuse using the command window of MATLAB