how to multiply two sinewaves of different amplitude and frequency in MATLAB/simulink

17 Ansichten (letzte 30 Tage)
multiplying of two different sine waves of different frequency and different amplitude

Akzeptierte Antwort

ES
ES am 5 Nov. 2013
Bearbeitet: Azzi Abdelmalek am 5 Nov. 2013
t=0:0.01:10
Eqn1=a1*sin(w1*t);
Eqn2=a2*sin(w1*t);
as you might know, Eqn1 and Eqn2 are matrices.
Eqn1.*Eqn2 will multiply each element of Eqn1 matrix to corresponding Element in the Eqn2 matrix. for doing this, length of Eqn1 and Eqn2 should be same.
Eqn1*Eqn2 is the normal matrix multiplication. This will need the inner dimensions of Eqn1 and Eqn2 to be equal. that is
[m1,n1]=size(Eqn1);
[m2,n2]=size(Eqn2);
only if n1 and m2 are equal you can do Eqn1*Eqn2. similarly if n2 and m1 are equal you can do Eqn2*Eqn1.

Weitere Antworten (2)

Azzi Abdelmalek
Azzi Abdelmalek am 5 Nov. 2013
What is the problem if amplitudes an frequencies are different? You can use a simple product block
  1 Kommentar
Walter Roberson
Walter Roberson am 20 Mai 2017
Naga Sai, what are your inputs, and what are your required outputs? What is there about J Smith's answer that did not work for your situation ?

Melden Sie sich an, um zu kommentieren.


SHARIDYA RAHMAN
SHARIDYA RAHMAN am 27 Apr. 2015
i need an urgent answer:
Can i multiply one sine wave and one cos wave signal using a product block in simulink? IS the process correct? After that i need to pass it through a low pass filter to attentuate or cut off a certain part of frequency components. I have used the LOW PASS Filter block but the output is coming a sqare wave signal and is distorted. I cant understand why. Can somebody explain?

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by