\r
if(!functionsWritten) {\r
\r
- // THIS INTERPOLATE DOESN'T WORK PROPERLY\r
b.append(\r
- "\nfunction Interpolate\n" +\r
+ "\nfunction interpolate\n" +\r
+ " input Real u \"in1;put value (first column of table)\";\n" +\r
+ " input Real table[:, :] \"table to be interpolated\";\n" +\r
+ " output Real y \"interpolated input value (icol column of table)\";\n" +\r
+ "algorithm \n" +\r
+ " y := interpolate2(u, table, 2);" +\r
+ "end interpolate;\n\n");\r
+ \r
+ b.append(\r
+ "\nfunction interpolate2\n" +\r
" input Real u \"in1;put value (first column of table)\";\n" +\r
" input Real table[:, :] \"table to be interpolated\";\n" +\r
" input Integer icol \"column of table to be interpolated\";\n" +\r
" y := y1 + (y2 - y1)*(u - u1)/(u2 - u1);\n" +\r
" end if;\n" +\r
" end if;\n" +\r
- "end Interpolate;\n");\r
+ "end interpolate2;\n");\r
\r
b.append(\r
"function xidz\n" +\r