help-octave
[Top][All Lists]
Advanced

[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
plot_traction_force(t_cycle,F_trac_veh);
%end of code

plot_traction_force.m (Is a file in directory e.g
/program/plotfunctions/plot_traction_force.m):

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

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??
<http://octave.1599824.n4.nabble.com/file/t373187/2019-02-04.png> 




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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