>> Ph=200;
Pc=100;
w=220;
x=[0 w/2 w w+(360-w)/2 360];
y=[0 Ph -Pc 0];
[xData,yData] = prepareCurveData (x,y);
ft='pchipinterp'
fitresult=fit(xData, yData,ft,'Normalize','on');
Error using prepareCurveData>iAssertInputsHaveSameNumElements (line 47)
Data sizes do not match. All the data for curve fitting must have the same number of elements.
Error in prepareCurveData (line 37)
iAssertInputsHaveSameNumElements( varargin{:} );
>>