Subscripted assignment between dissimilar structures and Error: The variable info in a parfor cannot be classified. I need educating!
古いコメントを表示
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 件のコメント
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
2018 年 4 月 26 日
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Video Formats and Interfaces についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!