How to trim vector data and process

Hi, I have a CSV file of t and x along 2 columns. I can plot from CSV in MATLAB x vs t. As I created two vectors (t & x) after loading data, I want to process it more. There are some x values where nothing is happening for t (like beginning and ending). Then after some time, it ripples (means spike and back to zero). In MATLAB, I want to delete the data from both the vectors where the x is flat (beginning and ending) without changing anything in the main CSV file. that means I have an active region where ripple (go to peak & back to start & back and forth) starts and ends. My redefined vectors should be only the active region. Then calculate the average of x vector along the active region and finally subtract the average value from the x vector. Can anyone help me?

Answers (0)

Asked:

on 7 Jun 2017

Community Treasure Hunt

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

Start Hunting!