i have a matrix xx(100*1) of elements less than and greater than 70 and a y matrix.p1=polyfit(xx,y,1)when xx<70 and p2=polyfit(xx,y,1);when xx>70 . i need to polyvar(p1,xx)for xx<70 and polyvar(p2,xx)for xx>70 and get the two condition as a single matrix. i tried with if loop but getting answer only for the else condition.is it possible to get answer in both conditions?
MATLAB: Doing polyvar giving two conditions
conditionspolyvar
Best Answer