Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help needed in MATLAB , Please ( Simple question )

  1. Sep 19, 2012 #1
    hello everybody !

    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. jcsd
  3. Sep 19, 2012 #2


    Staff: Mentor

  4. Sep 19, 2012 #3


    User Avatar
    Science Advisor

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

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

    Z = 100 + 10*i


    Z = 100 + 10*j

    If you're not sure about "i" being redefined you can always do "i = sqrt(-1)" first.
    Last edited: Sep 19, 2012
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Help needed MATLAB Date
Matlab Help needed to fix a matlab code Nov 8, 2017
Need help with integral Dec 23, 2015
Need help in MATLAB Oct 10, 2013
Need help plotting Fourier series in matlab Sep 24, 2013
Need help with Matlab's Mapping Toolbox Feb 10, 2013