by changing Sampling Interval

1 visualización (últimos 30 días)
Basem Nouh
Basem Nouh el 22 de Abr. de 2020
Comentada: Walter Roberson el 22 de Abr. de 2020
Hallo
how can i chnage the Sampling Interval to compare with other Plot ?
% v0=0;g=9.81;
t=[0:0.01:5]';s0=0;
[n,u]=size(t);
for i= 1:n
v(i)=v0+g*t(i);
s(i)=s0+v0*t(i)+0.5*g*t(i)^2;
end
figure()
plot(t,v,'+-')
title('Veolicity')
xlabel('Zeit')
ylabel('V,S')
hold on
plot(t,s,'r')
legend('V','S')
  5 comentarios
Basem Nouh
Basem Nouh el 22 de Abr. de 2020
so does it mean i have to program the integral !
Walter Roberson
Walter Roberson el 22 de Abr. de 2020
I do not know. It is your assignment, not mine. You did not show us the original question, so I do not know what they asked.
I can only advise based upon what I would expect the question to be about given the wording you used. Based upon what I expect it to be about, I would say that you have already implemented the integral. s(i)=s0+v0*t(i)+0.5*g*t(i)^2; is already a resolved integral. I would expect that what you need to do is implement the non-integral portion, the numeric simulation.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by