#!/usr/bin/perl # line.pl - Don Yang (uguu.org) # Solve linear interpolation # # 05/21/03 print "t1 = "; $t1 = ; print "t2 = "; $t2 = ; $t1 += 0.0; $t2 += 0.0; print "f($t1) = "; $y1 = ; print "f($t2) = "; $y2 = ; $a = ($y1 - $y2) / ($t1 - $t2); $b = $y1 - $a * $t1; print "a = $a, b = $b\n";