Anubhav Mat Ab
Anubhav Mat Ab
SUBMITTED BY -
NAME – ANUBHAV KAUSHIK
ENROLL. NO – 22102035
BATCH – A2
MATLAB Overview:
MATLAB® serves as a powerful language for technical computation. It seamlessly integrates
computation, visualization, and programming within an intuitive environment. Mathematical
problems and solutions are expressed using familiar mathematical notation.
Key Applications:
MATLAB finds utility in various domains, including:
- Mathematics and Algorithm Development
- Data Acquisition and Processing
- Modeling, Simulation, and Prototyping
- Data Analysis, Exploration, and Visualization
- Scientific and Engineering Graphics
- Application Development, including GUI Building
MATLAB Basics:
1.MATLAB Windows:
- MATLAB Desktop: Launch MATLAB by double-clicking its icon. The desktop
comprises sub-windows:
a. Command Window: Input variables, execute functions, and scripts. Use the MATLAB
command prompt (>>).
b. Current Directory: Lists files in the current directory. Perform actions like running,
renaming, or deleting files.
c. Workspace: Holds variables created during the session.
d. Command History: Logs entered statements; rerun, copy, or create M-files from this
history.
- Figure Window: Displays graphics output separately.
- Editor Window: Create and debug M-files (scripts) with a graphical user interface.
2. Input-Output:
- Data Types: Work with matrices and arrays of various data types, including numbers,
characters, strings, logical values, and more.
- Dimensioning: MATLAB handles automatic dimensioning of arrays.
- Case Sensitivity: MATLAB is case-sensitive for variable names, function names,
filenames, objects, and classes.
- Output Display: Command output displayed in the Command Window. Use a semicolon
to suppress output.
- Output Format: Control display format using commands like "format short e" or "format
long e."
6.Flow Control:
- Use relational operators (<, >, <=, >=, ==, ~=) for comparisons.
- Employ logical operators (&, |, ~, xor, all, any) for logical conditions.
- Use if/else/elseif for conditional execution.
- Utilize for loops for a specified number of iterations.
- Apply while loops for repeated execution based on a condition.
These fundamentals of MATLAB provide a foundation for further exploration and application
in diverse technical fields.
5.Built- in functions
a=sqrt(2)
b=log(2),
c=log10(0.23)
d=cos(1.2),
e=atan(-.8)
f=exp(2+4*i)
g=round(1.4),h=floor(3.3),
i=ceil(4.23) j=angle(i), k=abs(1+i)
6.Element-wise functions
t = [1 2 3]
f = exp(t)
g = [exp(1) exp(2) exp(3)]
a = [1 2 3]; b = [4; 2; 1]
a.*b, a./b, a.^ b
a.*b',a./b',a.^(b')
1. Data Type Comprehension: Participants will develop a deeper grasp of various data
types within MATLAB, including numeric arrays, logical values, and strings. They will
learn how to effectively manipulate and perform operations on these data types.
6. Function Creation and Usage: Participants will cultivate the ability to craft their own
functions, subsequently incorporating these functions within MATLAB scripts.