function [trainE,testE] = testLinear(x,y,numtrain)
% [TRAINE,TESTE] = TESTLINEAR(X,Y,NUMTRAIN)
%
% Splits the data X,Y to a training set (of size NUMTRAIN) and test sets, and
% returns the training and test error for linear regression
  trainX = x(1:numtrain,:);
  trainY = y(1:numtrain);
  testX = x((numtrain+1):end,:);
  testY = y((numtrain+1):end);
  [trainE,testE] = trainNtest(trainX,trainY,testX,testY);
 
