# PTB adding folders to Matlab path on startup

**URL:** <https://psychtoolbox.discourse.group/t/ptb-adding-folders-to-matlab-path-on-startup/5240>\
**Category:** Programming Help\
**Tags:** linux, matlab\
**Created:** [January 24, 2024, 11:10am UTC](https://psychtoolbox.discourse.group/t/ptb-adding-folders-to-matlab-path-on-startup/5240 "2024-01-24T11:10:11Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [January 24, 2024, 9:23pm UTC](https://psychtoolbox.discourse.group/t/ptb-adding-folders-to-matlab-path-on-startup/5240/3 "2024-01-24T21:23:59Z")

</div>

Hi Eric,

so the way to do it would be to `savepath()` once everything is right, and the proper permissions are set on your Matlab install, and then next time just launch Matlab regularly, ie. via. clicking the Matlab icon, or on terminal via `matlab`, instead of `ptb3-matlab` from a terminal.

The afaik only thing `ptb3-matlab` does is launch Matlab with the auto-generated path to Psychtoolbox temporarily added for that session, but not saved! The idea being that ptb3-matlab allows to use ptb for a session without permanent change to the Matlab path. I think NeuroDebian has similar launchers for other Matlab toolboxes. The magic for auto-generating and setting that path is in `more /etc/ptb3/matlab.sh` - it is written by the NeuroDebian team, not part of PTB, not written by us.

Btw. those “Order Numbers: TJ3HSUNX and VCCC6L4H”, which made no sense to me first, now i get. These were for extra support hours paid by your admin, apparently at 15th December 2023, to back-pay for part of the 11 unpaid hours of work from this issue and previous convdersation [Single row entries in "theClut" during calibration with a spectroradiometer (CalMonSpd) - #5 by Erroric](https://psychtoolbox.discourse.group/t/single-row-entries-in-theclut-during-calibration-with-a-spectroradiometer-calmonspd/5033/5). I was quite confused why somebody unprompted bought multiple work hours, so that makes sense now, and big thanks for back-paying that.

As of now, Orderid VCCC6L4H is completely used up, and most of TJ3HSUNX, but I’ll leave you 20 minutes remaining time-budget on OrderId TJ3HSUNX. You’d have to mention that for future requests, and that it is an extra-hour package, to actually find it again, as your regular one-year membership has ran out last December, as well as the entitlement for discounts.

---

_[View the full topic](https://psychtoolbox.discourse.group/t/ptb-adding-folders-to-matlab-path-on-startup/5240)._
