Question
in copyable matlab code

The basic differential equation of the elastic curve for a cantilever beam as shown is given as: dx2 where E = the modulus of
0 0
Add a comment Improve this question Transcribed image text
Answer #1

function dydx = odefun(x,y)

L = 10*12; %10 feet to in
E = 30000; I=800;P=1;


%converting 2nd order to two 1st order odes dy1dx and dy2dx
%let y1 = y and y2 = dy/dx
%differentiating y1 and y2 yields dy1dx = y2 and dy2dx = (-P/IE)(L-x)

dydx(1) = y(2); % dy1dx
dydx(2) = (-P/(E*I))*(L-x); % dy2dx

dydx = dydx'; %get transpose to return column vector
end

-------------------------------------------------------


clc
clear
close all

L = 10*12; %10 feet to in
xspan = 0:0.1:L;

y0 = [0 0]; %assuming y(0)=0 and y'(0)=0

model = ode45(@odefun,xspan,y0);

Y = model.y;
y = Y(1,:)'; %extract y1 which is the same as y
x = model.x;

plot(x,y)
grid on
xlabel('x')
ylabel('y')


0.005 -0.01 -0.015 -0.02 0.025 20 100 40 60 80 120

COMMENT DOWN FOR ANY QUERY RELATED TO THIS ANSWER,

IF YOU'RE SATISFIED, GIVE A THUMBS UP
~yc~

Add a comment
Know the answer?
Add Answer to:
in copyable matlab code The basic differential equation of the elastic curve for a cantilever beam as shown is given as: dx2 where E = the modulus of elasticity and I = the moment of inertia. Show...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT