Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8037165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:50:44+00:00 2026-06-05T02:50:44+00:00

I’m developing my own brain imaging toolbox that runs under MATLAB & SPM8, and

  • 0

I’m developing my own brain imaging toolbox that runs under MATLAB & SPM8, and at the same time I have a git clone‘d version of my own toolbox code directory (local git repository) for running analyses, this setup is created according to Kevin Reid’s answer on How to work simultaneously on several different versions of files with git?, which solved a part of the problem (how to have different versions of same .m file accessible at the same time, and still synchronizable by using git fetch or git pull).

However, my MATLAB install is in neither of these git directories; it’s installed normally in /usr/local/MATLAB/R2012a/. MATLAB looks for functions according to pathdef.m, which is stored in which pathdef (/usr/local/MATLAB/R2012a/toolbox/local/pathdef.m) as a regular function. So I cannot have two MATLAB instances running simultaneously so that they had different pathdef‘s, at least not by modifying pathdef.m file.

Of course MATLAB has to know beforehand where to look for pathdef.m to define the path. Is there a way to change pathdef.m lookup path eg. by some MATLAB command line argument or from MATLAB console? Or by some other means, so that I could have two MATLAB instances running simultaneously with different pathdef‘s? Or should I install MATLAB in two different directories? I’m interested in all kinds of solutions for this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:50:46+00:00Added an answer on June 5, 2026 at 2:50 am

    Let me offer an alternative approach. It involves creating shortcuts inside the MATLAB IDE.

    Simply create two shortcuts, each include something like:

    addpath(genpath('/path/to/project_branch'))   %// add branch (and subfolders) to MATLAB path
    cd('/path/to/project_branch')                 %// navigate to directory
    

    (Explanation: The call to addpath will not save the changes system-wide, but will only persist for the current session, unless you call savepath)

    Now whenever you start a new MATLAB session, and you decide to work on one or the other branch, simply click the corresponding shortcut and start hacking away…

    Better yet, if you consider one branch as stable and the other as dev, you can add the stable one to the path permanently, and selectively add the development version on the top of the path addpath('...','-begin') using a shortcut, thus shadowing the other branch for the current session only.

    screenshot

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.