1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Displacement of cantilevered beam matlab

  1. Feb 14, 2014 #1
    1. The problem statement, all variables and given/known data
    Write a Matlab function to plot the displacement of a cantilevered beam under a point load. Annotate the figure’s axes and title the figure. In addition to creating the plot, the function should report (in the figure’s title!) the maximum deflection and angle between the horizontal and the surface of the beam at its tip. The geometry of the beam is shown below:
    The formulas for the displacement y and tip angle θ are
    y=-((Wx^2)/6EI)(3a-x) for 0<X<a
    y=-((Wa^2)/6EI)(3x-a) for a<x<L
    theta=0.5*((Wa^2)/EI)

    where W is the point load, E is the Young’s modulus for the beam, I is the moment of inertia for the beam, and L is the length of the beam. Test your function with E = 30 Mpsi, I = 0.163 in4, L = 10 in, a = 3 in, W = 1,000 lbf. Report both your code and the plot for the given values.

    2. Relevant equations



    3. The attempt at a solution
    function[ymax,theta]=displacement(E,I,L,a,W)


    for x=linspace(0,a);
    y=-(W*x.^2*(3*a-x))/(6*E*I);
    end
    for x=linspace(a,L);
    y=-(W*a.^2*(3*x-a))/(6*E*I);
    end

    theta=0.5*((W*a.^2)/(E*I));
    plot(y,x);
    xlabel('Pos');
    ylabel('disp');
    title(sprintf('ymax=%g, theta=%5.3f',ymax,theta));

    This is what I get:

    ans =

    8.2822e+003

    The plot shows nothing so I am confused, what should I do?
     

    Attached Files:

  2. jcsd
  3. Feb 14, 2014 #2

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    For one thing, E = 30 Mpsi = 30 * 10^6 psi, or 30,000,000 psi. This accounts for the discrepancy in the deflection calculation. It doesn't explain why to slope wasn't output.
     
  4. Feb 15, 2014 #3
    >> displacement(30*10.^6,0.163,10,3,1000) ok this is what I entered and I still didn't get a plot any more hints?
     
  5. Feb 15, 2014 #4
    hey appreciate the help man I got it figure out
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Displacement of cantilevered beam matlab
  1. Cantilever Beams (Replies: 3)

  2. Cantilever beam (Replies: 1)

  3. Cantilever Beam (Replies: 1)

  4. Cantilever beam (Replies: 3)

Loading...