|
From: Paul K. <pki...@co...> - 2006-05-17 09:38:56
|
On May 17, 2006, at 4:51 AM, David Bateman wrote: > However, I have one compatibility issue in the case where y is a > matrix or an NDArray. Currently the octave-forge spline function > allows an n-by-d matrix to be passed for y where n is the length of > x, and the matrix y is treated column by column, whereas the matlab > function allows an NDArray of the form d1-by-d2-by- ... -dk-by-n which > is exactly the reverse. I can probably support both in the majority of > cases, however ppval and mkpp would need to be modified to store > and/or determine which is used. Alternatively, just using the matlab > syntax would keep mkpp and ppval pretty much identical to what they > currently are (with minor mods for NDArrays). Should I attempt to > support both formats for NDArrays, or should I just drop the current > octave-forge way of treating Matrixs y? Drop the current octave-forge way. Don't support both because it is ambiguous. The help for Matlab indicates that the spline interpolation direction is the transpose of interp1, so it is a documented misfeature. Since most other functions operate on columns by default I think the interp1 behaviour is better, however the consensus seems to be that we will put up with minor annoyances such as this for the sake of compatibility. - Paul |