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

11 Ansichten (letzte 30 Tage)
Jan Ali
Jan Ali am 18 Mai 2021
Bearbeitet: Jan Ali am 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,

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Preprocessing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by