How add my folder '+op' to the path Matlab?

12 Ansichten (letzte 30 Tage)
Edson
Edson am 29 Jun. 2022
Kommentiert: Walter Roberson am 29 Jun. 2022
I have managed to add the following address to the path. C:\Users\mexed\Desktop\ICNGitHub\ICN\ICN\src\oo
I added a package with the name +op but I cannot add it to the path. The +op package inside has folders of matlab classes @etc, @dummy.
How can I add this +op package to the path?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 29 Jun. 2022
You can never add a + folder to the MATLAB path. Instead, you add the folder containing the + folder.
  2 Kommentare
Edson
Edson am 29 Jun. 2022
The folder containing +op is oo C:\Users\mexed\Desktop\ICNGitHub\ICN\ICN\src\oo\+op then how do I run it in the command window? Because I use for example >> dummy = etc but it gives error
Walter Roberson
Walter Roberson am 29 Jun. 2022
Add C:\Users\mexed\Desktop\ICNGitHub\ICN\ICN\src\oo to the path. Then
op.SOMEFUNCTIONNAME
I was not able to find the github archive you are using in order to be able to provide a more specific example.
The point is that when you have a + folder, you need to use a dot-qualified name for the function.
When there is a + folder, you can also use "import" to bring the namespace in. However, "import" only affects the current function: there is no way to "import" into a file as a whole, which is certainly a nuisance.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by