In my original problem, I want to construct piecewise linear equation to analyze its wavefront.
However, the number of points are about 200~400. Thus, using "pw" to construct function is not efficient to my problem and it works case by case.
Hence, I try to construct a indicator function as follows. For example,
if x>=fval & x<=gval
Its result show "Unrecognized function or variable 'x'."
I WANT: it can show like this
h(2.1)= [1; 0; 0] , h(4)=[0; 1; 0]