Azzera filtri
Azzera filtri

Too many input arguments with parfor loop

13 visualizzazioni (ultimi 30 giorni)
Adel Sarhan
Adel Sarhan il 19 Apr 2019
Commentato: Walter Roberson il 19 Apr 2019
trying to run this instruction
>> Iteration('Al',[100:25:175],1.33)
function Iteration(type,data,n)
tic
length1 = length(data);
switch type
case 'Al'
parfor i = 1:length1 % line:21
if exist(sprintf('%d.mat',data(i)), 'file')==0
Slambda_Al(data(i),n);
end
fprintf('%d of %d\n',i,length1);
end
I get this error if the current directory contains a ".m" file otherwise runs without errors.
Error using Iteration (line 21)
Too many input arguments.
  7 Commenti
Adel Sarhan
Adel Sarhan il 19 Apr 2019
sorry I meant to say a . mat files of previously calculated data.
Walter Roberson
Walter Roberson il 19 Apr 2019
For the purpose of debugging, try commenting out the SLambda_Al call, and instead displaying to i and n values, and seeing if the problem still happens. If it does not still happen then the problem would seem to be associated with the call to SLambda_Al , in which case you could try calling it with constant values like Slambda_al(1,1) and see if the problem still occurred.
I wonder if the problem is actually inside Slambda_al ?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Tag

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by