Main Content

Create a Standalone GSM Waveform Explorer Application with MATLAB Compiler

This example shows how to use MATLAB Compiler™ to create a standalone application from the custom MATLAB™ app, GSMWaveformExplorer, which was created by using App Designer. By installing MATLAB Runtime (MATLAB Compiler) you can run standalone applications on systems that do not have MATLAB installed. For more information, see Create and Run a Simple App Using App Designer.

MATLAB Simulation

Open the GSMWaveformExplorer app in MATLAB by entering:

GSMWaveformExplorer

The GSMWaveformExplorer app allows you to explore GSM TDMA frame configurations by using the gsmUplinkConfig and gsmDownlinkConfig objects and the gsmFrame function. You can select the Link direction as Uplink or Downlink. In the Timeslot tab, you can adjust the burst type and attenuation of individual timeslots. In the Waveform tab, you can adjust the samples per symbol and burst shape. Select View to visualize the time domain and spectrogram plots of the waveform.

Compile the MATLAB Function into a Standalone Application

Compile GSMWaveformExplorer into a standalone application by using the mcc (MATLAB Compiler) function and specifying the '-m' option. This step takes a few minutes to complete. The first message shown below appears only if your have a network installation and the second message appears only if you are running MATLAB Compiler with a demo license.

mcc('-m','GSMWaveformExplorer');
Disregard cmd.exe warnings about UNC directory pathnames.
DEMO Compiler license.  
  The generated application will expire 30 days from today,  
  on Fri Jul 10 15:13:33 2020. 

You can also use the interactive applicationCompiler (MATLAB Compiler) app to generate the standalone application.

Run the Standalone Application

Before deploying the standalone app, you can test it on a machine that has MATLAB installed by running commands in the MATLAB Command Window. You can run the standalone GSMWaveformExplorer app on a machine that has MATLAB installed by using the system command.

  • If you are running in the Windows or Linux operating system, type:

status = system(fullfile(pwd,'GSMWaveformExplorer'));

  • If you are running in the Mac operating system, type:

status = system(fullfile('GSMWaveformExplorer.app','Contents','MacOS','GSMWaveformExplorer'));

Running the standalone application with the system command uses the MATLAB environment and any library files needed from this installation of MATLAB. As with running the app in MATLAB, running the standalone version of the GSMWaveformExplorer app opens an GSM Waveform Explorer window that allows you to adjust the GSM TDMA frame configurations and view the waveform.

To deploy this application on a machine that does not have MATLAB installed, see MATLAB Runtime (MATLAB Compiler).