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

 採用された回答

ES
ES 2013 年 11 月 5 日
編集済み: Azzi Abdelmalek 2013 年 11 月 5 日
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.

その他の回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 5 日

1 投票

What is the problem if amplitudes an frequencies are different? You can use a simple product block

1 件のコメント

Walter Roberson
Walter Roberson 2017 年 5 月 20 日
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 ?

サインインしてコメントする。

SHARIDYA RAHMAN
SHARIDYA RAHMAN 2015 年 4 月 27 日

0 投票

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?

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

質問済み:

2013 年 11 月 5 日

コメント済み:

2017 年 5 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by