
Concept explainers
To create:
A file that has two lines with n numbers in each and use subplot to show the barh and stacked bar charts side by side.
Answer to Problem 12.1P
Solution:
The script file is,
l = load('ponits.dat');
%load the points data file.
subplot(2, 1, 1)
%by using subplot show the bar graph and stacked bar graph side by side.
barh(l);
%plot the bar graph.
xlabel('Values');
%label the x axis as values.
ylabel('Groups');
%label the y axis as values.
subplot(2, 1, 2)
bar(l,'stacked');
%plot the stacked bar.
xlabel('Groups');
%label the x axis as groups.
ylabel('Values');
%label the y axis as values.
Explanation of Solution
Consider, the
MATLAB Code:
l = load('ponits.dat');
%load the points data file.
subplot(2, 1, 1)
%by using subplot show the bar graph and stacked bar graph side by side.
barh(l);
%plot the bar graph.
xlabel('Values');
%label the x axis as values.
ylabel('Groups');
%label the y axis as values.
subplot(2, 1, 2)
bar(l,'stacked');
%plot the stacked bar.
xlabel('Groups');
%label the x axis as groups.
ylabel('Values');
%label the y axis as values.
Save the MATLAB files with name, chapter12_54793_12_1P.m in the current folder. Execute the file by typing the name at the command window to generate output.
Result:
The plot is,

Therefore, the result is stated above.
Want to see more full solutions like this?
Chapter 12 Solutions
MATLAB: A Practical Introduction to Programming and Problem Solving
- Skip All ! A deck of cards contains 52 cards, 13 of each suit. If a card is drawn, replaced, and then another card is drawn, what is the probability of drawing two hearts?arrow_forwardA researcher wants to test if the mean score of a class differs from 75. The sample mean is 78 with a standard deviation of 10 from a sample of 30 students. Test the hypothesis at a 5% significance level.arrow_forwardA call center receives an average of 3 calls per minute. What is the probability that exactly 5 calls are received in a minute?arrow_forward
- Skip ! A fair coin is tossed 10 times. What is the probability of getting exactly 6 heads?arrow_forwardIn a game, you roll a fair die. If you roll a 1, you win $5; if you roll a 2, you win $2; and for any other roll, you win $0. What is the expected value of this game?arrow_forwardA dataset follows a normal distribution with a mean of 75 and a standard deviation of 8. What is the probability that a randomly selected value is between 70 and 80?arrow_forward
- A box contains 5 red balls, 4 blue balls, and 6 green balls. Two balls are drawn one after the other without replacement. What is the probability that both balls are green?arrow_forwardb. 2 (4 points). We consider the problem: y' (t) = |y(t)|³ . (1) (1) (2 points). Suppose y(t) is a solution to (1), show that the graph of y is either entirely in the upper open plane {(t, y) y > 0}, or entirely in the lower open : plane {(t, y) : y 0, y = 0, and y < 0.)arrow_forwardob. 3 (4 points). Let us consider the equation: v' = -ευ - 9, v(0) = 0, where g > 0 and ε are constants. Let the solution be denoted v(t, ε), we use two different methods to show that v depends continuously on ɛ. (1) (2 points). Defining y₁(t) = v(t) and y2(t) = ε, they solve the IVP: d [y1(t) dt [v1(t)] = [f1(y1, y2)] def [f2 (Y1, y2)] -Y1Y2 — g] 0 [31(0) = [ , show that fi is local Lipschitz in (⁄1, Y2). That is, for all (y1, y2) Є R², we can find constants a, b, L > 0 such that for all (x1, x2), (Z1, Z2) Є [y1 − a, Y1 + a] × [Y2 − b, y2b], we have |f1(x1, x2) — f1(21, 22)| ≤ L max(|x1 — 21|, |x2 − 22|). - - (2) (2 points). Find v(t, ε) explicitly and show that v(t, ɛ) = C(R², R).arrow_forward
- Background: Data on infant mortality (measured as deaths per 1,000 under 1 year old) was collected by the United Nations Educational, Scientific, and Cultural Organization (UNESCO) for the 1990 Demographic Year Book and is provided below. Perform an analysis of variance procedure to determine whether or not the differences in the mortality rates of infants in African, Asian and Middle Eastern countries is statistically significant. Directions: Perform an analysis of variance (ANOVA) to determine if the differences in the infant mortality rates in African, Asian and Middle Eastern countries is statistically significant. 1. Click on the Data button below to display the data. Copy the data into a statistical software package and click the Data button a second time to hide it. Click this button to reveal the data. Click again to collapse it. Africa Asia MiddleEast 69 180.6 16 137 120 108.1 64 129 70 69 32 11.7 45.4 6.1 44 140 91 15.6 103 75 47 143 26 42 88 25 71 68 69 75 79 127 26 128…arrow_forwardSkip ! A bag contains 5 red balls, 3 blue balls, and 2 green balls. Two balls are drawn one after the other without replacement. What is the probability that both balls are red?Hint: Multiply probabilities for dependent events.arrow_forwardIn a population of 1000 people, the ages are normally distributed with a mean of 30 years and a standard deviation of 10 years. What is the probability that a randomly selected person is older than 40?Hint: Calculate the Z-score and look up the value in the standard normal table.arrow_forward
Glencoe Algebra 1, Student Edition, 9780079039897...AlgebraISBN:9780079039897Author:CarterPublisher:McGraw Hill
Trigonometry (MindTap Course List)TrigonometryISBN:9781337278461Author:Ron LarsonPublisher:Cengage Learning
Holt Mcdougal Larson Pre-algebra: Student Edition...AlgebraISBN:9780547587776Author:HOLT MCDOUGALPublisher:HOLT MCDOUGAL
Algebra: Structure And Method, Book 1AlgebraISBN:9780395977224Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. ColePublisher:McDougal LittellAlgebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:Cengage




