Doc command/Help button don't work while "Current Folder" is in a mapped network drive

When my Current Folder (working directory) is in a mapped network drive (regardless of whether I've added the current folder to the MATLAB path), neither the "doc " command nor the Help button (in the Ribbon) work. Nothing happens at all. I discovered that the command
web("https:\\www.mathworks.com")
produces the following warning in that case:
Warning: MATLAB was unable to launch your System web browser:
The current directory is invalid.
> In web>displayWarningMessage (line 172)
In web (line 114)
Out of curiosity I changed my current folder to one on my local C: drive; when I did that, both the "web" command and the "doc" commands successfully opened the system Web browser (as they should).
Why would my current folder location make a difference? Is there anything I can do to fix it? Is this a bug?

10 件のコメント

Matt J
Matt J 2025 年 5 月 14 日
Try restarting Matlab, but do NOT run as administrator.
Matthew McMahon
Matthew McMahon 2025 年 5 月 14 日
Thanks for the idea. I wasn't running as administrator before. I tried running as an administrator, and on startup got the following message:
Warning: Name is nonexistent or not a directory: Z:\Projects\MATLAB
In administrator mode, I couldn't even access that directory in the Current Folder explorer. Running as a non-admin, I have the same issue as before.
Image Analyst
Image Analyst 2025 年 5 月 14 日
Does that Z folder show up in your startup.m file, or in the path list if you click the Set Path button on the tool ribbon? If so, remove it.
Walter Roberson
Walter Roberson 2025 年 5 月 14 日
I cannot say that I am astonished; there have been several mapped-drive glitches showing up in the last half-year.
Matthew McMahon
Matthew McMahon 2025 年 5 月 14 日
@Image Analyst The Z:\ folder is not in the startup.m file or the path list.
Matthew McMahon
Matthew McMahon 2025 年 5 月 14 日
Thanks @Walter Roberson. I have submitted it as a bug report.
Matthew McMahon
Matthew McMahon 2025 年 5 月 15 日
For the benefit of any MathWorks staff viewing this, I tried downloading the offline Help documentation today. Since the new offline help leverages the system default Web browser, it has the same issue as the online help.
Image Analyst
Image Analyst 2025 年 7 月 4 日
Please attach this file "C:\Program Files\MATLAB\R2024b\toolbox\local\pathdef.m" so we can inspect it.
Matthew McMahon
Matthew McMahon 2025 年 7 月 7 日
@Iman See my answer below. Thanks.

サインインしてコメントする。

 採用された回答

Matthew McMahon
Matthew McMahon 2025 年 7 月 7 日

1 投票

Sorry - I see I left this thread unresolved. To wrap this up, I did reach out to MathWorks support and in going back and forth with them I discovered the underlying problem. For some reason, mapping the "Z" drive in Windows Explorer did not successfully map the drive in a way that was visible from the Windows Command Prompt. The workaround is to map the drives explicitly from the Command Prompt using the "net use" command. I set up a batch file to run at Windows login (using the Windows task scheduler utility) that does this mapping explicitly. Now MATLAB opens the help documentation no matter what folder I am working in.

その他の回答 (0 件)

製品

リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by