Fixed problems with the matlab output code.
Added ability to set C1 or C2 continuity at joint without specifying the first or second derivative.