kerja Posted May 12, 2009 Posted May 12, 2009 Hi, can someone help me with solving this thing? I'm at the exam at the mo, stuck on this one... thank you!
timo Posted May 12, 2009 Posted May 12, 2009 In the exam at the moment ?!? The forum rules say something like "we do not do your homework for you". While not strictly speaking, in the sense of that message that naturally means "we will not help you cheat in an exam".
kerja Posted May 12, 2009 Author Posted May 12, 2009 well, I've just stuck on the question. I've done something like that: clear all dt= 0.01; t_max=10; i_max=ceil(t_max/dt)+1; y=zeros(1,i_max); x=zeros(1,i_max); y(1)= 0; x(1)= 1; k=0; t=[0.0:dt:(i_max-1)*dt]; for i=1:i_max-1 k1=-x(i)^2+20; l1=y(i); k2=-x(i)^2+dt*l1/2-k+20; l2=y(i)+dt*k1/2; k3=-x(i)^2+dt*l2/2-k+20; l3=y(i)+dt*k2/2; k4=-x(i)^2+dt*l3-k+20; l4=y(i)+dt*k3; y(i+1)=y(i)+(dt/6)*(k1+2*k2+2*k3+k4); x(i+1)=x(i)+(dt/6)*(l1+2*l2+2*l3+l4); end figure(2) plot(t,x,'b','LineWidth',1),xlabel('t / s'),ylabel('x / m') but think that's wrong btw, the exam is opensource based.
mooeypoo Posted May 12, 2009 Posted May 12, 2009 btw, the exam is opensource based. I doubt that means asking others to answer for you. In any case, now that the exam is over - we are not in the habit of answering homework (or EXAM!) questions for you. If you want homework assistance, there's a special sub-forum for that purpose, where we can review your attempts and help you understand the subject. Good luck. ~moo
BlondeEngineer Posted May 13, 2009 Posted May 13, 2009 You have a double dot on top of X that means it's acceleration (a double derivative) However... X is a function of t... ooooo!!! I see your dilemma... You need Laplace Transforms, Baby!!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now