Answered step by step
Verified Expert Solution
Link Copied!

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 hand-crafted for optimum reception at a specific frequency. Until recently, HASL produced primarily 57-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 95% this long (that is,47.5% 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 (300000000)
The formula for the optimum antenna length is:
L =0.95\lambda /2
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 (1 megahertz =1000000 hertz). Second, the contractors who hand-build the antennas are anti-metric activists, and require that all lengths be specified in inches (1 inch =0.0254 meters); the engineers, however, want to see the wavelength and antenna length in meters.
Your program should have the following design:
1. Display the HASL logo
2. Prompt the user for a frequency with the message "Enter the desired reception frequency in MHz: "
3. Calculate the wavelength of the signal
4. Calculate the optimum antenna length
5. Display the signal wavelength in meters
6. Display the antenna length in inches
7. Display the antenna length in meters
Your program's output should look exactly like the following, including words, uppercase/lowercase, 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: 97.8
The signal wavelength is 3.07 meters.
The optimum antenna length is 57.36 inches (1.46 meters).
To Accomplish this Assignment
Step 1: Watch the Video
See the following video for help getting started with the assignment:
Step 2: Steps to Solve the Problem
1. 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.
2. 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.
3. Write a header comment.
4. Turn your design into comments (by adding % at the beginning of each line) then paste it inside your program.
5. Write MATLAB code to implement your design. For each step in the design, write a line or two of code to do that step.
6. Run your program. Eliminate the syntax and semantics errors. Also fix any warning messages you get. Make sure it does not produce extra output.
7. 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 2 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.
Make sure you format the lines of the output exactly as shown in the example above. The decorations, line breaks, spacing, number of digits, and punctuation should be as shown. You will most likely need to use fprintf to get the correct formatting. See Chapter 3 Section 6Links to an external site. and Chapter 3 Section 7 of the ZyBookLinks to an external site. for more details on fprintf.
Step 3: Testing
Run the program with two different sets of values. One set should be the ones in your handwork above. You can choose values for the other set. Test the program on unusual inputs. What happens with zeros? negative numbers? Your program doesn't have to be written to do anything special with these inputs, but you should think about and describe what happens when you try them. Write a description of this testing in a multi-line comment at the end of your source file (the .m file).
Step 4: Submission
Submit to Canvas your .m file. It should run with no errors or warnings.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions