Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lsfit:{(enlist y) lsq x xexp/: til 1+z};
- interp:{[xn;x;y]sum (1;xn)*flip lsfit[x;y;1]};
- table:([] amount:500 730 1250;xRng:(0 1;0 1;1 2);yRng:(5 7f; 5 7f; 7 10f));table
- amount xRng yRng
- 500 0 1 5 7f
- 730 0 1 5 7f
- 1250 1 2 7 10f
- amount xRng yRng result
- 500 0 1 5 7f 6
- 730 0 1 5 7f 6.46
- 1250 1 2 7 10f 7.75
- interp[first table[`amount]%1000;first table[`xRng];first table[`yRng]]
Add Comment
Please, Sign In to add comment