Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

5 point differentation in Matlab

Asked by Usman on 4 Sep 2012

Hi,

Can anyone please guide me as to how to perform 5 point differentiation n Matlab, what does 5 point differentiation mean?

Thanks

6 Comments

Matt Fig on 5 Sep 2012

Nobody meant to taunt you, Usman. The link I pasted above has the exact formula for 1-D and also explains what h is:

"In one dimension, if the spacing between points in the grid is h, then the five-point stencil of a point x in the grid is..."

So you just need to pick a small value for h (the distance between each of the 5 points on the curve). Once you start writing code, post it and I am certain you will get more help.

Jan Simon on 5 Sep 2012

@Usman: You asked for a term, Matt Fig showed you how to find its definition and the short period of time means a friendly suggestion to ask Google by your own the next time. If you even want a Matlab implementation, you can ask Google again for "Matlab 5 point differentation". If you are still not satisfied, ask a specific question.

Matt Tearle on 5 Sep 2012

There's a tutorial that might help here...

Usman, note the tags that have been added... See what the tutorial says about those...

You asked what 5-pt differentiation means, and Matt showed that a quick search will provide the answer. As to implementing it in MATLAB, maybe you should provide a starting point so that we can help you. Otherwise, it looks a bit like you expect random volunteers on the internet to do your work/homework for you.

Usman

Products

No products are associated with this question.

2 Answers

Answer by Star Strider on 5 Sep 2012
Accepted answer

Here are a couple links that explain it about as clearly as possible:

Numerical differentiation formulas (Gives an example using a 4-point first derivative)

and:

Numerical differentiation

Note that if f(x) is the function you are differentiating (here the numerical data you have), h is the step size, that is:

h = x(k + 1) - x(k);

I have experimented with the algorithm for the 5-point first derivative. It is easy to implement, accurate, and reasonably precise.

1 Comment

Usman on 6 Sep 2012

Thanks Bro

Star Strider
Answer by Usman on 5 Sep 2012

Thanks alot friends. but i certainly did google the term matlab implementation of 5 point difference and go no satisfactory result. that is why i came over here to help. if you think i want free volunteers to do my work for me, its better you dont reply back to the answer instead of passing senseless comments

0 Comments

Usman

Contact us