Experiment No:01 Experiment Name: Introduction To MATLAB Objective
Experiment No:01 Experiment Name: Introduction To MATLAB Objective
Theory: MATLAB (MATrix LABoratory) is a high-level programming language that allows for
easy manipulation of matrices and arrays. It provides a user-friendly environment for numerical
computations and data visualization. Some key concepts and features of MATLAB include:
a. Matrix Operations: MATLAB's core strength lies in its ability to perform matrix operations
efficiently. Matrices can be created, modified, and manipulated with ease, making it ideal for
solving complex mathematical problems.
b. Functions and Scripting: MATLAB allows the creation of functions and scripts, which are
reusable blocks of code. Functions are designed to perform specific tasks, while scripts are a
series of commands executed sequentially.
c. Plotting and Visualization: MATLAB provides numerous tools for visualizing data, creating
2D and 3D plots, and customizing their appearance. This makes it convenient for representing
and interpreting experimental results.
Desktop Tools:
1- Command Window: Use the Command Window to enter variables and run
functions and M-files.
2- Command History: Statements you enter in the Command Window are logged in
the Command History. In the Command History, you can view previously run
statements, and copy and execute selected statements.
3- Current Directory Browser: MATLAB file operations use the current directory
reference point. Any file you want to run must be in the current directory or on the
search path.
4- Workspace: The MATLAB workspace consists of the set of variables (named
arrays) built up during a MATLAB session and stored in memory. Current Directory Browser
Command window Workspace
Basic Commands:
Matlab code:
clc
clear all
a=[1 2 3 ; 3 4 5 ; 6 7 8]
Result:
a=
1 2 3
3 4 5
6 7 8
Discussion:
The lab session proved to be an effective starting point for students to learn MATLAB
programming. By understanding the basic concepts and techniques covered in this experiment,
participants are better equipped to tackle more complex problems using MATLAB in their future
academic and professional endeavors.