[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:48:13 -0600 (CST)

I have a main program that calls functions to perform a task. 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.

I want to provide my program as a zip file and when the user has it , it
executes and every .m file can call each other in the folder

Sent from:

reply via email to

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