I am getting an error in a matlab code…
Here is my matlab code….
a = 0;b = 1000;ftype ='function estimation';y1 = [];y2 = [];y3 = [];y6 = [];p=a+(b-a)*lhsdesign(100,2);s = length(p(:,1));ydata = -log(ydata);ytest = -log(ytest);for k = 1:10for n = 1:sgam = p(n,1);sig2 = p(n,2);[alpha1,b1] = trainlssvm({xdata,ydata,ftype,gam,sig2,'RBF_kernel'});ticysvm = simlssvm({xdata,ydata,ftype,gam,sig2,'RBF_kernel','preprocess'},{alpha1,b1},xtest);tocy4 = toc;A = ysvm-ytest; y5 = (sum(A.*A))/5000;*y6 = corr(ytest,ysvm);* y4 = [y1; y4]; y5 = [y2; y5]; y6 = [y3; y6];y1 = y4; y2 = y5;y3 = y6;endgam = p(:,1);sig2 = p(:,2);time = y4;mse = y5;corr = y6;xyz = [gam sig2 time mse corr];xyz = sortrows(xyz,4);xyz = xyz(1,:);gam = xyz(1,1);sig2 = xyz(1,2);time = xyz(1,3);mse = xyz(1,4);corr = xyz(1,5);if (mse <= 0.00001) exit;else mse = mse;endif (gam <= 0) gam = 1000; else gam = gam;endmu = [gam sig2];SIGMA = [0.1 0; 0 0.1];p = mvnrnd(mu,SIGMA,100);s = length(p(:,1));y1 = [];y2 = [];y3 = [];end
I am getting the error in line
y6 = corr(ytest,ysvm)
Please help…
Best Answer