How to fix "error using class. Not enough input arguments"?
显示 更早的评论
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)),])
回答(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.
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!