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

22 views (last 30 days)
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,

Accepted Answer

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

Sign in to comment.

More Answers (0)

Categories

Find more on Data Preprocessing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!