Why MATLAB has a confusing function name such as griddata (or griddatan)?

조회 수: 2 (최근 30일)
I am really confused by the function names griddata and griddatan, because these function names are prefixed by grid whereas the functions are actually doing scattered data interpolation, rather than gridded data interpolation.
In contrast, interpolant class names such as griddedInterpolant (gridded data interpolation) and scatteredInterpolant (scattered data interpolation) have no confusion at all, because these names are consistent with their functional behaviors.

채택된 답변

Walter Roberson
Walter Roberson 2017년 2월 1일
griddata is a verb and noun. It puts the data into a grid, which is the verb "grid"
griddedInterpolant is an adjective and a noun.
  댓글 수: 2
Peng Liu
Peng Liu 2017년 2월 1일
편집: Peng Liu 2017년 2월 1일
I understand the name griddata puts some emphasis on the gridded query points, but this function also works for scattered query points. Why there must be some emphasis on the grid aspect? Why not emphasize both aspects or neither?
Walter Roberson
Walter Roberson 2017년 2월 1일
griddata has existed since R13 or before, and the emphasis was on querying at grids of points. The name probably seemed like a good idea at the time, which was long before the *Interpolant routines.

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

추가 답변 (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