Writing a code to find the bending moment of the beam using the specified Finite Difference methods.

15 views (last 30 days)
I have attached a screenshot of the problem where I need to use the given finite difference methods to calculate the bending moment for the beam.
I was more concerned on how I would perform the finite difference methods that are shown in the screenshot: Use the four-point forward finite difference for the first point(x=0). Use the three-point central finite difference for the intermediate points Use the four-point backward finite difference formula for the last point(x=360).
Even just an example of one of the methods above would help a lot.
Here is what I have so far:
%Start. %Input variables. x= [0 24 48 72 96 120 144 168 192 216 240 264 288 312 336 360]; y= [0 -0.111 -0.216 -0.309 -0.386 -0.441 -0.473 -0.479 -0.458 -0.412 -0.345 -0.263 -0.174 -0.090 -0.026 0];
%Use the four-point forward finite difference for the first point (x=0). %Use the three-point central finite difference for the intermediate points %Use the four-point backward finite difference formula for the last point (x=360).
t = 0:1:360; dy2dx2 = gradient(x,y,1)
%Input variables for Bending moment expression. I=720; %Moment of Inertia, I (in^4). E=29*10^6; %Elastic modulus, E (psi).
%Calculate bending moment with bending moment expression, M. M=E*I*dy2dx2;
Thank you for your time and please let me know if I forgot to add anything.
  2 Comments
John D'Errico
John D'Errico on 6 Apr 2015
Is this April fools day? No, so apparently not a joke.
Be specific. WHAT FINITE DIFFERENCE METHOD? What are you trying to compute? There are finite difference methods to solve everything from approximate derivatives, to solving PDE problems, to ODEs, to integral equations.
Maybe I MIGHT decide to guess that you just wish to compute a derivative estimate of some order of some function at the points supplied, even then, I'd still need to guess which 3 point central approximation you are talking about. What is the 4 point forward approximation are you looking to use? And every time I decide to guess what some assignment you might have been handed, I'll be wrong at least half the time. So why should we waste our time answering a problem that you have not been asked to solve? In fact, were we to spend a fair amount of time answering the wrong problem, odds are you would have no idea what it is we were talking about anyway.
Finally, what have YOU done? By you making some attempt, you learn something. You start to think. And thinking is what you are trying to learn how to do here. You start to learn MATLAB, by TRYING to use it to solve your problems.
So why not do something? Make an effort. After all, if can't bother to try, then should we? This is your education involved, not ours. When you do try something, and show what you tried, and THEN ask an intelligent question that shows that you have thought about the problem, then you are far more likely to get a useful answer.
Matt A
Matt A on 9 Apr 2015
I apologize for the lack of information on the question, I posted it in a hurry and I didn't realize how vague I was. Here is a screen shot of the Problem and what I have so far.
I was more concerned on how I would perform the finite difference methods that are shown in the screenshot: Use the four-point forward finite difference for the first point(x=0). Use the three-point central finite difference for the intermediate points Use the four-point backward finite difference formula for the last point(x=360).

Sign in to comment.

Accepted Answer

christiano doni
christiano doni on 6 Apr 2015
what method u want to using for problem solve parabolic eliptic or hyperbolic. its to many way for it exsample FTCS, FTBS and other

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!