Subscripted assignment between dissimilar structures and Error: The variable info in a parfor cannot be classified. I need educating!
Mostra commenti meno recenti
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 Commenti
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
il 26 Apr 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.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Video Formats and Interfaces in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!