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 vue (au cours des 30 derniers jours)
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 commentaire
Walter Roberson
Walter Roberson le 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?

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 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.

Catégories

En savoir plus sur Scope Variables and Generate Names dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by