[Top][All Lists]

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

Re: Octave adding path of folder and subfolder

From: Mike Miller
Subject: Re: Octave adding path of folder and subfolder
Date: Mon, 4 Feb 2019 13:12:02 -0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Feb 04, 2019 at 14:36:59 -0600, usman wrote:
> The directory view:
> |-->EVD_Program
>  |-->example
>     |--> maincode.m
>  |-->Functions
>     |-->plotfunctions
>           |--> plotftn1.m
>           |--> plotftn2.m
>  |-->extension
>     |-->vehicle_data.m   
>     |-->electric_machine_map.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.


Attachment: signature.asc
Description: PGP signature

reply via email to

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