1. Write down a MATLAB code for Secant Method.
Calculate approximate error for each step and
show graphical presentation of error propagation.
2. Write down a MATLAB code for Fixed Point Iteration Method. Calculate approximate error for
each step and show graphical presentation of error propagation.
3. Write down a MATLAB code to determine LCM of two numbers. Check the attached figure to
know how to calculate LCM of two numbers.
4. Now make your problem -3 code an 'user defined function' in MATLAB named LCM_my(x,y).
That means this function will take two numbers as input and give the result of LCM of these as
output.
Example:
>> LCM_my(10, 12)
>> 60
5. Write down a user defined function named 'Check_max_min_point (a,b,c)' that will take three
inputs values of a, b and c and evaluate the first derivative of f with respect to x, y and z as fx, fy
and fz respectively at (a,b,c) point where f is as follows.
3 -x
f = 3ysin x + 2yln(z-1) – 3e
If fx, fy and fz all are zero then it will show comment as
'This is the max/min point in the function'
and if any of them are non zero, then it will show the comment
'This is not the max/min point of the function'
Example:
>> Check_max_min_point(2,3,4)
This is not the min/max point
>> Check_max_min_point(0,1,0)
This is not the min/max point
>> Check_max_min_point(0,0,0)
This is not the min/max point