MATLAB: Bug in symbolic toolbox


Hi all, I am experiencing a strange behavior of the sym function. The result of sym('I') is 'I'. While the result of sym('A+I') is 'A+i' with an unwanted lower case letter of 'I'.
Has anyone experienced such a behavior? Is it a bug? and if so is there any workaround?
Thanks, Junior

Best Answer

  • In the input regions MuPAD recognizes an uppercase I as the imaginary unit (-1)^(1/2). In the output regions, MuPAD uses a lowercase i to display the imaginary unit
    I – imaginary unit sqrt(-1) (see DOM_COMPLEX for details)
    Complex numbers can be constructed by typing in the corresponding expression, such as 3+4*I. The keyword for typing the imaginary unit I is I (a capital letter i).
    Thus, what you are seeing is not a bug.
    I know that in Maple it is possible to change the representation letter, but I do not at the moment see any corresponding mechanism in MuPad. (In Maple, it would be by using interface(imaginaryunit=SYMBOL) )