# implementing complex multiplication in simulink

17 ビュー (過去 30 日間)
amuka anurag 2021 年 4 月 20 日

how to build the complex mulitplication block with total 4 inputs(2 real,2 imaginary)

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

### 回答 (1 件)

Pratheek Punchathody 2021 年 4 月 23 日
Using the MATLAB Function block, we can create a complex multiplication block with the required number of inputs.
Create a functional block in simulink, by double clicking on this function block write the below function which takes 2 real inputs and 2 imaginary inputs.
function y = fcn(a,b,c,d) %a,c are real inputs and b,d are imaginary inputs
c1=complex(a,b);
c2=complex(c,d);
y = c1*c2; % performing multiplication
end The following MATLAB function block is created with 2 real inputs and 2 imaginary inputs. The multiplication operation of the two complex numbers are performed and the output is shown with the variable y.
Hope this helps..!

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

### Community Treasure Hunt

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

Start Hunting!