lab1 matlab report
lab1 matlab report
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.
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.
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.