How to fix "error using class. Not enough input arguments"?
Show older comments
Wrote this function code as part of a worksheet. It was working normally but all of a sudden I am getting an error message. I didn't change anything so I have no clue how this happened?
% Find the time points corresponding to the onset and offset times from the classifier
[onset, offset] = change_times(class, time);
(error comes after the line above)
% Display the number of onset/offset times determined with each classifier
length(onset);
disp(['Onset Times = ', num2str(length(onset)),])
length(offset);
disp(['Offset Times = ', num2str(length(offset)),])
Answers (1)
You had probably shadowed the function class() with some variable by the same name -- which is something you should avoid.
which class -all
help class
Since said variable is now missing and not shown in the provided code excerpt, you'll have to figure out where it went.
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!