I am facing a problem on how to separate amplitude of sine signal and compare with other sine signal having same frequency but different amplitude. How can one write a code for this?

  • $\begingroup$ Any distortions? You can do both FFT based analysis of your signal, or use the envelope mean value. $\endgroup$ – jojek May 29 '15 at 11:59
  • 1
    $\begingroup$ Can you give us more information? What does the phrase "separate amplitude" mean? Do you have two different sinusoidal sequences, x[n] and y[n], that you're trying to compare? Or do you have a single x[n] sequence that is the sum of two equal-frequency sinsuoids? $\endgroup$ – Richard Lyons Aug 28 '15 at 8:32

it's actually easy, you only need to find the maximum value of your sine, which is in turn happens to be your amplitude, then you can compare them with if an if statement.

this gives you the amplitude


use if statement to compare the two values

if max(signal1) == max(signal2)
%% your condition comes here

Hope this helps.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.