Migrate R2025a preferences to a new computer that is running R2025b

I am installing R2025b Matlab on a new computer. The new computer has no prior Matlab installations from which previous preference settings can be auto-imported. However, I have saved the prefdir from R2025a installations on past computers.
Question: Is there a way to get R2025b on the new computer to import my R2025a preferences using only the R2025a prefdir? I know one possible set of steps would be to,
(1) Install R2025a on the new computer.
(2) Drop the saved prefdir files into the fresh R2025a installation in (1).
(3) Delete the R2025b prefdir and restart R2025b.
However, I am wondering if there is a way that avoids the installation of R2025a in step (1). I don't really plan to use R2025a on this computer, and it seems cumbersome to install it solely for the purpose of migrating prefdir settings.
I also know that there are past threads on the topic of prefdir migration. However, these predate the massive desktop change that occurred in R2025, and I am uncertain whether they would apply to the newest Matlab versions.

4 commentaires

Have you already tried the old method anyway? It would be interesting to see if it still works. It wouldn't make sense to me to have to install R2025a just to have the prefdir.
Matt J
Matt J le 14 Nov 2025
Modifié(e) : Matt J le 14 Nov 2025
The "old method", as I understand that to be, is to copy certain .xml files (e.g. the ones responsible for keyboard shortcuts) from the old prefdir and drop them in the new one. But for R2025, I don't know anymore what files are responsible for what.
In particular, the location for keyboard shortcuts seems to have been moved. I have tried copying over the .xml files where things used to be held pre-2025, but that did not have complete success. My keyboard shortcuts remain at their defaults.
I haven't taken the plunge to move to R2025 yet, so this is just a guess...did you try moving over all the prefdir content regardless of trying to figure out what might be what?
Here's an AI Answer for what it's worth...
Custom keyboard shortcuts in MATLAB R2025 are stored as a JSON file that you can save and load through the Keyboard Shortcuts Settings page. To access the settings, go to the Home tab, click Settings in the Environment section, and then navigate to MATLAB > Keyboard > Shortcuts. From there, you can create, customize, and save your shortcuts to a JSON file.
Steps to manage custom keyboard shortcuts
  1. Open the Settings
  • Click the Settings icon on the Home tab under the Environment section.
  1. Navigate to Keyboard Shortcuts
  • In the Settings window, select MATLAB > Keyboard > Shortcuts.
  1. Customize shortcuts
  • Here you can view, add, edit, or remove existing shortcuts.
  1. Save your shortcuts
  • To save your current set of shortcuts, click the settings button (the gear icon) on the Keyboard Shortcuts Settings page and select Save As.
  • Choose a location and name for the JSON file to store your custom shortcuts.
  • Load a saved set of shortcuts
  • To use a previously saved set, click the settings button on the Keyboard Shortcuts Settings page and select Load.
  • Browse for and select the JSON file you want to load.

Connectez-vous pour commenter.

Réponses (1)

While I'm not sure if the contents of the prefdir directory have changed with R2025a+, the location of prefdir is the same.
Windows: C:\Users\%USERNAME%\AppData\Roaming\MathWorks\MATLAB
macOS/Linux: ~/.matlab
You can try going to that location on the old machine, grabbing the entire R2025a directory, and then copy it onto the new computer in the same location. Then when you install R2025b, it should hopefully pick up the old preferences.

1 commentaire

dpb
dpb le 19 Nov 2025
Modifié(e) : dpb le 19 Nov 2025
@Damian Pietrus, that was my suggestion to @Matt J earlier; be interesting to eventually hear back if that was successful. If it weren't, it would seem to me to indicate there's a glitch somewhere in something being stored somewhere else that would need to be resolved.
One would think Mathworks would do things like this internally to be sure... <g>

Connectez-vous pour commenter.

Catégories

Produits

Version

R2025b

Question posée :

le 14 Nov 2025

Modifié(e) :

dpb
le 19 Nov 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by