perhaps I am misunderstanding, but the following shows how to fit 3 curves in two variables:
clc;clear;close all
x = sort(rand(20,1)); % independent variable
X = [ones(20,1),x,x.^2]; % Vandermonde matrix
y = X*[1 2 3;2 2 3;3 3 5 ]; % dependant variable; arbitrary coefficients
y = y+rand(20,3)*.5; % add noise
coeff = X\y; % get coefficients
yhat = X*coeff; % get predictions
plot(x,yhat);hold on;
plot(x,y,'.') %plot
HTH