Doc command doesn't work

조회 수: 19 (최근 30일)
Daniel Zuerbig
Daniel Zuerbig 2022년 5월 5일
댓글: Daniel Zuerbig 2022년 5월 12일
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.

채택된 답변

Walter Roberson
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
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.
Daniel Zuerbig
Daniel Zuerbig 2022년 5월 12일
Thanks for your help! There was a redefinition of strjoin somewhere deep in our MATLAB repo. I changed the name of the function and it works now.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by