[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave adding path of folder and subfolder

From: Andrew Janke
Subject: Re: Octave adding path of folder and subfolder
Date: Mon, 4 Feb 2019 16:23:58 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 2/4/19 4:12 PM, Mike Miller wrote:
On Mon, Feb 04, 2019 at 14:36:59 -0600, usman wrote:
The directory view:

     |--> maincode.m
           |--> plotftn1.m
           |--> plotftn2.m

where plotftn1.m, vehicle_data.m, electric_machine_map.m are functions
called by maincode.m.

I don't know how to implement this for a number of functions that might be
in different directories of the parent directory.

QUESTION is " How do I include a command or a method that can do the same
operation like in MATLAB you just select include folder and subfolders and
everything works fine... how can I do this in OCTAVE??

I think you are looking for the function "genpath".


     addpath (genpath ('/path/to/EVD_Program'))

will add EVD_Program and each subdirectory to the load path.

I stand corrected. I didn't know about genpath. Forget what I said about enumerating all your directories yourself in init_EVD_Program. Use genpath instead.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]