EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Data Science Data Science Tutorials Matlab Tutorial Complex Conjugate Matlab
 

Complex Conjugate Matlab

Priya Pedamkar
Article byPriya Pedamkar

Updated March 3, 2023

Complex Conjugate Matlab

 

 

Introduction to Complex Conjugate Matlab

Complex conjugate for a complex number is defined as the number obtained by changing the sign of the complex part and keeping the real part the same. The significance of complex conjugate is that it provides us with a complex number of same magnitude‘complex part’ but opposite in direction. For example, if we have ‘a + ib’ as a complex number, then the conjugate of this will be ‘a – ib’. For a matrix, the complex conjugate is obtained by taking the conjugate of each element of the matrix.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

In Matlab, we use ‘conj’ function for finding the complex conjugate of complex numbers.

Syntax:

C = conj (Z)

Description:

  • C = conj (Z) is used to get the complex conjugate
  • For a matrix, we will get a complex conjugate of every element in the input matrix

Examples of Complex Conjugate Matlab

Let us now understand the code of conj function in MATLAB using different examples:

Example #1

In this example, we will take a complex number with the positive real and imaginary parts. We will follow the following steps:

  1. Initialize the input complex number
  2. Pass this complex number as an argument to the conj function

Code:

Z = 5 + 6i

[Initializing the input complex number]

C = conj(Z)

[Passing the input complex number to the ‘conj’ function] [Mathematically, the complex conjugate of 5 + 6i is 5 – 6i. As we can see, only the sign of the imaginary part is changed]

Input:

Z = 5 + 6i
C = conj(Z)

Output:

Complex Conjugate Matlab-1.1

As we can see in the output, the conjugate of 5 + 6i is 5 – 6i, which is the same as expected by us.

Example #2

In this example, we will take a complex number with the negative real and imaginary parts. We will follow the following steps:

  1. Initialize the input complex number
  2. Pass this complex number as an argument to the conj function

Code:

Z = -4-2i

[Initializing the input complex number]

C = conj (Z)

[Passing the input complex number to the ‘conj’ function] [Mathematically, the complex conjugate of -4-2i is -4+2i. As we can see, only the sign of the imaginary part is changed]

Input:

Z = -4-2i
C = conj (Z)

Output:

 Complex Conjugate Matlab-1.2

As we can see in the output, the conjugate of -4 – 2i is -4 + 2i, which is the same as expected by us.

Example #3

In this example, we will take a complex number with the positive real and negative imaginary part. We will follow the following steps:

  1. Initialize the input complex number
  2. Pass this complex number as an argument to the conj function

Code:

Z = 6-9i

[Initializing the input complex number]

C = conj (Z)

[Passing the input complex number to the ‘conj’ function] [Mathematically, the complex conjugate of 6 – 9i is 6 + 9i. As we can see, only the sign of the imaginary part is changed]

Input:

Z = 6-9i
C = conj (Z)

Output:

 Output-1.3

As we can see in the output, the conjugate of 6 – 9i is 6 + 9i, which is the same as expected by us. Next, let us learn how to use conj function for computing the complex conjugate of a matrix.

Example #4

In this example, we will take a 2x2matrix of complex numbers and will find the complex conjugate of the matrix. We will follow the following steps:

  1. Initialize the input matrix containing complex elements
  2. Pass this complex matrix as an argument to the conj function

Code:

Z = [3-2i1+5i; 6+2i3-2i]

[Initializing the input complex matrix]

C = conj (Z)

[Passing the input complex matrix to the ‘conj’ function] [Mathematically, the complex conjugate of our input matrix is

3.00 + 2.00i  1.00 – 5.00i

6.00 – 2.00i  3.00 + 2.00i]

Input:

Z = [3-2i 1+5i; 6+2i 3-2i];
C = conj (Z)

Output:

 Output-1.4

As we can see in the output, we have obtained the complex conjugate of every element of the matrix.

Example #5

In this example, we will take a 3×3 matrix of complex numbers and will find the complex conjugate of the matrix. We will follow the following steps:

  1. Initialize the input matrix with complex elements
  2. Pass this complex matrix as an argument to the conj function

Code:

Z = [4-5i1 -6i  5 + 7i; 3+2i3 +5i  4 - 8i;  3 + 3i  4 - 7i  2 + 8i]

[Initializing the input complex matrix]

C = conj (Z)

[Passing the input complex matrix to the ‘conj’ function] [Mathematically, the complex conjugate of our input matrix is

4.00 + 5.00i  1.00 + 6.00i  5.00 – 7.00i

3.00 – 2.00i  3.00 – 5.00i  4.00 + 8.00i

3.00 – 3.00i  4.00 + 7.00i  2.00 – 8.00i]

Input:

Z = [4-5i 1-6i  5+7i; 3+2i 3+5i  4-8i;  3+3i  4-7i  2+8i] C = conj(Z)

Output:

 Output-1.5

As we can see in the output, we have obtained the complex conjugate of every element of the matrix.

Conclusion

  1. ‘conj’ function is used in MATLAB to find the complex conjugate of complex numbers.
  2. It can be used to find the conjugate of complex numbers and alsoof the matrices with complex elements.

Recommended Articles

This is a guide to Complex Conjugate Matlab. Here we also discuss the introduction and syntax of complex conjugate matlab along with different examples and its code implementation. You may also have a look at the following articles to learn more –

  1. Signal Processing Matlab
  2. Matlab Forms
  3. Matlab plot title
  4. Matlab fplot()

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA Login

Forgot Password?

🚀 Limited Time Offer! - 🎁 ENROLL NOW