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

34 visualizzazioni (ultimi 30 giorni)
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,

Risposta accettata

KSSV
KSSV il 18 Mag 2021
t = 0:0.1:10 ;
y = exp(t) ;
ti = 7 ;
yi = interp1(t,y,ti) ;
[ti yi]
  1 Commento
Jan Ali
Jan Ali il 19 Mag 2021
Modificato: Jan Ali il 19 Mag 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.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by