Subscripted assignment between dissimilar structures and Error: The variable info in a parfor cannot be classified. I need educating!
Mostrar comentarios más antiguos
I am having difficulty trying to speed up code by using parfor and pre-defining variable dimensions. The original code looks something like this(abbreviated):
for i = 1 : num_files_in_folder
Flag = true;
foldername = files_in_folder(i).name;
try
info = dicominfo(foldername);
catch ME
Flag = false;
warning("Problem: dicominfo error.");
DB2(i,1) = "Bad DICOM File";
DB2(i,2) = foldername;
% rethrow(ME);
end %%try
...
When trying to speed it up with parfor I get the "cannot be classified" and other similar error messages.
Then I tried moving some of these temporary variables outside and making them an structured array. Note: I have ram to spare, even with a 8G ram disk. So big variable are not an issue yet.
2 comentarios
I get the "cannot be classified" and other similar error messages.
Post them in their entirety please. Also post the complete loop. Do the messages reference any of the variables you've shown above? I can't see anything wrong with that code snippet.
Stephen23
el 26 de Abr. de 2018
OK, Matt - just trying to keep the text volume low. As an explanation: move_Dicom.m is the part I was attempting to improve with parfor.
DicomReadMatout.m is the full program - still need work writing out.
pfortestd.m is code I was trying to use to debug.
string2hash.m is a function called.
Thank you for the interest.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Video Formats and Interfaces en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!