Upload
ali-gh
View
216
Download
0
Embed Size (px)
Citation preview
7/24/2019 Coding for Tut 5
1/1
%This porgram will calculate the integral of a hyperbola%Vishal shrivastava 433960%eesa ebrahim 446760
Function A = 0.5 * ((x1-xmin) DIV n)) * (iy+iy+1)
%Variable declaration
i = 1;n = 100;count1 = 1; %count through the loop that will stop when n = i to solve for the integral valuecount2 = 1;
a = input('Please enter the value of the hyperbola: ');xmin = input('please enter the value of the distance over which the integral must be solved: ');x1 = infinity;
for count1 = 1:1:n
Inc(n+10);A(n); %calculates the area of the initial trapezoidtemp1 = A(count) + A(count+1)
for count2 = 1:1:i