I am trying to create a program on python based on one i made on MATLAB.
I used griddedInterpolant:
F = griddedInterpolant(X,Y,Z,V,method,extrap)
but when i am trying to open the .m file in order to see the exact process and made the same on python i only get a file with comments. Where can i see the exact steps MATLAB uses for this function?

댓글 수: 6

KSSV
KSSV 2016년 9월 28일
The .m file shows only help and about the code what it does. When you call the function, I guess it runs on some c based code.
Christos Zoupis-Schoinas
Christos Zoupis-Schoinas 2016년 9월 28일
Where can i find this file?
KSSV
KSSV 2016년 9월 28일
I am not sure, but I think it is not possible to have a look inside such functions. I would recommend to go through any Numerical Method book and do it.
José-Luis
José-Luis 2016년 9월 28일
It means that gridddInterpolant() is a built in function and that you cannot access the source code. Why? Either it is not actually written in Matlab or the good people at TMW are feeling propietary. Might be other reasons.
What algorithms do they use? Sometimes it is listed in the documentation. If not, you could always try asking them.
Christos Zoupis-Schoinas
Christos Zoupis-Schoinas 2016년 9월 29일
Seems like you are right, just got an answer back from them saying that it is proprietary code..
KSSV
KSSV 2016년 9월 29일
check numpy, scipy module in python. It has the code you are looking for.

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

 채택된 답변

KSSV
KSSV 2016년 9월 29일

0 개 추천

I suggest you to pick a numerical method book and read it......this interpolation is not that tough to implement. Such scattered interpolations depend on nearest neighboring points. Algorithm:
1. Run a loop for every point of the new grid
2. Get the neighboring points of the i'th point in the old grid.
3. Do the average of the values. (Average many options are avl.)
4. Assign the average value to the i'th point.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2016년 9월 29일

1 개 추천

You can switch to Delaunay triangulation, which in turn was formerly implemented by calling convex hull that was based upon Qhull

카테고리

도움말 센터File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

질문:

2016년 9월 28일

댓글:

2016년 9월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by