Function help with plugging in answer

조회 수: 6 (최근 30일)
Matthew Covington
Matthew Covington 2020년 9월 9일
댓글: Asad (Mehrzad) Khoddam 2020년 9월 9일
function [out] = p4(x)
L = 600;
E = 50000;
I = 30000;
w0 = 2.5;
out = (w0/120*E*I*L) * (-5*x^4 + 6*L^2*x^2 - L^4); % derivative of y(x)
end % I am getting x = 268.3282
Above is a function p4 I made. I am trying to solve for where p4 = 0, or the slope of y(x) = 0. I have plugged in the equation into symbolab.com and solved for x and it confirmed my result, x = 268.3282, however when I plug that value into p4, it does not equal 0, this is the value I recieve: p4(x) = 858306.884766. I do not understand, could someone please explain.
  댓글 수: 2
Matthew Covington
Matthew Covington 2020년 9월 9일
out = w0/(120*E*I*L) * (-5*x^4 + 6*L^2*x^2 - L^4); % derivative of y(x)
I figured it out, it was a perthesis error. I had it as (w0/120*E*I*L) instead of w/(120*E*I*L)
Asad (Mehrzad) Khoddam
Asad (Mehrzad) Khoddam 2020년 9월 9일
Yes, for the delflection of the beams, EI should be on the bottom of the fraction

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by