"

1 Chapter 1 — Electromagnetic Applications

– put in introductory app: Chapter one first page. guide on how to access apps.

Acknowledgements

Special thanks to MathWorks for funding the creation of this textbook’s applications and to Jon Loftin and Armando Noguera who helped guide us through creating them.

How to Access Simulations and Apps in this Textbook

To help you understand concepts in electromagnetics, we have provided interactive simulations and application. These apps will be accessed online using a MATLAB Online account. Your university likely offers a license for MATLAB online. However, if it doesn’t, you can still create an account and access MATLAB Online (Basic) which will still provide access to our simulations and apps. You can learn more information about the difference between MATLAB Online and MATLAB Online (Basic).

MATLAB Online is like Google Drive but for MATLAB files. You will not be downloading any files onto your computer unless you choose to do so. Instead, you will be downloading a copy of our apps onto your own MATLAB Online Drive. You will only need to download a copy of our apps once.

 Download a copy of our apps and to access a simple calculator app.

When you click on the app you will be shown this pop-up in different tab after you are signed in:

Screenshot of a pop-up window requesting a save location for the textbook code repository.

The window reads, “Open File from Repository: To open ‘HalfWavelengthDipoleCalculator.mlapp’ from https://github.com/cfurse/ElectromagneticsTextbookCode you must first save the repository. Only save repositories from sources you trust. I understand the risks of saving and running code from an outside source, and that opening a file can automatically run code”.

Click the checkbox and Save and Open. This is copying our application code from a GitHub repository into your MATLAB Drive.

Afterward you should see a full-screen version of our application:

Dipole length antenna calculator MATLAB application.

(Long text: TODO) A MATLAB application screenshot with title, “Half-wavelength Dipole Antenna Calculator”. There is an entry box for the operating frequency and below that the app returns the dipole length. On the left side of the app, there is a diagram of a dipole antenna. An AC source symbol lies at the base of a “T” shape. The left side of the “T” is indicated as positive and the right side negative. The horizontal length of the band is half of a wavelength. There is a sinusoidal wave that intersects the left and right side of the band as well as the center.

You may type in a frequency in the entry box to calculate the dipole length. You will learn in Chapter ____ (TODO) what this means. For now, simply test its functionality.

If it does not show a new dipole length below the entry box, you are encountering a known bug. As of October 2024, MATLAB Online fails to set up properly when a link like the above is accessed. To fix the bug:

Select “Show Desktop” on the upper right corner of the screen.

Show desktop button.

Add the repository folder to the MATLAB path. Find a folder called “repositories” in your drive. Right-click the folder and navigate down to the “Add to Path” submenu. Finally, select “Selected Folder(s) and Subfolders”.

Screenshot of adding textbook code repository to path.

To return to the Focused View of the simulation, select the expand button on the simulation window. Your app should be working properly now.

You have now downloaded all of the necessary applications for this textbook.

Please note that when you click future links in this textbook, you will be given a different pop-up that states you already have the textbook code repository. It will ask you to save a new copy.

Screenshot of a pop-up window requesting to save a copy or open an existing copy of the textbook code repository.

(Long-text TODO), The window reads, “Open File from Repository: You already have a copy of ‘HalfWavelengthDipoleCalculator.mlapp’ from https://github.com/cfurse/ElectromagneticsTextbookCode. You can savea  new copy of the repository or open the existing copy. Only save repositories from sources you trust. Existing Location: /MATLABDrive/Repositories/ElectromagneticsTextbookCode. I understand the risks of saving and running code from an outside source, and that opening a file can automatically run code”.

Open Existing Copy so you don’t quickly take up all of our MATLAB Drive storage. You would only select “Save New Copy” if we have updated one of our files and you need to download the most up-to-date version of the repository. If you do so, you may delete the old version of “ElectromagneticsTextbookCode” in your MATLAB Drive.

Feel free to inspect the code used to run our simulations if you are interested. Simply select “Exit to Desktop” and select the desired file in your MATLAB Drive. This will bring you to the environment we used to create the apps. Select “Code View” to see the code.

Code view button screenshot located next to the design view button.

If you encounter any bugs or issues, please email TODO cfurse@ece.utah.edu.

 

Media Attributions

  • DownloadRepoCfurse
  • DipoleCalculatorFocusedView
  • Picture16
  • Picture17
  • RepositoryAlreadyinDriveCfurse
  • CodeView