How to cut the signal at particular time or tol value ??

55 views (last 30 days)
Ramesh Bala
Ramesh Bala on 3 Oct 2019
Answered: Ajay Kumar on 3 Oct 2019
I have a signal and respective time ,how shall I cut it at a certain more or less close to tol value/time vector value.
How to set the tol and plot the cut signals ?
close all
clear all
load signal
load t
S = signal(1,:);
tol = 0.5/2310;
plot(t,S);
T = (1:tol); %??
%then plot limited signal with limited time

Accepted Answer

Ajay Kumar
Ajay Kumar on 3 Oct 2019
load signal
load t
S = signal(1,:);
tol = 0.5/2310;
plot(t,S);
[minDistance, indexOfMin] = min(abs(tol-t));
newt = t(1:indexOfMin);
newS = S(1:indexOfMin);
plot(newt,newS);

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!

Translated by