Understanding Symbolic Math in MATLAB: Real and Imaginary Parts

In summary, symbolic math in MATLAB refers to the ability to work with symbolic expressions instead of numerical values, allowing for more precise and flexible mathematical calculations. You can access the real and imaginary parts of a symbolic expression using the <code>real</code> and <code>imag</code> functions. These functions return symbolic expressions that can be used in further calculations. The real part of a symbolic expression represents the value when the imaginary component is 0, while the imaginary part represents the value when the real component is 0. Yes, you can perform arithmetic operations on symbolic expressions containing real and imaginary parts using functions like <code>plus</code>, <code>minus</code>, <code>times</code>, and <code
  • #1
zhaniko93
13
0
I have such MATLAB problem: I create variables R1 RF R2 and w so:
Code:
syms RF R1 R2 w
then I write expression:
Code:
3*R1*w*(RF + 200)/((R2*w*29*i + 3)*(3*R1*w - 2*i))
which gives:
Code:
(3*R1*w*(RF + 200))/((3*R1*w - 2*sqrt(-1))*(R2*w*29*sqrt(-1) + 3))
why sqrt(-1) and not i? furthermore? if I want real part of the expression and write:
Code:
real(ans)
it gives:
Code:
3*real((R1*w*(RF + 200))/((3*R1*w - 2*sqrt(-1))*(R2*w*29*sqrt(-1) + 3)))
can anyone please help me??
 
Physics news on Phys.org
  • #2
anybody please
 

What is symbolic math in MATLAB?

Symbolic math in MATLAB refers to the ability to work with symbolic expressions, such as variables, functions, and equations, instead of numerical values. This allows for more precise and flexible mathematical calculations and manipulations.

How do I access the real and imaginary parts of a symbolic expression in MATLAB?

You can use the real and imag functions in MATLAB to extract the real and imaginary parts of a symbolic expression. These functions return symbolic expressions, which can then be used in further calculations or analyses.

What is the difference between a real and imaginary part of a symbolic expression?

The real part of a symbolic expression represents the value of the expression when the imaginary component is equal to 0. The imaginary part, on the other hand, represents the value of the expression when the real component is equal to 0. Both parts are essential in understanding the behavior of a complex expression.

Can I perform arithmetic operations on symbolic expressions containing real and imaginary parts?

Yes, you can perform arithmetic operations on symbolic expressions containing real and imaginary parts. MATLAB's symbolic math toolbox includes functions such as plus, minus, times, and divide that can handle complex expressions.

How can understanding symbolic math in MATLAB benefit my scientific research?

Symbolic math in MATLAB allows for more precise and flexible mathematical calculations, which can be especially useful in scientific research. It also enables the manipulation and analysis of complex expressions that may arise in many scientific fields, such as physics, engineering, and mathematics.

Similar threads

  • Introductory Physics Homework Help
Replies
5
Views
849
  • Introductory Physics Homework Help
Replies
10
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
770
  • Introductory Physics Homework Help
Replies
1
Views
987
  • Introductory Physics Homework Help
Replies
4
Views
10K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
926
  • Introductory Physics Homework Help
Replies
2
Views
823
  • Introductory Physics Homework Help
Replies
1
Views
2K
Back
Top