Matlab has numerous factory toolboxes that are referred to in two distinct ways: “Product Names” and “Feature Names”.
The “Product Name” is the official plain English name of the toolbox, while the “Feature Name” is a more specific identifier used within Matlab.
For example, “MATLAB Test” is the Product Name, and “MATLAB_Test” is also the Feature Name.
The mapping between names is not always just by replacement of spaces with underscores.
To programmatically access the list of toolboxes Product Names, use the ver command in Matlab, which returns a structure array containing both the Product Names.
Then extract the Feature Names from the structure.
Matlab documentation discloses in which Matlab release a function was introduced.
Sometimes the documentation omits to say when a feature / option was added to an existing function.
To avoid needless iterating and possible misapplications of a function in an older release, it’s useful to check the
previous Matlab release documentation.
After clicking on a specific release, one can search for functions within that release only.
Across operating systems, “hibernate” is a power-saving state that saves the current session to disk and powers down the computer, allowing for a quick resume later while not having the long-term battery drain of suspend mode that keeps the RAM powered.
Sometimes as part of diagnosing problems or ensuring that a remote computer stays powered on, hibernate might be disabled.
If restoring such a computer to personal use, or if experiencing issues where a laptop computer has a drained battery after a couple days of non-use, it may be useful to enable hibernate mode.
Check the current state of hibernate mode by running the following command in Windows Terminal:
powercfg /availablesleepstates
If hibernate is enabled, the output will include “Hibernate” in the list of available sleep states.
To enable hibernate mode:
powercfg /hibernate on
However, the option in Control Panel → Power Options → Change plan settings → Change advanced power settings → Sleep → “Hibernate after”
may not be available until making the following registry change:
Reopen The Control Panel → Power Options → Change plan settings → Change advanced power settings, and the “Hibernate after” option should now be available.
Alternatively, enable the hibernate timer setting from the Terminal, where the values are in minutes:
powercfg /setACvalueindex scheme_current SUB_SLEEP HIBERNATEIDLE 43200# 12 hours hibernate while plugged into AC power (or set to 0 for never)powercfg /setDCvalueindex scheme_current SUB_SLEEP HIBERNATEIDLE 10800# 3 hours hibernate while on battery (or set to 0 for never)powercfg /setactive SCHEME_CURRENT
# Set the current power scheme to apply changes
Matlab version upgrade and AddOns installer was significantly changed in Matlab R2025a.
Matlab release upgrades can be initiated from the “bell” icon or from the
Matlab Help menu.
Upgrading or Add-On install requires a graphical connection to the computer (Remote Desktop, VNC, or similar).
Offline installs
are considerably more complex and are not for the typical Matlab user.
The bell icon on the upper right corner of the Matlab Desktop typically shows when a Matlab update is available.
Matlab can force checking for update, even if the bell is not showing an update, with our script
MatlabReleaseUpgrade.m.
Matlab
Add-On Explorer
is launched from the Matlab Desktop and requires a graphical connection.
The
mpm CLI installer
can be used to install Matlab and Add-Ons from the command line.
These techniques allow a Windows development machine to use Notepad++ more effectively.
Notepad++ is a free source code editor and Notepad.
It was first released in 2003 and is an
open source project.
winget install Notepad++.Notepad++
Notepad++ from command line:
add to user environment variable Path the binary path of Notepad++ – typically at %PROGRAMFILES%\Notepad++.
This allows using notepad++ from the Windows Terminal.
Notepad++ shortcut icon open a new window:
When using multiple virtual desktops, by default Notepad++ snaps to the other desktop when clicking the Notepad++ start menu icon.
Make the Notepad++ icon open a new Notepad++ window by editing the Notepad++ start menu shortcut, appending
-multiInst
to the right and outside of the quoted full Target path to notepad++.exe.
This allows opening multiple Notepad++ windows, each with its own set of tabs.
Notepad++ open directory as project:
To open a directory as a project, use the command line option -openFoldersAsWorkspace followed by the path to the directory.
We have found this is often a server-side configuration issue, particularly when it only occurs with a specific server.
The server may be using an older version of OpenSSH that still supports arcfour-hmac, or it may have been configured to allow this encryption type.
To check settings in the SSH client configuration file, look for lines that specify Ciphers or MACs.
If arcfour-hmac is listed, it should be removed.
The Matlab external language interface to Python in Matlab releases before R2022a has a bug with the JIT compilation via
Matlab execution engine
such that any mention of the py.* namespace will make a function unusable if Python is not
available.
Especially problematic is functions that can work without Python (say in an if-else or switch block) where the mere presence of a py.* call will cause the entire function to fail if Python is not available.
To workaround this issue in Matlab older than R2022a, use a private function to encapsulate the Python call.
This way, the main function will not be affected by the Python call.
functionresult =my_fun2(input)if has_python()
result = encaps_fun2(input);
else% fallback code when Python is not availableendend
Make a private function in file “private/encaps_fun2.m”:
functionresult =encaps_fun2(input)result = py.some_module.some_function(input);
end
On Unix-like systems such as Linux and macOS, Python can detect if a script is being run as sudo / root from the
UID,
which is by definition zero for root.
On Windows, the ctypes module can be used to check if the current user is an administrator.
Its convenient to flip an image vertically or horizontally from Terminal.
In general, modifying an image in any way including cropping, flipping, rotating, etc. is a lossy process if the image compression algorithm used is lossy such as JPEG.
Lossless compression formats such as PNG will remain lossless with this operation.
Here are examples using
ImageMagick
or
IrfanView.
Assume the input image is named “in.png” and the modified image is written to “out.png”.
IrfanView has been popular for decades on Windows and
WINE
as a no-cost (not open source) image viewing and simple modification program that handles many formats.
IrfanView can also be used from the command line.
Install IrfanView directly, not via the Microsoft App Store:
winget install --id=IrfanSkiljan.IrfanView
The order of IrfanView command line options is important.
These commands do not open the IrfanView GUI–they are “headless” operations.
If there are spaces in the file paths, they must be enclosed in quotes like
"c:/data pics/in.png"
The POSIX functions
nanosleep()
and
clock_gettime()
useful in games and other programs needing repeatable time delay and time measurement is not available in the standard C library on Windows with Visual Studio and certain MinGW CPU architectures.
The clock tick for Windows is 100 ns.
The practical achievable timer resolution on Windows is in the
millisecond range.
This presents a floor on the accuracy achievable for sleep timers.
Virtual Machine running of Windows makes the sleep accuracy significantly worse.
In general across general-purpose operating systems, high accuracy sleep timer performance is not guaranteed.
For high accuracy sleep timers (i.e., beyond what is needed for gaming and abstract high-level control of hardware interfaces), consider using a real-time operating system (RTOS) or a dedicated microcontroller.