Question: piecewise polynomial

Hellow,

how to write the codes for linear Lagranges piecewise polynomial in the interval x=[0,1] by taking h=0.1. 

if we fix h=0.1 automatically it should take the polynomial like these sample

x<0.1,(x-1)/0.2,x<0.2,(x^2-3x)/0.2,..... so on

 

Please Wait...