ELEC1703-matlab代写
时间:2022-11-15
ELEC1703
MATLAB Assignment
1 – report –
Student ID number
UNIVERSITY OF LEEDS
PETER PETERSON
2019
Peter Peterson
Student ID number
Contents
1. Functions.............................................................................................................................................3
1.1 Mathematical functions.....................................................................................................................3
Functions code.....................................................................................................................................3
Main code............................................................................................................................................3
Functions plots....................................................................................................................................3
Comment.............................................................................................................................................3
1.2 Plot function......................................................................................................................................4
Function code......................................................................................................................................4
Code comments...................................................................................................................................4
Test......................................................................................................................................................4
2. McLaurin Expansion – numerical analysis............................................................................................5
2.1 Factorial function...............................................................................................................................5
Function code......................................................................................................................................5
Code comments...................................................................................................................................5
Test......................................................................................................................................................5
Comment and improvements..............................................................................................................5
2.2 McLaurin expansion of sinus function...............................................................................................6
Function code......................................................................................................................................6
Code comments...................................................................................................................................6
Test......................................................................................................................................................6
Comment and improvements..............................................................................................................6
2.3 McLaurin expansion of sinus function - analysis................................................................................7
Code....................................................................................................................................................7
Plot of numerical error versus number of terms for fixed value of x...................................................7
Comment.............................................................................................................................................7
Plot of numerical error versus x for fixed value of number of terms...................................................7
Comment.............................................................................................................................................7
Plots of additional analysis..................................................................................................................7
Comment.............................................................................................................................................7
3. M-files and constructing programs in MATLAB...................................................................................8
1
Peter Peterson
Student ID number
Matrix types............................................................................................................................................8
Matrix transpose.....................................................................................................................................8
Matrix determinant and inversion...........................................................................................................8
Solving systems of linear equations.........................................................................................................8
Instructions
- Insert your name and student number on cover page and document heading
- Most questions will require you to copy – paste what you did in MATLAB – you can do
this directly (copy-paste) or take a print screen (or use snipping tool in windows) and
paste a picture.
- Pasting snapshots via snipping tool in Windows is preferred. You may snapshot codes
as well.
- Comment your work. Your comments may carry 30 - 70% of the marks.
- Report format is guideline, feel free to change formatting style. Your main aim is to
create a neat summary of your work.
- When you are done, do not forget to update the table of contents on the first page. Right
click the table, click on Update Field, and choose Update entire table option.
2
Peter Peterson
Student ID number
1. Functions
1.1 Mathematical functions

Functions code
(snapshot)
Main code
(snapshot)
Functions plots
(Make sure graphs are properly labelled, and represented in neat manner)
Comment
(Overall comment. Describe what you learned.)
3
Peter Peterson
Student ID number
1.2 Plot function
Function code
(snapshot)
Code comments
(Describe how your code works and what you did, try commenting your lines within the code
as well.)
Test
(snapshot/s, use function on data of your choice)
4
Peter Peterson
Student ID number
2. McLaurin Expansion – numerical analysis
2.1 Factorial function
Function code
(snapshot or paste txt)
Code comments
(Describe how your code works and what you did, try commenting your lines within the code
as well.)
Test
(snapshot or paste MATLAB input/output)
Comment and improvements
(Overall comment. Describe what you learned and describe what you noticed during the test.
If you saw some limitations as data type protection or overflow, alter your function, justify the
alterations in this box and submit final version of your function code in the first box above.)
5
Peter Peterson
Student ID number
2.2 McLaurin expansion of sinus function
Function code
(snapshot or paste txt)
Code comments
(Describe how your code works and what you did, try commenting your lines within the code
as well.)
Test
(snapshot or paste MATLAB input/output)
Comment and improvements
(Overall comment. Describe what you learned. This function uses the one from 1.2, thus it
inherits any limitations that function had, make sure you protect this function as well, and pay
attention to the input data types, x needs to be single real number, while number of terms
needs to be positive integer)
6
Peter Peterson
Student ID number
2.3 McLaurin expansion of sinus function - analysis
Code
(snapshot or paste txt)
Plot of numerical error versus number of terms for fixed value of x
(Make sure graph is properly labelled, and represented in neat manner)
Comment
(Describe your observations of the graph)
Plot of numerical error versus x for fixed value of number of terms
(Make sure graph is properly labelled, and represented in neat manner)
Comment
(Describe your observations of the graph)
Plots of additional analysis
(Make sure graphs are properly labelled, and represented in neat manner. Repeat the code/s
by which you made the previous two plots and change the parameters that were fixed in order
to draw the conclusion how both parameters affect the function at the same time. You can
also attempt plotting numerical error vs x for different values of number of terms on the same
graph (recall the hold command from the previous task) and vice versa)
Comment
(Describe how the two inputs (x and number of terms) affect the function at the same time and
comment on the limitations of the function)
7
Peter Peterson
Student ID number
3. M-files and constructing programs in MATLAB
Question Matlab Input/Output Comment
Matrix types
3.1
3.2
3.3
3.4
Matrix transpose
3.5
Matrix determinant and inversion
3.6
Solving systems of linear equations
3.7
8
essay、essay代写