When I run the code below, I got NaN in the last several columns of the output from GRIDDATA. Is there anything wrong in my code?
e = ... [201.393814086914 82.2774810791016 0.96469920873642 2.2019145488739 13.4432363510132 ... 0.758060276508331 0 -0.84099268913269 0 6.20107507705688 4.20095491409302 ... 4.20095491409302 5.35119485855103 1.86449265480042 0; 849.910461425781 1200 0 2.87676000595093 10.0690097808838 11.987174987793 ... 0 -1.63550007343292 0 5.90027523040771 7.03830814361572 7.03830814361572 ... 20.3102703094482 0.396224230527878 0.213999390602112; 991.704895019531 1200 66.0872955322266 284.512298583984 85.2018051147461 ... 44.9421310424805 81.4901580810547 61.1384201049805 69.4615173339844 ... 6.71358013153076 7.37573099136353 49.5474700927734 50.1098442077637 ... 43.7674751281738 28.4084148406982; 94.3122253417969 10.9749069213867 10.9749069213867 0.402327746152878 ... 3951.5849609375 0.177378296852112 0.402327746152878 0 8.06888675689697 ... 6.71358013153076 0.402327746152878 0 0 29.6456317901611 19.6354236602783 ... ; 18.8481044769287 2.45738172531128 0 0 1.20185422897339 0 1.18964719772339 ... 0 7.12528514862061 6.39398050308228 0 2.6518120765686 2.6518120765686 ... 0 0];x = [0:0.2967:4.45];y = [0:0.2925:1.17];m = 0:0.001:4.45;n = 0:0.005:1.17;[a,b] = meshgrid(m,n);c = griddata(x,y,e,a,b);
Best Answer