Hiren Rana
Followers: 0 Following: 0
Feeds
已回答
Trapezoidal numerical integration without use of function?
a=0; b=1; n=100; h=(b-a)/n; sum=0; f=@(x) x.*sin(x); for i=1:1:n-1 sum= sum + f(a+i*h); end result = h/2*(f(a...
Trapezoidal numerical integration without use of function?
a=0; b=1; n=100; h=(b-a)/n; sum=0; f=@(x) x.*sin(x); for i=1:1:n-1 sum= sum + f(a+i*h); end result = h/2*(f(a...
3 years 前 | 0
已回答
What is the code for lagrange interpolating polynomial for a set of given data?
x = [0 1 2 3 4 5 6 ]; y = [0 .8415 0.9093 0.1411 -0.7568 -0.9589 -0.2794]; sum = 0; for i = 1:length(x) p=1; fo...
What is the code for lagrange interpolating polynomial for a set of given data?
x = [0 1 2 3 4 5 6 ]; y = [0 .8415 0.9093 0.1411 -0.7568 -0.9589 -0.2794]; sum = 0; for i = 1:length(x) p=1; fo...
3 years 前 | 0