Azzera filtri
Azzera filtri

Help with numerical differentiation using difference tables

2 visualizzazioni (ultimi 30 giorni)
For the following data
x=[1:0.2:2.2]
y=[2.7183 3.3201 4.0552 4.9532 6.0496 7.3891 9.0250]
help me to write MATLAB code to find dy/dx value at any point xi using newton forward formula Help me to write MATLAB code after constructing difference table.
  2 Commenti
Steven Lord
Steven Lord il 5 Set 2018
This sounds a lot like a homework problem. If it is, show us what you've tried so far to solve the problem and tell us specifically where you're having difficulty and we may be able to offer some guidance on how to proceed.
PJS KUMAR
PJS KUMAR il 6 Set 2018
Modificato: PJS KUMAR il 6 Set 2018
I have used to following code to construct the difference table
function fp = newton_fint( x,y,p )
n=length(x);
diff=y';
for j=2:n
for i=1:n-j+1
diff(i,j)=diff(i+1,j-1)-diff(i,j-1);
end
end
for i=1:n
for j=1:n
fprintf("%5.2f\t",diff(i,j));
end
fprintf("\n");
end
h=x(2)-x(1);
u=(p-x(1))/h;
How to create a vector with the elements u,u(u-1),u(u-1)(u-2),..... how to differentiate the elements of the above vector. help me in writing the MATLAB code using vector notations for the following formula for finding derivative at any x value

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by