Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are a software developer at Handmade Aerial Solutions, LLC ( HASL ) , a company that builds radio antennas. Each antenna produced by HASL
You are a software developer at Handmade Aerial Solutions, LLC HASL a company that builds radio antennas. Each antenna produced by HASL is handcrafted for optimum reception at a specific frequency. Until recently, HASL produced primarly inch antennas for FM radio reception. However, changing market trends have forced the company to diversify its product line to include cell phones, wireless networking, and the hobbyist market.
You have been asked to develop a program to assist in the design of the new dipole antennas. This program will read as its input a frequency in megahertz, and calculate and display the optimum length for an antenna to receive signals of that frequency. In an ideal world, the antenna would be half the wavelength of the signal; however, the electrical properties of antennas require that they be only this long that is of the wavelength
The formula for calculating the wavelength lambda of an electromagnetic signal given its frequency f is:
lambda c f
Where:
lambda is the wavelength in meters
f is the frequency in hertz
c is the speed of light in meters per second
The formula for the optimum antenna length L is:
L lambda
L is the antenna length in meters.
lambda is the wavelength in meters.
As with any problem, there are some quirks. First of all, the engineers want to enter frequencies in megahertz rather than hertz megahertz hertz Second, the contractors who handbuild the antennas are antimetric activists, and require that all lengths be specified in inches inch meters; the engineers, however, want to see the wavelength and antenna length in meters.
Your program should have the following design:
Display the HASL logo
Prompt the user for a frequency with the message "Enter the desired reception frequency in MHz:
Calculate the wavelength of the signal
Calculate the optimum antenna length
Display the signal wavelength in meters
Display the antenna length in inches
Display the antenna length in meters
Your program's output should look exactly like the following, including words, uppercaselowercase spaces, and newlines: user input is shown in red here, but will be the usual color when you run your script
Handmade
Aerial
Solutions
LLC
Enter the desired reception frequency in MHz:
The signal wavelength is meters.
The optimum antenna length is inches meters
Steps to solve the problem:
Choose some input numbers and calculate the results by hand. You can use a calculator if desired. As you work, consider how you are doing this, what you are doing, what the numbers mean. That is how you will tell the computer to do it
Expand on the design given above. That is give more of the details at each step. Put this design in a text file, one step per line.
Write a header comment.
Turn your design into comments by adding at the beginning of each line then paste it inside your program.
Write MATLAB code to implement your design. For each step in the design, write a line or two of code to do that step.
Run your program. Eliminate the syntax and semantics errors. Also fix any warning messages you get. Make sure it does not produce extra output.
Test your program with different inputs. Test it with the numbers you chose for the handwork in the first step. Verify that it does come out with the correct answers. Capture test runs with different inputs. Your output should exactly match the sample run above, except that you might have more or fewer digits of precision on the numbers.
There are several specifications about how your program should be written.
This program uses input; you will have to prompt the user for it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started