Doc command doesn't work
20 次查看(过去 30 天)
显示 更早的评论
I recently upgraded from R2019b to R2021b. I used to be able to type:
doc abs
or some other command and the documentation page for that command would pop up. Now when I type
doc <command>
I get this error:
Error using strjoin (line 38)
The first argument should be a cell array of strings.
Error in matlab.net.URI/get.EncodedPath (line 514)
str = strjoin(path, '/');
Error in matlab.net.URI/string (line 680)
path = obj.EncodedPath;
Error in matlab.net.URI/char (line 696)
str = string(obj);
Error in doc>displayFile (line 205)
com.mathworks.mlservices.MLHelpServices.setCurrentLocation(char(htmlFile));
Error in doc>displayDocPage (line 169)
displayFile(refPage);
Error in doc (line 120)
if ~displayDocPage(refTopics, topic) && ~showHelpwin(topic)
Error in doc (line 46)
feval( orig_doc, funcname );
I tried typing
doc "abs"
Which does bring up the documentation popup, but only as a search for "abs" and not the actual documentation page.
This happens for all commands, not just abs.
0 个评论
采纳的回答
Walter Roberson
2022-5-5
You have a third party product installed that defines its own strjoin.
Most likely culprit would be SPM12 which if I recall correctly defines strjoin in one of its "compatibility layers" directories. For a recent matlab version such as yours, the two compatability directories for SPM12 should be removed from the matlab path.
5 个评论
Walter Roberson
2022-5-6
That is not the current error message. The current error message is
First input must be a string array or cell array of character vectors.
Support for string objects was added around R2016b-ish (it took a couple of releases to update all functions.)
That error message would be consistent with the possibility that you are somehow getting an old version of strjoin that did not support string objects.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!