Dear, I have this code:
svmKernel ={'rbf','gaussian', 'linear','2','3','4'};for k=1:numel(svmKernel) [p, status] = str2num(svmKernel{k}); if ~status; t = templateSVM('Standardize',true,'KernelFunction',svmKernel{indK}); else; t = templateSVM('Standardize',true,'KernelFunction','polynomial', 'PolynomialOrder', p); end
WHY str2num returns p =
Linear Function: Parameters: [1×1 struct]
and status = 1 when issuing [p,status] = str2num('linear')?
[p, status] = str2num('linear')Linear Function: Parameters: [1×1 struct]status = logical 1
Best Answer