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.

 Risposta accettata

Torsten
Torsten il 13 Lug 2026 alle 11:38
Spostato: Torsten il 13 Lug 2026 alle 11:38
If you open the Active Sonar Example in MATLAB Online, you will find this function.

7 Commenti

Michael
Michael il 13 Lug 2026 alle 11:44
Modificato: Michael il 13 Lug 2026 alle 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?
Torsten
Torsten il 13 Lug 2026 alle 11:52
Modificato: Torsten il 13 Lug 2026 alle 11:57
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.

Accedi per commentare.

Più risposte (0)

Categorie

Prodotti

Release

R2026a

Richiesto:

il 13 Lug 2026 alle 11:28

Commentato:

il 14 Lug 2026 alle 11:14

Community Treasure Hunt

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

Start Hunting!

Translated by