Program to display amplitude of sine signal at each interval and display separately in MATLAB 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?
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

max(signal);


use if statement to compare the two values

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


Hope this helps.

cheers.