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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Walter Roberson
am 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?
Antworten (1)
Image Analyst
am 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 Kommentare
Siehe auch
Kategorien
Mehr zu Scope Variables and Generate Names finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!