Integration to get surface 3D plot

I wanted to plot my equation in sinotes with this code:

```function z=f(X,y)
z=-(8/beta)*cos(X/(sqrt(((X)^2)+((y)^2))))*intg(besselj(1,beta*t*(sqrt(((X)^2)+((y)^2)))), t,0,a);
endfunction
a=0.1282;
beta=245.0540291;
X=linspace(-1,1,1000);
y=linspace(-1,1,1000);
z=feval(X,y,f)';
clf
surf(X,y,z);```

But am not getting output.

Scilab 13-08-21, 10:29 a.m. hannabeprakash
Actually, I even modified the code to this:
```// Define a vector
E0=1;
a=0.1282;
beta=245.0540291;
t = -1 : .002 : 1;
// Define a grid
[u, v] = meshgrid(t, t);
z = E0.*(-8/beta).*(u./sqrt(u.^2+v.^2)).*integrate('besselj(1,beta.*r.*sqrt(u.^2+v.^2))','r',0,a);
// Plot default view
surf(z)```
__________________________________________________________________________________________________________________________________________________ The output on the console is: --> exec('H:\scilabfiles\TestSimple3D-1to1.sce', -1)
in builtin integrate ( C:\Program Files\scilab-6.1.0\modules\differential_equations\macros\integrate.sci line 12 )
at line 9 of executed file H:\scilabfiles\TestSimple3D-1to1.sce %func: Wrong size for output argument #1: A Scalar expected.
14-08-21, 10:23 p.m. hannabeprakash

So how do I integrate 'r' at different values of u and v

14-08-21, 10:24 p.m. hannabeprakash