I have completed the first dot point as follows:
disp ('Initial Velocity')
disp ('Displacement Input')
prompt1= 'Initial displacement (metres): ';
s0 = input(prompt1); %s0=10 metres
prompt2= 'Final displacement (metres): ';
s = input(prompt2); %s=10 metres
prompt3= 'Final time (seconds): ';
t = input(prompt3); %0.8 seconds
v0 = ((s-s0)+(1/2).*(981/100).*t.^2)/t; %initial velocity equation
disp ('Result:')
disp ('Initial Velocity: ')
disp (v0)
However I am stuck on doing the second point, this is my code so far:
s0=10;
s=10;
t = 0.5:0.1:1.5;
v0 = ((s-s0)+(1/2).*(981/100).*t.^2)/t;
plot (v0, t)
Any help is greatly appreciated thank you!!
0 Comments
Sign in to comment.