I want to expand my matrix using interpolation. I followed the instructions but it shows some errors:
clc clearrw=0.10795;n = linspace(-pi,pi,30);m = linspace(rw,2.5,30);[theta,r] = meshgrid(n,m);[X,Y] = pol2cart(theta,r); V = peaks(X,Y);figuresurf(X,Y,V)title('Original Sampling');nn = linspace(-pi,pi,360);mm = linspace(rw,2.5,200);[thetaaa,rrr] = meshgrid(nn,mm);[Xq,Yq] = pol2cart(thetaaa,rrr); Vq = interp2(X,Y,V,Xq,Yq,'cubic');figuresurf(Xq,Yq,Vq);title('Cubic Interpolation Over Finer Grid');
Best Answer