MATLAB Answers

implementing complex multiplication in simulink

10 views (last 30 days)
amuka anurag
amuka anurag on 20 Apr 2021
how to build the complex mulitplication block with total 4 inputs(2 real,2 imaginary)

Answers (1)

Pratheek Punchathody
Pratheek Punchathody on 23 Apr 2021
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!