how to make an axis at the centre (symmetric) of a damped oscillation?

Hi there,
For a graph like this, how can I make an axis at the centre of the waves (i.e., along the red marks which i have made. All i want to do is I have two similar graphs with changing amplitudes. I wanted to put them in a same graph to compare the amplitude and explain how the amplitude changes with the change in parameters). Any help would be highly appreciated. Attachment made below
Thanks!!

 Accepted Answer

Calculate the mean of the data and subtract from the data.

4 Comments

as in? can be more clear. I am new to matlab and getting myself used to it. Do you have any code to do that?
Thanks!
Say you have t as time (x axis) and a as amplitude (y axis).
a1 = a-mean(a) ;
plot(t,a1) ;
Thanks is accepting the answer.....:)

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 28 Mar 2017

Commented:

on 28 Mar 2017

Community Treasure Hunt

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

Start Hunting!