How do I regenerate my MATLAB preferences?
754 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2009-12-15
编辑: MathWorks Support Team
2023-3-1
I have made changes to my MATLAB preferences which I do not wish to keep, or perhaps my preference files have become corrupt.
采纳的回答
MathWorks Support Team
2023-3-1
编辑:MathWorks Support Team
2023-3-1
To regenerate your MATLAB preferences, do the following:
1. Locate the MATLAB preferences directory for your user account.
The default location of the preferences directory is at the following location:
C:\Users\%username%\AppData\Roaming\MathWorks\MATLAB\R20XXx (on Windows)
/home/$USER/.matlab/R20XXx (on Linux)
/Users/$USER/Library/Application Support/MathWorks/MATLAB/R20XXx (on MacOS)
Note: You should replace $USER or %username% with your computer's user name (ex: johnsmith) and R20XXx with your release of MATLAB (ex: R2022b.)
You can also run the following command in the MATLAB command prompt in order to locate your preferences directory:
>> prefdir
This is where your "matlab.prf" file is located. Your path may be different depending on how your system is set up. The preference directory may be hidden in some operating systems.
2. Make sure that MATLAB is closed and rename the preferences directory of your current MATLAB version.
For instance, rename R2022b to R2022b_old. Then create an empty folder with the original name, in this case, R2022b. Creating this empty folder will prevent MATLAB from importing a preference directory from a previous release.
3. Restart MATLAB.
MATLAB will recreate preferences files in the empty preferences directory that was created in step 2. If this does not address the issue that you hoped it would, it is possible to restore your preferences by deleting the newly created directory (R2022b) and renaming the R2022b_old directory back to its original name: R2022b.
0 个评论
更多回答(1 个)
Image Analyst
2021-1-5
IMPORTANT NOTE:
Resetting your preferences will remove any Shortcuts/Favorites you had set up on the Quick Access Toolbar in the upper right corner of MATLAB. To restore these you need to
- Copy over the FavoriteCommands.xml file from your old/prior settings folder to your new one.
- Copy over the shortcuts_2.xml file from your old/prior settings folder to your new one.
- Restart MATLAB
This will now let the Favorites be seen under the Favorites button on the Home tab of the tool ribbon, but it does not put them back onto the Quick Access Toolbar. To do that, you need to
- Go to the Home Tab and Click the arrow on the Favorites and select Quick Access. Your favorites should be there now, but will be without check marks, meaning they are not showing up on your toolbar.
- Check all the Favorites that you want to show up in your Quick Access Toolbar and click the Apply button.
- If you want the words/labels then be sure to click the "Show Label" checkbox. It applies to only the items you are on, not the whole list of items.
- The shortcuts should show up as buttons on the Layout section of the window now.
- Now to rearrange their order, you click and drag the button in the Layout section to the desired location.
- Then click OK
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!