
To write:
A script that will calculate the circumference of a circle
Answer to Problem 3.1P
Solution:
The created variable
Explanation of Solution
The formula to calculate the circumference of a circle is,
Here, the radius of the circle is
Consider, the radius is
Substitute
MATLAB Code:
clc
clear all
close all
r = 2;
% Define the variable r.
C = (2*pi*r)
% Define the variable circumference.
Save the MATLAB script with name, chapter3_54793_3_1P.m in the current folder. Execute the script by typing the script name at the command window to create a variable C and store circumference in it, define the variable
Result:

Therefore, the created variable
Want to see more full solutions like this?
Chapter 3 Solutions
Matlab, Fourth Edition: A Practical Introduction to Programming and Problem Solving
- A fair die is rolled 120 times.The number 6 appears 28 times.Calculate the experimental probability of getting a 6, and compare it with the theoretical probability.State whether the die seems fair or biased based on the results.arrow_forwardA factory worker records the number of defects in 20 boxes:1, 0, 2, 3, 1, 2, 4, 0, 1, 2, 3, 1, 0, 2, 3, 1, 2, 4, 1, 0.Construct a frequency table.Then calculate the mean number of defects per box.arrow_forwardA machine produces packets of chips whose weights follow a normal distribution.The mean weight is 52 grams and the standard deviation is 4 grams.What percentage of packets are expected to weigh between 48 grams and 56 grams?Use the empirical (68–95–99.7) rule.arrow_forward
- Skip please ! A class of 50 students took a mathematics test.The mean score was 68 and the standard deviation was 10.If a student scored 88 marks, calculate the student’s z-score.Based on the z-score, explain whether the student performed above or below average.arrow_forwardA bag contains balls numbered from 1 to 40.One number is selected at random.Find the probability that the selected number is a multiple of 3 or a multiple of 5.Also find the probability that the number is a multiple of both.arrow_forwardSkip ! A company recorded the monthly salaries (in dollars) of its 12 employees.The values are: 3200, 3400, 3100, 3800, 4100, 2900, 3000, 3600, 3300, 3500, 4000, 4200.Calculate the mean, median, and mode of the salary distribution.Also state whether the data is skewed or not.arrow_forward
- A fair die is rolled twice.Find the probability that the sum is equal to 8.List favourable outcomes.Then calculate probability.arrow_forwardSkip A standard 52-card deck is well shuffled.Two cards are drawn one after the other without replacement.What is the probability that both cards are aces?Give the answer as a simplified fraction.arrow_forwardA box contains 6 red, 4 blue, and 5 green balls.One ball is drawn randomly.What is the probability that it is not green?Give the final answer as a fraction.arrow_forward
- A jar has 10 marbles: 3 white, 4 black, 3 blue.Two marbles are drawn with replacement.Find the probability that both are black.Express answer as a fraction.arrow_forwardA class has 40 students, with 15 boys.One student is chosen at random.What is the probability that the student is a girl?Express the answer in decimal.arrow_forwardA standard deck has 52 cards.One card is drawn at random.What is the probability that it is a face card?Give your answer in simplest form.arrow_forward
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:Cengage
Glencoe Algebra 1, Student Edition, 9780079039897...AlgebraISBN:9780079039897Author:CarterPublisher:McGraw Hill
College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage Learning
Holt Mcdougal Larson Pre-algebra: Student Edition...AlgebraISBN:9780547587776Author:HOLT MCDOUGALPublisher:HOLT MCDOUGAL
Algebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning
Algebra: Structure And Method, Book 1AlgebraISBN:9780395977224Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. ColePublisher:McDougal Littell




