[Top][All Lists]

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

Octave adding path of folder and subfolder

From: usman
Subject: Octave adding path of folder and subfolder
Date: Mon, 4 Feb 2019 14:36:59 -0600 (CST)

I have several .m inside a folder(and subfolders) that defines its self  as
a PROGRAM . However, these functions are in another directory of the main
folder (or these functions are in sub-directories). I am not sure which
commands may I include to perform this task without any errors.

I tried using addpath(), load(), etc. but I don't know the proper usage, may
be that's a reason.

Maincode.m (Is a file in directory e.g /program/example/maincode.m):

% start of code
%end of code

plot_traction_force.m (Is a file in directory e.g

% start of code
function [] = plot_traction_force(t_cycle,F_trac_veh)
% code goes here
%end of code

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??

Sent from:

reply via email to

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