Data is not valid NDGRID format.

조회 수: 18 (최근 30일)
Victor
Victor 2014년 8월 13일
댓글: Colton Fruhling 2017년 10월 5일
I would like to know what does it mean "Data is not valid NDGRID format" when I try to use interpn() function to interpolate a function from four variables. I've already checked, a dozen times, my matrixes dimensions. Which one of them agrees in size (4D - 2x11x4x3). Besides, there is no way I can use ndgrid() function to create the mesh, in this case I did this mannualy.
If I have all the function values for which one of the variables, why this error appears?
Thanks in advance,

채택된 답변

dpb
dpb 2014년 8월 13일
편집: dpb 2014년 8월 13일
From the doc for interpn one finds...
"interpn requires that X1,X2,X3,etc. be monotonic and plaid (as if
they were created using NDGRID). X1,X2,X3,etc. can be non-uniformly
spaced."
So, it doesn't matter about the dimension so much, only that the Xn vectors/arrays be monotonic and non-repeating such that they are valid for ndgrid. That you say "there is no way I can use ndgrid() function to create the mesh" pretty much means you can't use interpn to interpolate the data, either (actually, it means it flat out, not just "pretty much" :) ).
You can try some of the other interpolation methods.
Why, specifically, can't you use ndgrid? What is a (smallish) typical subset of the data grid for looksies?
  댓글 수: 5
dpb
dpb 2017년 10월 5일
I suggest instead of a comment to a closed question that you post this as new question and supply a (small!) dataset that illustrates the problem.
Colton Fruhling
Colton Fruhling 2017년 10월 5일
ok thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by