expanding linterp() and Origin
- September 5, 2011
- 19 replies
- 6742 views
The linterp() function fails where there are vertical lines, so I have added Linterp() to assign values at vertical lines.
I use this often as I describe shapes for wind, soil, variable depth sections etc., Then I can numerically integrate or whatever.
However, I always use ORIGIN=1. My programs, such as this one, are constructed in reference files and the matrices in the argument list are created in the main file.
As Valery has noted, general programs should be independent of the ORIGIN.
But, in general, the origin for the program and the matrices in the argument list may be different. I can include ORIGIN in the argument list easy enough, but I would rather not. So I need to be able to determine the origin of the input matrices inside the program. But, I don't see any functions that I can use directly. I could append something (a string perhaps) and find its indices an thus determine the origin, but is there a simple and direct way to do this?

