Borrar filtros
Borrar filtros

How to fix an error about struct input of an function in Matlab?

3 visualizaciones (últimos 30 días)
phdcomputer Eng
phdcomputer Eng el 18 de Jun. de 2019
Editada: Steven Lord el 18 de Jun. de 2019
I wrote this function svmclassify:
[SL: Removed the svmclassify function. This is identical (modulo a few blank lines added) to the first 65 lines of svmclassify.m from Statistics and Machine Learning Toolbox in release R2015a. Please do not post the text of MathWorks functions.]
There is an error for this line:
error(message('stats:svmclassify:TwoInputsNoStruct'));
The error is:
Error using svmclassify (line 56)
The first input should be a struct generated by SVMTRAIN.
I'll be grateful to have your opinions about how to fix this error.
Thanks

Respuestas (1)

Fabio Freschi
Fabio Freschi el 18 de Jun. de 2019
It looks like you are passing the wrong data to the function. The first input must be a structure generated by the function SVMTRAIN of the same package

Categorías

Más información sobre Structures en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by