I am trying to use svr in matlab. I fed all the input paramters to it. When I execute the function I get
??? Error using ==> mrdivide
Matrix dimensions must agree.
Error in ==> svkernel at 35
k = exp(-(u-v)*(u-v)'/(2*p1^2));
Error in ==> svr at 40
H(i,j) = svkernel(ker,X(i,:),X(j,:));
I checked for the error line. u and v get values from column vectors X and Y.
I finally sorted it out. SVR toolbox is generated by Steve R. Gunn has a function svKernel that uses p1
and p2
as global variables. But these two values are not declared anywhere in the toolbox, so it's giving an error. Just try to copy those functions into your workspace and add the values to p1 and p2.