# Adds to polynomials function [ sum ] = polyadd( term1, term2 ) while ( length(term1) < length(term2) ) term1 = [ 0 term1]; endwhile while ( length(term2) < length(term1) ) term2 = [ 0 term2]; endwhile sum = term1 + term2; endfunction