0
Fixed

Convert complex numbers from mp to sym

Michael_ 10 aastat tagasi uuendaja Pavel Holoborodko 10 aastat tagasi 2
Hello again.

The following statement leads to an error:
x = mp('1i');
xvpa = mp2sym(x);

I think the reason is the following:
xvpa = vpa('1*i')  (This works)
xvpa = vpa('1i')   (Without "*" it gives an error)
Ülevaatamisel
The '1i' syntax is standard in MATLAB. It is strange that 'vpa' doesn't support it.

Please modify the mp2sym script as follow:

    r = sym(zeros(size(s)));
    for n=1:numel(s), r(n) = sym(strrep(num2str(s(n)),'i','*i')); end;