Doc command doesn't work
19 views (last 30 days)
Show older comments
Daniel Zuerbig
on 5 May 2022
Commented: Daniel Zuerbig
on 12 May 2022
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 Comments
Accepted Answer
Walter Roberson
on 5 May 2022
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 Comments
Walter Roberson
on 6 May 2022
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.
More Answers (0)
See Also
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!