0% found this document useful (0 votes)
9 views

basic matlab

Uploaded by

kingdomofgodinfo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

basic matlab

Uploaded by

kingdomofgodinfo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

OEC076/Basic of Matlab

1. Write a MATLAB script to display "Hello, World!" and get user input to
display a personalized message.
2. Create a MATLAB script that performs basic arithmetic operations
(addition, subtraction, multiplication, division) on two user-input numbers
and displays the results.
3. Write a MATLAB function to convert temperature from Celsius to
Fahrenheit and vice versa.
4. Develop a MATLAB script to solve a quadratic equation (ax2+ bx+c=0)
and display the roots.
5. Implement a MATLAB script that uses if-else statements to Categorize a
given number as positive, negative, or zero.
6. Write a MATLAB script that demonstrates the use of for and while loops to
compute the factorial of a number.
7. Create a MATLAB function that takes a matrix as input and returns the
transpose of the matrix.
8. Write a MATLAB script to perform matrix addition, subtraction, and
multiplication using user-defined matrices.
9. Develop a MATLAB script to plot a sine wave and a cosine wave on the
same graph with appropriate labels and legends.
10.Implement a MATLAB script to read data from a CSV file and plot it using a
bar chart.
11.Write a MATLAB script to create sub plots of various mathematical
functions (sine, cosine, exponential) in a single figure.
12.Create a MATLAB script to read and display an image, then convert it to
grayscale.

Unit 1: Introduction to MATLAB


Overview of MATLAB, History and Features, Installation and Interface Overview,
MATLAB Environment, Command Window, Workspace and Variable Editor, Script
and Function Files, Basic Syntax and Commands, Data Types and Variables,
Arithmetic Operations, Logical and Relational Operators, Input/Output, Displaying
Output (`disp`, `fprintf`), User Input (`input`).
Unit 2: Matrix and Array Operations
Basics of Matrices and Arrays, Creating Matrices and Arrays, Indexing and Slicing,
Reshaping and Transposing, Matrix Operations, Addition, Subtraction,
Multiplication, and Division, Element-wise Operations, Determinants, Inverses,
and Eigenvalues, Special Matrices, Identity, Zeros, and Ones, Diagonal and
Sparse Matrices
Unit 3: Programming in MATLAB
Control Structures, Conditional Statements (`if`, `else`, `switch`), Loops (`for`,
`while`), Functions, Defining and Calling Functions, Anonymous and Nested
Functions, File Handling, Reading/Writing Data (`xlsread`, `xlswrite`, `csvread`,
`csvwrite`), Debugging and Optimization, Breakpoints and Error Handling,
Improving Code Efficiency
Unit 4: Data Visualization and Applications
Plotting and Visualization, Basic 2D Plots (`plot`, `scatter`, `bar`, `hist`),
Advanced Plots (`surf`, `mesh`, `contour`), Customizing Plots (Titles, Labels,
Legends, Colors), Data Analysis, Statistical Functions (mean, median, std), Curve
Fitting and Interpolation, Simulink Introduction, Overview and Basic Blocks,
Building Simple Models
Explore MATLAB applications in engineering, science, and research, including an
introduction to Simulink.

You might also like