How do you use ndgrid

Answers shows how to use ndgrid to interpolate for a given value.

Answers (1)

Lengths = [1, 20,40,60,75];
Angle = [.7999,.9002,.9999,1.1001,1.1999];
A = rand(5,5);
[x,y] = ndgrid(-5:0.8:5);
[ii,jj] = ndgrid(Lengths,Angle);
F = griddedInterpolant(ii,jj,A);
out = F(10,.7999);

Categories

Find more on Interpolation in Help Center and File Exchange

Tags

No tags entered yet.

Asked:

on 21 Aug 2017

Edited:

on 21 Aug 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!