- Make sure MATLAB online can process other normal commands.
- On your offline machine, you can also try to locate the path of “.tif “ files mentioned in the documentation: Datastore for image data - MATLAB
imageDatastore error in Matlab online usage
2 次查看(过去 30 天)
显示 更早的评论
Hello!
I'm trying to use the imageDatastore as the documentation indicates:
imds = imageDatastore(fullfile(matlabroot,"toolbox","matlab"),...
"IncludeSubfolders",true,"FileExtensions",".tif","LabelSource","foldernames")
However, the following error occurs when I'm using Matlab online:
Error using imageDatastore
The first input to exist must be a string scalar or character vector.
Also, when I click over the hyperlink to the documentation, an error pop-up appears while in the command console the following is printed:
Error using split
First argument must be text.
Error in matlab.internal.doc.url.DocContentPage/splitPath (line 139)
pathParts = split(pathParts,"/"|"\")';
Error in matlab.internal.doc.url.DocContentPage/buildUrl (line 111)
helpLocation = matlab.internal.doc.url.DocContentPage.splitPath(obj.Product.HelpLocation);
Error in matlab.internal.doc.url.DocPage/getNavigationUrl (line 33)
url = obj.buildUrl;
Error in matlab.internal.doc.ui.DocPageLauncher/openDocPage (line 30)
success = openBrowser(obj.Handler, getNavigationUrl(activePage));
Error in doc (line 79)
launcher.openDocPage;
Error in helpPopup (line 18)
doc(topic);
Error in matlab.internal.language.introspective.errorDocCallback>popTopicHelp (line 67)
helpPopup(topic);
Error in matlab.internal.language.introspective.errorDocCallback (line 33)
if popTopicHelp(fileNameQualifiedTopic)
------------------------------
Can anyone help me?
Thanks in advance.
0 个评论
回答(1 个)
Suvansh Arora
2022-11-7
One of the possible workarounds is to provide the MATLAB toolbox path manually as a string, rather than passing it on through the “fullfile” function.
imds = imageDatastore("/MATLAB/toolbox/matlab","IncludeSubfolders",true,"FileExtensions",".tif","LabelSource","foldernames")
In order to DEBUG this further, please follow the below mentioned procedure:
I hope the above information helps you.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!