{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

problem3_10 - elseif x>8...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function problem3_10 %Problem 3.10; x=0; u_y=zeros(100,1); d=[0:.1:10]'; u_y(1)=0; disp('distance displacement'); for z=2:101 u_y(z)=(-5/6)*(x^4-(x-5)^4)+75*(x-7)^2+(57/6)*x^3-(238.25)*x; u_y(z)=(-5/6)*(x^4-(x-5)^4)+(57/6)*x^3-(238.25)*x;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: elseif x>8 u_y(z)=(-5/6)*(x^4-(x-5)^4)+(15/6)*(x-8)^3+75*(x-7)^2+(57/6)*x^3-(238.25)*x; else u_y(z)=(-5/6)*(x^4)+(57/6)*x^3-(238.25)*x; end fprintf('%2.1d %7.4d\n',x,u_y(z)); x=x+.1; end plot(d,u_y); axis([0 10 -600 0]); end...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online