0% found this document useful (0 votes)
3 views8 pages

lab1 matlab report

The document outlines a MATLAB lab sheet for a student named Manjari M, detailing various exercises and inferences related to evaluating expressions, using loops, plotting graphs, and constructing functions. Key learnings include the use of MATLAB for mathematical calculations, graphing techniques, and function declarations. The document emphasizes the application of programming concepts such as loops, conditionals, and matrix operations in MATLAB.

Uploaded by

manjarimohanraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views8 pages

lab1 matlab report

The document outlines a MATLAB lab sheet for a student named Manjari M, detailing various exercises and inferences related to evaluating expressions, using loops, plotting graphs, and constructing functions. Key learnings include the use of MATLAB for mathematical calculations, graphing techniques, and function declarations. The document emphasizes the application of programming concepts such as loops, conditionals, and matrix operations in MATLAB.

Uploaded by

manjarimohanraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

LABSHEET1

Name: Manjari M
Roll no: AM.EN.U4ECE24033
Class: ECE-A
1) Evaluate the MATLAB expressions and note down your observations

Inference:
From the above question we learnt how to evaluate the mathematical
expression in MATLAB, use of % for comment lines, change of values in
the variables based on succession order. Usage of script file and
command prompt was also inferred.

2) Determine the sum of geometric expression ∑ 2 6 𝑛 𝑛=1 using (i) while statement (ii)
for statement.

From the above question it is inferred on how to use the looping


statements in the MATLAB platform, geometric progression logic is
applied in the for statement and while statement.
3) Sketch the following graph
Inference:
It is inferred here on how to use the plotting functions in MATLAB, also the use of
subplots to generate multiple graphs in the same window is learnt, in addition the
use x-axis, y-axis labeling and naming the graphs commands are also learnt.

4) Construct a function to compute 𝑦 = 𝑥 2 𝑥 3+1 for the values of x from 0 to 3 with


steps of 0.01(use for loop).

Inference:
Declaration of function and function call in the command prompt for different values
of x using for loop with a step value of 0.01 is learnt.

5) Construct a function to compute 𝑦 = 𝑥𝑐𝑜𝑠(𝑥) 𝑥 2+4𝑥+1 for the values of x from 0


to 3 with a step size of 0.01.

Inference:
Declaration of function and function call being initiated in the command prompt for
a large number of values of x using for loop is inferred.
6) Construct a function to compute the average of n numbers.

Inference:
Creating a function to find the average of numbers using the mathematical formulae
for average calculation is done and the function is called for the desired value of n in
the command prompt. It is also inferred from the functions concept that the naming
of the functions file should be same as that of the function name.

Practice Questions:

Inference:
Usage of MATLAB for various mathematical expressions.

Inference:
Using the matrix syntax to assign values to the matrix elements.
Inference:
Commands to call various rows and columns in the matrix was inferred.

Inference:
Plotting of graphs using the plot function is inferred.

Inference:
Plotting of multiple graphs using different representation of colors and labeling of
the same in the same axis is inferred.
Inference:
Usage of subplots to generate multiple plots is inferred.

Inference:
Usage of for loop to print numbers from 10 to 20 using ‘:’ which acts like a range
command in python.

Inference:
Using the while loop to generate values for different values for the function.

Inference:
Usage of if and if else statements is inferred.
Inference:
Declaration of function to calculate the average of numbers is inferred.

Inference:
Using functions to generate mean and standard variation of numbers by using the
mathematical formulae.

Inference:
Complex number operations in MATLAB is inferred.
Inference:
Complex number operations to find the polar and rectangular form of the complex
numbers is learnt.

You might also like