Author Topic: How to access .m files situated at a directory other than the working directory?  (Read 341 times)

Offline sam@iit

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile

My problem is like this -


Suppose I have a directory structure as followed-


PARENT_DIRECTORY
----- CHILD_DIRECTORY1
        ----- myfun.m [FILE]
----- CHILD_DIRECTORY2
----- mainfile.m


I have some codes written in mainfile.m situated in the PARENT_DIRECTORY which is my working directory. And it is required to call a function "myfun", which is written in myfun.m file situated in CHILD_DIRECTORY_1. How can I achieve this in MATLAB?


Thanks in advance... :)

Matlab Forum

« on: »

 

  Subject / Started by Replies Last post
0 Replies
621 Views
Last post September 06, 2008, 12:09:57 PM
by hamid
0 Replies
413 Views
Last post March 28, 2009, 12:47:29 PM
by mihaispr
0 Replies
271 Views
Last post February 27, 2010, 10:00:44 AM
by NubKadiya