# How to solve '' error(mess​age('symbo​lic:sym:er​rmsg1')); ''

15 views (last 30 days)
I CHUN LIN on 16 Dec 2019
Edited: I CHUN LIN on 16 Dec 2019
syms m x y z n k xx. yy. zz.
n = 1.6;
k = 0.000005;
x = linspace(-0.000015, 0.000015, 10);
z = linspace(-0.00003, 0.00003, 10);
[xx, zz] = meshgrid(x, z);
yy = symsum(1i^(-m)*exp(1i*m*atan(zz./xx)).*(besselj(m,k*sqrt(xx.^2+zz.^2))-((n*diff(besselj(m,n*k*10^(-6)))*besselj(m,k*10^(-6))-besselj(m,n*k*10^(-6))*diff(besselj(m,k*10^(-6))))/(n*diff(besselj(m,n*k*10^(-6)))*besselh(m,k*10^(-6))-besselj(m,n*k*10^(-6))*diff(besselh(m,k*10^(-6)))))*besselh(m,k.*sqrt(xx.^2+zz.^2))),m,0,10);
mesh(xx, yy, zz);
however, the system says:
>> Untitled2
Error using syms (line 265) error(message('symbolic:sym:errmsg1'));
Invalid variable name.
Error in Untitled2 (line 1)
syms m x y z n k xx. yy. zz.

Fangjun Jiang on 16 Dec 2019
remove the "." in "syms xx."
I CHUN LIN on 16 Dec 2019
Thank you.
I had done. But the result :
>> Untitled2
Error using symengine
Invalid variable.
Error in sym/symsum (line 70)
Error in Untitled2 (line 7)
yy =
symsum(1i^(-m)*exp(1i*m*atan(zz./xx)).*(besselj(m,k*sqrt(xx.^2+zz.^2))-((n*diff(besselj(m,n*k*10^(-6)))*besselj(m,k*10^(-6))-besselj(m,n*k*10^(-6))*diff(besselj(m,k*10^(-6))))/(n*diff(besselj(m,n*k*10^(-6)))*besselh(m,k*10^(-6))-besselj(m,n*k*10^(-6))*diff(besselh(m,k*10^(-6)))))*besselh(m,k.*sqrt(xx.^2+zz.^2))),m,0,10);
>>