How to find a value at a certain point/time slot?

21 vues (au cours des 30 derniers jours)
Jan Ali
Jan Ali le 18 Mai 2021
Modifié(e) : Jan Ali le 19 Mai 2021
Hello everyone!
Can anyone help me with finding the value at a specific point/time? For exp. I have a signal to be analyzed, but I need to find the value for exp. at 7 s (total length is 10 s).
Thanks in advance,
  1 commentaire
KSSV
KSSV le 18 Mai 2021
Your question is not clear.

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 18 Mai 2021
t = 0:0.1:10 ;
y = exp(t) ;
ti = 7 ;
yi = interp1(t,y,ti) ;
[ti yi]
  1 commentaire
Jan Ali
Jan Ali le 19 Mai 2021
Modifié(e) : Jan Ali le 19 Mai 2021
Thanks a lot for the answer. This is very clear and easy example. I meant this, for a long signal, wanted to know a value at a certain time. F.exp. for a function or vector like sin(x) what the value would be at 7 s.
Now I want to try to find max, mean or median at a time interval, f.exp. the max value of x at 5 - 7 s.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Preprocessing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by