Effacer les filtres
Effacer les filtres

Help with numerical differentiation using difference tables

2 vues (au cours des 30 derniers jours)
PJS KUMAR
PJS KUMAR le 5 Sep 2018
Modifié(e) : PJS KUMAR le 6 Sep 2018
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 commentaires
Steven Lord
Steven Lord le 5 Sep 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 le 6 Sep 2018
Modifié(e) : PJS KUMAR le 6 Sep 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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Adding custom doc dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by