Scientific Computing

CB Radio FM Channels

The USA and Canada permitted FM frequency modulation, optionally with CTCSS and DCS, on 27 MHz CB radio in September 2021. This allows FM operation on the same 40 channels as AM CB radio at 4 watts maximum transmit power. Observations by USA users including the author is that FM is heard mostly in the range of CB radio channels 23 to 31. Any CB radio channel can be used with FM mode, the same as AM or SSB modes. A rise in FM activity over time is also expected on the President P channels that are preprogrammed FM standard CB radio channels with CTCSS / DCS squelch.

8m 40 MHz and 4m 70 MHz ham bands in the USA

Several countries have created an 8 meter ham band near 40 MHz. The USA FCC has a proposed rulemaking RM-11843 to create an 8 meter ham band in the USA. A key conflicting user SNOTEL, which used meteorburst communications to connect very remote sites, has ceased use of the 40 MHz band. As commenters indicate, a rich surplus equipment market exists of military surplus radios and commercial equipment that can be used on the 8 meter ham band. Proposed bandplans allocate FM, CW, and digital modes.


This 8 meter band proposal stands in contrast to the 2014 proposal to make a 4m 70 MHz allocation as exists in numerous other countries around the world. The FCC summarily dismissed the 4m proposal due to incumbent TV channel 4 users. Use this link to query the FCC TV database for channel 4 users. For example, in 2025 there were about 10 full-power DTV licensees (including newly coming on air) across the USA on TV channel 4, an increase from 2014 licensees. Since other countries have allocations close to 70 MHz, the best option for USA ham in the 4m band may be to co-exist in the 72-76 MHz band, perhaps in-between the existing 20 kHz spaced channels. Since typical 4m radios cover 66 MHz - 88 MHz, for international DX, USA hams could receive on 70 MHz and transmit on 72-76 MHz channels. This would be akin to operations for international DX for USA hams in the 60 meter channelized band.

Suppress Ethernet interference to ham/CB radio

While Ethernet itself is subject to interference from ham radio transmission at high transmit power (noted by packet loss or dropped connections during radio transmission), the more common problem is that Ethernet cables can act as antennas and emit signals that interfere with ham radio or CB radio reception, from HF to VHF frequencies. The usual culprit is common mode emissions from the Ethernet cable, which can be mitigated by using the appropriate type “mix” of ferrite beads or chokes on the Ethernet cable close to each end of the Ethernet cable. If the devices have shielded Ethernet ports, using shielded CAT6a Ethernet cables can also help reduce interference. Note that shielded cables might also make interference worse if the shield is not grounded at both device ends - experimentation is necessary - try with one cable first, with other interfering devices unplugged from the network. Most IoT hubs and VoIP hubs have non-metallic cases, unshielded Ethernet ports and connect by default at 100 Mbps. A tell-tale sign of 100 Mbps Ethernet interference is that the interference is present when the hub is powered on and connected to the network, but disappears when the Ethernet cable is unplugged from the hub, even if the hub is still powered on. The RF interference characteristic of 100 Mbps Ethernet is approximately 61 kHz spaced tones across the HF bands that are constantly present regardless of data traffic. To save costs, the devices may often omit internal ferrite chokes on the Ethernet port, so adding external ferrite chokes on the Ethernet cable can help reduce interference.

Measuring improvements by experimentation

An AM receiver tuned to the RF frequency of interest is the minimum requirement, but an SSB receiver is usually more sensitive for detection. Due to the AGC action of the receiver, making small improvements to the interference may not be detectable by ear. In general, a more effective measurement is a spectrum analyzer view typical to a software defined radio (SDR) receiver, which can show the interference power level in dB and the improvement from mitigation efforts with “peak hold” to detect the overall change before / after mitigation. Broadband hash from power supplies - whether USB or other “wall wart” or inline power supplies (unrelated to Ethernet) is often not detectable by ear, and is better seen by signal strength meter or spectrum analyzer view.

Ethernet interference mitigation ideas

A cost-free solution can be to force the Ethernet ports the hubs are connected to to operate at 10 Mbps instead of 100 Mbps. This may focus the unwanted common-mode RF emissions to lower frequencies. Where switch and endpoint support it, test fixed 10 Mbps full-duplex on both ends of the link.

If forcing hubs to 10 Mbps is not suitable, whether due to failed link negotiation, insufficient bandwidth, or persistent interference, add ferrite chokes to the Ethernet cables as the next step. The ferrite mix is frequency range dependent. If a wide range of frequency bands experience interference, use multiple chokes with the appropriate distinct mixes to cover the different frequency ranges. An off-the-shelf solution is the DX Engineering ISO-PLUS Ethernet RF Filters DXE-ISO-PLUS-2, which are designed for 10/100/1000 Mbps Ethernet and cover a wide frequency range with 20 - 30 dB of interference suppression across the HF radio bands. For frequencies below about 25 MHz, a common mix is the Type 31 mix. For frequencies above about 25 MHz, a common mix is the Type 43 mix. Seek a size like FT240-31 or FT240-43, which can accommodate multiple loops of multiple Ethernet cables for increased suppression. Consider kits like from Palomar Engineers which include multiple chokes with different mixes for a range of frequencies.

Compiling Fortran 66 programs

A general rule for compiling and running old code in any language is to first try to get it working for known input / output via emulation or virtual machine. Many old codes were made before linters and other correctness checks we’ve long taken for granted. The codes may use non-standard tricks to boost efficiency that haven’t been significant for decades.

A modern Fortran compiler that can compile Fortran 66 standard code without modification is Intel oneAPI. The -f66 flag enables Fortran 66 compatibility. A key behavior difference with Fortran 66 is that Do loops always run at least once. This behavior is not available in Gfortran. If one has the ability to use a virtual machine with unmaintained compilers like g77 and the -fonetrip flag, this behavior can be emulated. However, this behavior was simply not addressed in the Fortran 66 standard.

After correct operation is established, Fortran 66 code often needs adjustments to work with modern compilers. The Fortran Wiki has an excellent article on modernizing Fortran syntax.

Always make a copy of the file first. Sometimes 10,000+ lines will match so it can be tedious to check. Similar operations may be needed if a mix of tabs and spaces are used.

To move line numbers left, run this regex and replace with null (nothing):

^\s+(?=\d+\s)

To make code start in column 7, recall that fixed format (Fortran <= 77) code has line numbers in columns 1-5 of each line numbers After the prior operation, push the actual code right of column 6 by replacing this regex with appropriate number of spaces:

(?<=^\d+\s+)

Other compatibility notes:

  • $ can be used like a semicolon in CDC Cyber Fortran
  • put procedures in separate files for duplicated line numbers.

Related: Fortran compiler flags for old code

Matlab license toolbox names

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.

versions = ver();
productNames = string({versions.Name});

for i = 1:numel(productNames)
  featureNames(i) = string(com.mathworks.product.util.ProductIdentifier.get(productNames(i)).getFlexName());
end

Matlab previous release documentation

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.

Windows Hibernate enable / disable

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:

REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\9d7815a6-7ee4-497e-8888-515a05f02364 /v Attributes /t REG_DWORD /d 2 /f

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 upgrade release

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.

Matlab release upgrade

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-Ons and mpm CLI installer

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.

Troubleshooting

If the graphical connection has a problem like:

terminating with uncaught exception of type (anonymous namespace)::DisplayError: No display available.

try making a graphical UI window like:

h = uihtml(HTMLSource=which('peppers.png'), Position=[0,0,512,384])

This should show the Peppers image including with Matlab.


If on Linux with a graphical connection and errors result, try prioritizing system libcrypto.so like:

LD_PRELOAD=/path/to/libcrypto.so matlab

Related: Matlab install on Linux

Fortran MPI on Windows

MPI on Windows with C and Fortran is best accomplished with WSL using OpenMPI or MPICH, which gives essentially full performance MPI. We use WSL on Windows for MPI because the “mpi_f08” interface is not yet natively available on Windows via MS-MPI whether with or without MSYS2. Neither OpenMPI or MPICH is buildable or available with native Windows.

Nonetheless, if one wishes to install Microsoft MPI:

winget install Microsoft.msmpi

The MSYS2 MS-MPI library can be installed from the MSYS2 Terminal:

pacman -S mingw-w64-ucrt-x86_64-msmpi

Upon installing or updating Intel oneAPI compilers and libraries on Windows, you may experience CMake failing to find MPI for MinGW. This happens because Intel compilers put Intel MPI on the system PATH. Fix this by removing Intel MPI from the system PATH and use the Intel Compiler shell instead, which provides all the needed directories.