(1) Write an M-file that takes in a complex number in its rectangular form (a +...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(1) Write an M-file that takes in a complex number in its rectangular form (a + jb) and convert it to its polar form(r<0). Use input and fprintf commands to display a mix of text "Z" and numbers. [5 Marks] (ii) Body Mass Index (BMI) is a measure of body fat based on height and weight. BMI applies to most adults aged 18 to 65. It is calculated by dividing weight in kilograms by height in meters squared. A BMI below 18.5 is considered underweight, a BMI of 18.5 to 24.9 is considered healthy weight, while a BMI of 25 to 30 is considered overweight, and a BMI of 30 and above is considered obese. Write a user-defined MATLAB function, that will take the users height in meters and their weight in KG and displays the BMI index and the category in which the user falls into. You might want to use 'mod' and 'input' function and look up the 'fprintf' command to display your answer in the required format. (iii)Triangular numbers are a sequence of numbers that can be represented in the form of an equilateral triangle. The first triangular number is 1, which represents a single dot. The second triangular number is 3, which represents an equilateral triangle with two dots on each side. The third triangular number is 6, which represents an equilateral triangle with three dots on each side, and so on. 1 3 6 Figure 1 [10 Marks] Calculate 10 Triangular numbers starting from 1 using MATLAB and display them as equilateral triangles of asterisks *** similar to the display in Figure 2. Using "plot" function. [10 Marks] Figure 2 (1) Write an M-file that takes in a complex number in its rectangular form (a + jb) and convert it to its polar form(r<0). Use input and fprintf commands to display a mix of text "Z" and numbers. [5 Marks] (ii) Body Mass Index (BMI) is a measure of body fat based on height and weight. BMI applies to most adults aged 18 to 65. It is calculated by dividing weight in kilograms by height in meters squared. A BMI below 18.5 is considered underweight, a BMI of 18.5 to 24.9 is considered healthy weight, while a BMI of 25 to 30 is considered overweight, and a BMI of 30 and above is considered obese. Write a user-defined MATLAB function, that will take the users height in meters and their weight in KG and displays the BMI index and the category in which the user falls into. You might want to use 'mod' and 'input' function and look up the 'fprintf' command to display your answer in the required format. (iii)Triangular numbers are a sequence of numbers that can be represented in the form of an equilateral triangle. The first triangular number is 1, which represents a single dot. The second triangular number is 3, which represents an equilateral triangle with two dots on each side. The third triangular number is 6, which represents an equilateral triangle with three dots on each side, and so on. 1 3 6 Figure 1 [10 Marks] Calculate 10 Triangular numbers starting from 1 using MATLAB and display them as equilateral triangles of asterisks *** similar to the display in Figure 2. Using "plot" function. [10 Marks] Figure 2
Expert Answer:
Answer rating: 100% (QA)
Heres a MATLAB script that addresses each of the three parts of your question Part ... View the full answer
Related Book For
Basic Technical Mathematics
ISBN: 9780137529896
12th Edition
Authors: Allyn J. Washington, Richard Evans
Posted Date:
Students also viewed these programming questions
-
Body mass index (BMI) is a measure of body fat based on height and weight. According to the document Dietary Guidelines for Americans, published by the U.S. Department of Agriculture and the U.S....
-
Body mass index (BMI) is a measure of body fat based on height and weight. According to Dietary Guidelines for Americans, published by the U.S. Department of Agriculture and the U.S. Department of...
-
Match the items below by entering the appropriate code letter in the space provided. An entry that involves three or more accounts Transferring journal entries to ledger accounts The side which...
-
Consider the following table, which gives a security analyst's expected return on two stocks for two particular market returns: a. What are the betas of the two stocks? b. What is the expected rate...
-
Rowntown Cab Company has 70 drivers that it must schedule in three 8-hour shifts. However, the demand for cabs in the metropolitan area varies dramatically according to the time of day. The slowest...
-
Describe the common models of managed care organizations.
-
The following data pertain to Legion Lighting Companys oak-clad, contemporary chandelier. Variable manufacturing cost.................................................................$300 Applied...
-
1. A circuit has three resistors connected to a 3.00-V battery in series: R = 15.02, R2 10.02, and R3 = 25.02. Find the equivalent resistance, Req, the total current in the circuit, Itot, and the...
-
Selected accounts from Murray's Furniture Store's adjusted trial balance as of June 30, 2014, the end of the fiscal year, follow. Required 1. Prepare a multistep income statement for Murray's....
-
A company used $35,000 of direct materials, incurred $73,000 in direct labor cost, and had $114,000 in factory overhead costs during the period. If beginning and ending work in process inventories...
-
What do expected utility theory, prospect theory and regret theory have in common? How do they differ?
-
How do behavioural economists descriptions of how people choose and decide differ from the descriptions of behaviour highlighted in mainstream economics?
-
Outline the steps in developing a research proposal.
-
Would you be better off saving for retirement early in your career or later when youre earning more? Explain.
-
What are some of the basic issues that should be addressed at a research request meeting?
-
Stupper Corporation manufactures two products; data are shown below: Contribution Margin Ratio Relative Salo Mes Produt D Product F S0 60% 40% If Stupper's monthly fixed costs average $200,000, what...
-
Do public and private companies follow the same set of accounting rules? Explain.
-
Find the values of the indicated functions assuming is an acute angle. Give answers in exact form. Given sec = 5/2, find tan and cos.
-
When finding the current in a certain electric circuit, the expression (s + 1 + 4j)(s + 1 4j) occurs. Simplify this expression.
-
Give the specific form of the equation by evaluating a, b, and c through an inspection of the given curve. Explain how a, b, and c are found. y = a sin(bx + c) (Fig. 10.21) 5 -5 0 Fig. 10.21 15 - X
-
Personalized medicine may be used a. to characterize types of tumors. b. to predict the outcome of certain types of cancers. c. to determine the proper dosage of drugs. d. in all of the above.
-
Tumor-suppressor genes promote cancer when a. they are overexpressed. b. they are expressed in the wrong cell type. c. their function is inactivated. d. they are expressed at the wrong stage of...
-
Which of the following is a type of genetic change that could produce an oncogene? a. Missense mutation b. Gene amplification c. Chromosomal translocation d. All of the above can produce an oncogene.
Study smarter with the SolutionInn App