Index exceeds the number of array elements (2)
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello, I am a beginner in MATLAB, I am trying to use an app called NETQUANT, which analyze images. But shows me this error a lot and i can't solve the problem .
Index exceeds the number of array elements (2).
Error in NQ_prepareData (line 170)
outDir = [targetDir filesep foldernames{iFolder} filesep filenames{iFile} filesep
'raw_images' filesep (channels{iChan})];
Error in NETQUANT/prepareDataButtonPushed (line 876)
NQ_prepareData (app.p.folder, app.p.targetDir, app.p, 'preview', false, 'type',...
Error in NETQUANT/batchallButtonPushed (line 267)
prepareDataButtonPushed(app);
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 382)
Error while evaluating Button PrivateButtonPushedFcn.
>>
This is the code of the app:
%create output directories
outDir = [targetDir filesep foldernames{iFolder} filesep filenames{iFile} filesep 'raw_images' filesep (channels{iChan})];
if ~exist(outDir,'dir')
mkdir(outDir)
end
name = filenames{iFile}(1:end-length(inputs.extension));
iTime=1;
for iIm = iChan:p.nChan:nIm
bfsave(imData{1,1}{iIm,1},[outDir filesep name '_'...
num2str(iTime,['%0' num2str(floor(log10(p.nTime))+1) '.f']) '.tif' ]);
iTime=iTime+1;
waitbar(iIm/nIm);
end
%store parameter information to result folder
metadata = p;
metadata.flags.NQ_prepareData = 1; %set flags
save([targetDir filesep foldernames{iFolder} filesep filenames{iFile} filesep 'NQ_metadata.mat'],'metadata'); %save file
end
end
end
end
end
close(h);
disp('Image data has been prepared for processing.');
end
I hope you can help me, Thanks.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Search Path 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!