Unrecognised function or variable helperPlotPaths

I am working with the Phased Array System toolbox and have come across part of the code I am running from the Matlab website, using the function helperPlotPaths across lines 56 to 60 of my code:
%% Plot paths
helperPlotPaths([0;0;-60],[500 500; 1000 0; -70 -40], ...
channelDepth,numPaths)
Running this returns the error:
Unrecognized function or variable 'helperPlotPaths'.
'helperPlotPaths' is used in the example: Underwater Target Detection with
an Active Sonar System.
Error in
Underwater_target_detection (line 58)
helperPlotPaths([0;0;-60],[500 500; 1000 0; -70 -40], ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I can understand this error that helperPlotPaths as a function is not on the path (the path directory I am working in only contains the script I am writing, which include lines 56 to 60 above, and nothing else).
I have looked through the answers on this site and did not find an answer as to where helperPlotPaths is. Please can someone let me know where this function is kept once Phased Array Systems toolbox is downloaded? I do have this toolbox on my computer.

 Accepted Answer

Torsten
Torsten on 13 Jul 2026 at 11:38
Moved: Torsten on 13 Jul 2026 at 11:38
If you open the Active Sonar Example in MATLAB Online, you will find this function.

7 Comments

Michael
Michael on 13 Jul 2026 at 11:44
Edited: Michael on 13 Jul 2026 at 11:44
Thank you, I have copy and pasted this example code for a runthrough. I can see where the function is called.
However, I could not find specifically where the function is saved. I assume I need to move a copy into my working directory or add its location to path. Please can you let me know the directory to where helperPlotPaths() is installed when the Phased Array Systems Toolbox is installed?
I doubt that it is installed at all. If it were, it would not be one of the helper functions for the above example that are explicity supplied, would it ?
Try searching via
which -all helperPlotPaths.m
'helperPlotPaths.m' not found.
on your computer, but I guess the result will be the same as here.
Copy the function from MATLAB Online, save it somewhere and add the location to your search path for future reference.
Looks like the Matlab online code has the helper function in the Onramp. Thanks for your help.
Looks like the Matlab online code has the helper function in the Onramp. Thanks for your help.
That's what I meant when I wrote
If you open the Active Sonar Example in MATLAB Online, you will find this function.
Ah, but your link goes to an html page, which is just the information I had already read and copied. I then tried looking at the online and that worked. So guess there were two ways to interpret your answer, and the one I chose was the more likely (follow the actual link, plus MATLAB Online could also refer to this link)
Please click on the "Copy Command" button in the upper-right corner of the example page then paste that command into MATLAB and run it. Alternately, click "Open Example in MATLAB Online" if you are using MATLAB Online. This will cause MATLAB to open the example and change to the directory containing the files for the example.
@Steven Lord Thank you, I have followed these instructions and the issue is resolved.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2026a

Asked:

on 13 Jul 2026 at 11:28

Commented:

on 14 Jul 2026 at 11:14

Community Treasure Hunt

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

Start Hunting!