constrain the csapi fitting to positive values
Show older comments
I have a vector x of size 25 x 1 and a vector y of size 25 x 1. I subject them to spline fitting function (as below) and I get a function whose values go in the negative range. I know apriori that the values should be positive. Is there any method to constrain the fitting according to this using csapi?

cs = csapi(x,y); % vectors of size 25 x 1
figure(11)
fnplt(cs,2);
hold on
plot(x,y,'o')
hold off
xlabel('pixel values from the intensity patch')
ylabel('pixel values from the IR patch')
Accepted Answer
More Answers (0)
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

