- #1

- 18

- 2

I'm working on a simple MATLAB program & I got stuck with something so I'll appreciate it if anyone can help

how can I write an imaginary value in a MATLAB program as input , for example, impedance Z = 100+10i

- MATLAB
- Thread starter Serena_hm
- Start date

- #1

- 18

- 2

I'm working on a simple MATLAB program & I got stuck with something so I'll appreciate it if anyone can help

how can I write an imaginary value in a MATLAB program as input , for example, impedance Z = 100+10i

- #2

jedishrfu

Mentor

- 12,365

- 6,110

- #3

uart

Science Advisor

- 2,776

- 9

I'm pretty sure you can do it exactly as you've just typed.

I'm working on a simple MATLAB program & I got stuck with something so I'll appreciate it if anyone can help

how can I write an imaginary value in a MATLAB program as input , for example, impedance Z = 100+10i

Also, as long as variables "i" and "j" have not been redefined by your program, then use either:

Z = 100 + 10*i

or

Z = 100 + 10*j

If you're not sure about "i" being redefined you can always do "i = sqrt(-1)" first.

Last edited:

- Replies
- 6

- Views
- 18K

- Last Post

- Replies
- 2

- Views
- 2K

- Last Post

- Replies
- 4

- Views
- 2K

- Last Post

- Replies
- 3

- Views
- 6K

- Last Post

- Replies
- 3

- Views
- 3K

- Last Post

- Replies
- 2

- Views
- 39K

- Last Post

- Replies
- 1

- Views
- 2K

- Replies
- 0

- Views
- 2K

- Last Post

- Replies
- 4

- Views
- 2K

- Last Post

- Replies
- 2

- Views
- 2K