I have a dataset like this:
x1=1:1:5; x1=repmat(x1',1,5); y1=rand(5,5);x2=0.5:1:5.5; x2=repmat(x2',1,5); y2=rand(6,5);x3=1:2:5; x3=repmat(x3',1,5); y3=rand(3,5);
First I wanted to try this with lsqcurvefit:
xdata=[x1 x2 x3]; ydata=[y1 y2 y3];
But that doesn t work because of the different lengths of the Matrices. Can I use lsqcurvefit like this:
xdata=[x1;x2;x3]; ydata=[y1;y2;y3]
But then it is not really datafitting, because I bring different datasets together. I hope you know what I mean.
Thank you for your answers in advance.
Best Answer