I am getting an error named Not enough input arguments for the function HelperPoolWaitbar below while running a code can anyone explain me how to solve it.
1 view (last 30 days)
Show older comments
function obj = HelperPoolWaitbar(N,message)
if nargin < 2
message = 'PoolWaitbar';
end
obj.N = N;
obj.ClientHandle = waitbar(0, message);
obj.Queue = parallel.pool.DataQueue;
obj.Listener = afterEach(obj.Queue, @(~) localIncrement(obj));
end
1 Comment
Walter Roberson
on 25 Sep 2021
How are you invoking the function? Are you pressing the green Run button? Are you calling it with a line of code?
Answers (1)
Image Analyst
on 25 Sep 2021
Like it says, you're not passing in the required inputs. How did you call it in your script or command window. If you did something like
N = 4;
message = 'Hello POTNURU!';
obj = HelperPoolWaitbar(N,message)
then you should not get that particular error. So, what are your N and message? If they're undefined (like you clicked the green run triangle before you assigned anything to N and message) then of course it won't know what to do and throw an error.
0 Comments
See Also
Categories
Find more on Scope Variables and Generate Names 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!