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!!

 Akzeptierte Antwort

KSSV
KSSV am 28 Mär. 2017

0 Stimmen

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

4 Kommentare

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!
KSSV
KSSV am 28 Mär. 2017
Bearbeitet: KSSV am 28 Mär. 2017
Say you have t as time (x axis) and a as amplitude (y axis).
a1 = a-mean(a) ;
plot(t,a1) ;
Thanks heaps!! that worked
Thanks is accepting the answer.....:)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 28 Mär. 2017

Kommentiert:

am 28 Mär. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by