Matlab
6th Edition
ISBN: 9781119299257
Author: Amos Gilat
Publisher: WILEY CONS
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 6, Problem 9P
Write a program that asks the user to input a
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
. Create a vector named prob18a that has 10 elements of which the first is 8, the increment
is 7, and the last element is 71. Then, assign elements of prob18a to a new vector prob18b
such that prob18b has 7 elements. The first 4 elements of prob18b are the first 4 elements
of the vector prob18a and the last 3 elements of prob18b are the last 3 elements of
prob18a. Do not type the vector elements explicitly.
Loblolly is a built-in R dataset that that records the growth of Loblolly pine trees. We are interested in the height column of Loblolly.
The values in the height column can be converted into a vector of name x by the assignment:
x <- Loblolly$height
We can see the values in x by typing x and Return or Enter. Remember x <- Loblolly$height
After this assignment, we can see the first six values in x by typing head(x) and Return or Enter
a. Give the R code to assign the values in in the height column of Loblolly to the vector named x. (Easy-see above)
b. Calculate the interquartile range of x using the R, IQR() function.
c. Calculate the sum of the squares of the values in x.
d. Calculate the sample mean of x.
e. Calculate the sample variance of x.
f. Calculate the sample standard deviation of x.
f. Using R, calculate a
trimmed mean of x. [
h.Enter your R script in the box below.
Use matlab please. And if possible, add comments also.
Chapter 6 Solutions
Matlab
Ch. 6 - Prob. 1PCh. 6 - Given: d=6e=4f=2 . Evaluate the following...Ch. 6 - Given: v=[-2 4 1 0 2 1 2] and w=[2 50 1 2 1 3]....Ch. 6 - Use the vectors v and w from Problem 3. Use...Ch. 6 - Evaluate the following expressions without using...Ch. 6 - Use loops to create a 46 matrix in which the value...Ch. 6 - Write a program that generates a vector with 30...Ch. 6 - Write a program that asks the user to input a...Ch. 6 - Write a program that asks the user to input a...Ch. 6 - The daily high temperature (°F) in New York City...
Ch. 6 - The Pascal triangle can be displayed as elements...Ch. 6 - Fibonacci numbers are the numbers in a sequence in...Ch. 6 - The reciprocal Fibonacci constant ?is defined by...Ch. 6 - The value of p can be estimated from:...Ch. 6 - The value of p can be estimated from the...Ch. 6 - Write a program that (a) generates a vector with...Ch. 6 - A vector is given by x= [9 -1.5 13.4 13.3 -2.1 4.6...Ch. 6 - The Pythagorean theorem states that a2+ b2= c2....Ch. 6 - Write a MATLAB program in a script file that finds...Ch. 6 - A safe prime is a prime number that can be written...Ch. 6 - Sexy primes are two prime numbers that the...Ch. 6 - A Mersenne prime is a prime number that is equal...Ch. 6 - A perfect number is a positive integer that is...Ch. 6 - A list of exam scores (S) (in percent out of 100%...Ch. 6 - The Taylor series expansion for axis:...Ch. 6 - Write a MATLAB program in a script file that finds...Ch. 6 - The following are formulas for calculating the...Ch. 6 - Body mass index (BMI) is a measure of obesity. In...Ch. 6 - Write a program in a script file that calculates...Ch. 6 - Write a program that determines the change given...Ch. 6 - The concentration of a drug in the body CPcan be...Ch. 6 - One numerical method for calculating the cubic...Ch. 6 - Write a program in a script file that converts a...Ch. 6 - In a one-dimensional random walk, the position x...Ch. 6 - The Sierpinski triangle can be implemented in...Ch. 6 - The roots of a cubic equation a3x3+a2x2+a1x+a0=0...Ch. 6 - The overall grade in a course is determined from...Ch. 6 - A Keith number is a number (integer) that appears...Ch. 6 - The following MATLAB commands create a sine-shaped...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.Similar questions
- Suppose the polynomial ax² + bx + c corresponds to the vector (a, b, c). 2 To what polynomial will (3,4,2) correspond? 3x+4x+2 2 To what polynomial will (3, -3, -5) correspond? 3x²-3x-5 To what polynomial should (3, 4, 2) + (3, -3, -5) correspond? 6x+x-3 What should the corresponding vector be? (6,1,-3) vector components) 2 To what polynomial should 2(3,4,2) correspond? 6x²+8x+4 J What should the corresponding vector be? (6,8,4) Submit Question A Part 2 of 5 Part 3 of 5 (Use to enclose the ▼ Part 4 of 5 Part 5 of 5 Based on the preceding, is there any significance to the componentwise sum of two vectors?" Defend your conclusion..arrow_forwardHi, I am not sure what I am doing wrong and need some assistance for the first question.arrow_forwardplease answerarrow_forward
- Each week a builder makes an order of doors from a supplier. The doors normally cost $60 each, but the supplier gives a 10% discount for any order of 30 or more doors. The orders for the first 8 weeks of the year are given in the vector:orders = [20 40 15 30 25 45 10 35] (a) Write an Octave program using a for loop and if statement to find the total cost of the doors ordered. (b) Extend your program using the find command to find which weeks the builder obtained a discount.arrow_forwardFind the transpose of the Attached matricesarrow_forwardCompute the third row of the product (if it exists) by summing an appropriate linear combination of row vectors. -3 -1 - 1 3 -3 -2 -3 -3 2 3 4 5 1 6 -1arrow_forward
- please nswer the question using math and using vectors in the explanationarrow_forwardThe vector y is a numerical vector. Which ONE of the following best describes what the R code below will calculate? sum(!is.na(y)) A logical vector of the same length as the vector y, which takes the value TRUE for values in y which are NOT missing and FALSE for values in y which ARE missing. Replaces each value in y with TRUE if it is not missing and FALSE if it is missing The number of non-missing values in the vector y. The number of missing values in the vector y. The propostion of non-missing values in the vector y.arrow_forwardDefermine if the set of vectors is limeorly iedepandlant. -5 3 -4 (2) v = 3.8/10arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageElementary Linear Algebra (MindTap Course List)AlgebraISBN:9781305658004Author:Ron LarsonPublisher:Cengage LearningLinear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage Learning
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Elementary Linear Algebra (MindTap Course List)
Algebra
ISBN:9781305658004
Author:Ron Larson
Publisher:Cengage Learning
Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning
College Algebra (MindTap Course List)
Algebra
ISBN:9781305652231
Author:R. David Gustafson, Jeff Hughes
Publisher:Cengage Learning
The Fundamental Counting Principle; Author: AlRichards314;https://www.youtube.com/watch?v=549eLWIu0Xk;License: Standard YouTube License, CC-BY
The Counting Principle; Author: Mathispower4u;https://www.youtube.com/watch?v=qJ7AYDmHVRE;License: Standard YouTube License, CC-BY