how to call another m file into the present one?

Discussion in 'MATLAB' started by mvrsv, Dec 15, 2003.

  1. mvrsv

    mvrsv Guest

    hi all,

    I have an mfile template.m which is a program for a GUI. I want to use
    another mfile pathconfig.m to get the path from the user so that I can
    use this string in my template.m, the contents of the pathconfig.m are
    as follows.

    function [ output_args ] = pathconfig( input_args )
    % You can set the path of the Template function here.

    I want the user to modify this file to give what ever path he wants
    and then I want to use this string in my template.m file. my doubt is
    how to call this pathconfig.m in my template.m, so that I can get the
    string from that file? I put both the files in the same directory but
    still it is showing "pathconfig = []" when I try to call it.

    mvrsv, Dec 15, 2003
    1. Advertisements

  2. mvrsv

    Geng Jun Guest

    In my pc:
    function path=pathconfig()

    ans =

    Geng Jun, Dec 15, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.