2

I have one license of Matlab on my computer. I want to be able to run two programs simultaneously in Matlab in order to save my time, but I am not aware of how can I do that. I would like to know how it can be done. Thanks.

Divakar
  • 218,885
  • 19
  • 262
  • 358
  • My license lets me open two (or more) copies of matlab simultaneously (R2011b linux 64bit). Is this an option for you? – Ian Hincks Feb 14 '12 at 22:54
  • I saw I can open another GUI simultaneously. But, would it let me run simultaneous 2nd program though without speed problems? –  Feb 14 '12 at 22:56
  • It will let you run two problems at once, yes. As for the speed, it completely depends on what you're doing. If one of the problems is using all of your cores, you can hardly expect running a second instance of it not to slow it down. – Ian Hincks Feb 14 '12 at 23:02
  • (I've been assuming that these programs are unrelated - for example you have a computation that takes hours and you want to run some other small ones in the mean time. The parallel toolbox is what you need for true parallelization) – Ian Hincks Feb 14 '12 at 23:06
  • @Ian: Yeah, those programs I am talking about are unrelated i.e. two different non-interfering files. –  Feb 14 '12 at 23:19
  • You can run as many Matlab sessions as you want. Of course you may run into speed problems depending on how powerful (or not) your computer is. But these speed issues would occur even if you could run the two programs in parallel in a single session. – Jonas Feb 15 '12 at 02:59
  • @Jonas: Do you have any approximate idea if I try to run a program which takes ~10 hours, how much would it take to run that similar program if I were simultaneously running a 2nd program which takes ~30 seconds? –  Feb 15 '12 at 03:36
  • Not more than 10 hours and 1 minute. – Jonas Feb 15 '12 at 04:12

3 Answers3

6

You cannot run two programs at the same time in a single MATLAB session. Even if you could, there would be no time savings, because MATLAB does not become idle while running one program.

If you have a multi-core machine and the Parallel Computing Toolbox, you should be able to use additional cores to run other programs in parallel workers.

Kavka
  • 4,191
  • 16
  • 33
3

On my system at least, I can open independent copies of Matlab. (In windows 7, right click on the icon in the system tray and click on the Matlab R201xx icon to open a new copy). Your license and mileage may vary.

Marc
  • 5,315
  • 5
  • 30
  • 36
0

On a mac, you can go to the terminal and enter the following to begin a new independent Matlab session (allows you to have multiple "sessions" of Matlab running concurrently).

/Applications/MATLAB_R2013a_Student.app/bin/matlab

  • The location and version names may change for your independent applications