function [ri,zi,w]=new_rhi(ele_rhi,rg,rhi,L,pas)
%rg=67:67:67*100;
c=1; %initialize counter
for a=1:length(ele_rhi)
        for rr=1:L %assumes 200 gates of data
        [h,i,j]=sph2cart(deg2rad(0),deg2rad(ele_rhi(a)),rg(rr));    
         x(c)=h;
         y(c)=i;
        z(c)=j;
        r(c)=rg(rr);
        vel(c)=rhi(rr,a);
        c=c+1;
        end
    end
    
% u_NaN=find(~isnan(vel));
% x=x(u_NaN);
% y=y(u_NaN);
% z=z(u_NaN);
% vel=vel(u_NaN);
% r=r(u_NaN);
[ri,zi]=meshgrid(min(r):pas:max(r),min(z):pas:max(z));
 w=griddata(r,z,vel,ri,zi,'linear');