Creating and storing non uniform data/grid using interp2
Show older comments
Hi I have tried construct a non uniform data set based upon uniform data. The idea is I want a finer mesh in the middle as can be seen in the attached image. I used interp2 to create the finer mesh, the code I have used is below.
if true
% code
end
[X,Y] = meshgrid(-0.00005:0.0000025:0.00005); %Coarse mesh%
h=sqrt((((dh.^2+rp.^2)/(2*dh)).^2)-(X.^2+Y.^2))-((rp.^2-dh.^2)/(2*dh));
h(:,(1:41))=(h(:,(1:41))> 0).* h(:,(1:41));
[Xq,Yq] = meshgrid(-0.000030:0.0000005:0.000030); %Fine mesh%
Vq = interp2(X,Y,h,Xq,Yq);
figure
mesh(X,Y,h), hold, mesh(Xq,Yq,Vq)
The problem is that I want to be able to (a) name the non uniform data and (b) keep the non uniform grid for further calculations. Is this possible or have I gone about this the wrong way.
Help would be greatly appreciated.

Answers (0)
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!