MATLAB is a numerical computing environment and programming language used for matrix manipulations, data analysis, and algorithm implementation. This document provides an introduction to basic MATLAB commands through a series of exercises. Students will learn to generate vectors of even and odd numbers, use commands like zeros and ones, and observe the 'magic' command which creates a matrix where the sums of each row, column and diagonal are equal. Completing these exercises teaches fundamental skills for working with matrices and data in MATLAB.
MATLAB is a numerical computing environment and programming language used for matrix manipulations, data analysis, and algorithm implementation. This document provides an introduction to basic MATLAB commands through a series of exercises. Students will learn to generate vectors of even and odd numbers, use commands like zeros and ones, and observe the 'magic' command which creates a matrix where the sums of each row, column and diagonal are equal. Completing these exercises teaches fundamental skills for working with matrices and data in MATLAB.
MATLAB is a numerical computing environment and programming language used for matrix manipulations, data analysis, and algorithm implementation. This document provides an introduction to basic MATLAB commands through a series of exercises. Students will learn to generate vectors of even and odd numbers, use commands like zeros and ones, and observe the 'magic' command which creates a matrix where the sums of each row, column and diagonal are equal. Completing these exercises teaches fundamental skills for working with matrices and data in MATLAB.
COURSE: BM4713 Matlab Programming for Bioengineering Analysis
EXPERIMENT 01
AIM: - To learn basic commands in MATLAB.
COMPONENTS REQUIRED:- Matlab software A system
THEORY:-
MATLAB is a multi-paradigm numerical computing environment and proprietary
programming language developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages. The MATLAB application is built around the MATLAB programming language. Common usage of the MATLAB application involves using the "Command Window" as an interactive mathematical shell or executing text files containing MATLAB code.
Fig 1. Matlab Software
EXERCISE/PROGRAMMING:-
1) To learn about the commands like zeros, ones, sum and diag
2) To learn about the ‘magic’ command
We can observe here that – sum of all element from
(R1=R2=R3=C1=C2=C3=D1=D2). 3) Create a vector consisting of even numbers from 15 to 27 in one command
4) Create a vector consisting of odd numbers from 15 to 27 in one command
5) Create a vector consisting of even numbers from 15 to 27 in one command in
decreasing order
6) Create a vector consisting of odd numbers from 15 to 27 in one command in