
Matlab
6th Edition
ISBN: 9781119299257
Author: Amos Gilat
Publisher: WILEY CONS
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 3, Problem 32P
The magic square is an arrangement of numbers in a square grid in such a way that the sum of the numbers in each row, and in each column, and in each diagonal is the same. MATLAB has a built-in function magic (n) that returns an n×n magic square. In a script file create a (5×5) magic square, and then test the properties of the resulting matrix by finding the sum of the elements in each row, in each column and in both diagonals. In each case, use MATLAB’s built-in function sum. (Other
Expert Solution & Answer

Want to see the full answer?
Check out a sample textbook solution
Students have asked these similar questions
Question 3
The following stem-and-leaf displays the weekly salary of employees at this firm.
Stem-and-Leaf Display
Leaf Unit = 10.0
N=x
5
3 00123
12 4 0125888
(y)
5 11234456777
z
6 13568
5
7 154
2
8 46
i.
Determine the value of x, y and z.
[3]
ii. What is the value of the median?
[2]
iii.
Find the mode of this data set.
iv.
Calculate the range
[1]
[2]
Let Y be a continuous RV with PDF
otherwise
Find the CDF, Fry), of Y .
Find an expression for pth, p € (0, 1), quantile of the distribution.
Find E(Y) and V(Y).
Find E(-2Y + 1) and V(-3Y - 2).
Find E(Y3).
Let X be a continuous RV with CDF
Find P(X < 0), P(-1 < X < 1) and P(0.5 < X).
Based on your answers to the above questions, what is the median of the distribu-tion? Why
Find the PDF, fx (x), of X.
Chapter 3 Solutions
Matlab
Ch. 3 - Prob. 1PCh. 3 - For the function y=x4ex, calculate the value of y...Ch. 3 - For the function y=(x+yx+3)(1+2x2)x3 , calculate...Ch. 3 - For the function y=4sinx+6(cos2x+sinx)2 ,...Ch. 3 - The radius, r, of a sphere can be calculated from...Ch. 3 - Prob. 6PCh. 3 - The remaining loan balance, B, of a fixed payment...Ch. 3 - Prob. 8PCh. 3 - Prob. 9PCh. 3 - The angle between two vectors u1=x1i+y1j+z1k and...
Ch. 3 - The following vector is defined in MATLAB: d=[2 4...Ch. 3 - The following two vectors are defined in MATLAB:...Ch. 3 - Define the vector v= [1 3 5 7]. Then use the...Ch. 3 - Define the vector v=[5 4 3 2]. Then use the vector...Ch. 3 - Define x and y as the vectors x= [0.5, 1, 1.5, 2,...Ch. 3 - Define r and s as scalars r = 1.6 × 103 and s =...Ch. 3 - The area of a triangle ABC can be calculated by...Ch. 3 - Prob. 18PCh. 3 - The center of mass, ( x , y, z). of n particles...Ch. 3 - Prob. 20PCh. 3 - The maximum distance s and the maximum height h...Ch. 3 - Use MATLAB to show that the sum of the infinite...Ch. 3 - Use MATLAB to show that the sum of the infinite...Ch. 3 - The natural exponential function can be expressed...Ch. 3 - Show that limx/3sin(x/3)4cos2x1=36 . Do this by...Ch. 3 - Show that limx05sin(6x)4x=7.5. Do this by first...Ch. 3 - The Hazen Williams equation can be used to...Ch. 3 - The monthly lease payment. Pmt, of a new car can...Ch. 3 - Create the following three matrices: A= 537206489...Ch. 3 - Use the matrics A, B, and C from the previous...Ch. 3 - Create a 33 matrix A having random integer values...Ch. 3 - The magic square is an arrangement of numbers in a...Ch. 3 - Solve the following system of three linear...Ch. 3 - Solve the following system of six linear...Ch. 3 - A football stadium has 100.000 seats. In a game...Ch. 3 - A food company manufactures five types of 8-oz...Ch. 3 - The electrical circuit shown consists of resistors...
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
- A survey of 581 citizens found that 313 of them favor a new bill introduced by the city. We want to find a 95% confidence interval for the true proportion of the population who favor the bill. What is the lower limit of the interval? Enter the result as a decimal rounded to 3 decimal digits. Your Answer:arrow_forwardLet X be a continuous RV with PDF where a > 0 and 0 > 0 are parameters. verify that f-∞ /x (x)dx = 1. Find the CDF, Fx (7), of X.arrow_forward6. [20] Let X be a continuous RV with PDF 2(1), 1≤x≤2 fx(x) = 0, otherwisearrow_forward
- A survey of 581 citizens found that 313 of them favor a new bill introduced by the city. We want to find a 95% confidence interval for the true proportion of the population who favor the bill. What is the lower limit of the interval? Enter the result as a decimal rounded to 3 decimal digits. Your Answer:arrow_forwardA survey of 581 citizens found that 313 of them favor a new bill introduced by the city. We want to find a 95% confidence interval for the true proportion of the population who favor the bill. What is the lower limit of the interval? Enter the result as a decimal rounded to 3 decimal digits. Your Answer:arrow_forward2. The SMSA data consisting of 141 observations on 10 variables is fitted by the model below: 1 y = Bo+B1x4 + ẞ2x6 + ẞ3x8 + √1X4X8 + V2X6X8 + €. See Question 2, Tutorial 3 for the meaning of the variables in the above model. The following results are obtained: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.302e+03 4.320e+02 3.015 0.00307 x4 x6 x8 x4:x8 x6:x8 -1.442e+02 2.056e+01 -7.013 1.02e-10 6.340e-01 6.099e+00 0.104 0.91737 -9.455e-02 5.802e-02 -1.630 0.10550 2.882e-02 2.589e-03 11.132 1.673e-03 7.215e-04 2.319 F) x4 1 3486722 3486722 17.9286 4.214e-05 x6 1 14595537 x8 x4:x8 x6:x8 1 132.4836 < 2.2e-16 1045693 194478 5.3769 0.02191 1 1198603043 1198603043 6163.1900 < 2.2e-16 1 25765100 25765100 1045693 Residuals 135 26254490 Estimated variance matrix (Intercept) x4 x6 x8 x4:x8 x6:x8 (Intercept) x4 x6 x8 x4:x8 x6:x8 0.18875694 1.866030e+05 -5.931735e+03 -2.322825e+03 -16.25142055 0.57188953 -5.931735e+03 4.228816e+02 3.160915e+01 0.61621781 -0.03608028 -0.00445013 -2.322825e+03…arrow_forward
- In some applications the distribution of a discrete RV, X resembles the Poisson distribution except that 0 is not a possible value of X. Consider such a RV with PMF where 1 > 0 is a parameter, and c is a constant. (a) Find the expression of c in terms of 1. (b) Find E(X). (Hint: You can use the fact that, if Y ~ Poisson(1), the E(Y) = 1.)arrow_forwardSuppose that X ~Bin(n,p). Show that E[(1 - p)] = (1-p²)".arrow_forwardI need help with this problem and an explanation of the solution for the image described below. (Statistics: Engineering Probabilities)arrow_forward
- I need help with this problem and an explanation of the solution for the image described below. (Statistics: Engineering Probabilities)arrow_forwardThis exercise is based on the following data on four bodybuilding supplements. (Figures shown correspond to a single serving.) Creatine(grams) L-Glutamine(grams) BCAAs(grams) Cost($) Xtend(SciVation) 0 2.5 7 1.00 Gainz(MP Hardcore) 2 3 6 1.10 Strongevity(Bill Phillips) 2.5 1 0 1.20 Muscle Physique(EAS) 2 2 0 1.00 Your personal trainer suggests that you supplement with at least 10 grams of creatine, 39 grams of L-glutamine, and 90 grams of BCAAs each week. You are thinking of combining Xtend and Gainz to provide you with the required nutrients. How many servings of each should you combine to obtain a week's supply that meets your trainer's specifications at the least cost? (If an answer does not exist, enter DNE.) servings of xtend servings of gainzarrow_forwardI need help with this problem and an explanation of the solution for the image described below. (Statistics: Engineering Probabilities)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage LearningAlgebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningCollege AlgebraAlgebraISBN:9781305115545Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage Learning
- Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning

College Algebra (MindTap Course List)
Algebra
ISBN:9781305652231
Author:R. David Gustafson, Jeff Hughes
Publisher:Cengage Learning

Algebra and Trigonometry (MindTap Course List)
Algebra
ISBN:9781305071742
Author:James Stewart, Lothar Redlin, Saleem Watson
Publisher:Cengage Learning

College Algebra
Algebra
ISBN:9781305115545
Author:James Stewart, Lothar Redlin, Saleem Watson
Publisher:Cengage Learning

Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning


12. Searching and Sorting; Author: MIT OpenCourseWare;https://www.youtube.com/watch?v=6LOwPhPDwVc;License: Standard YouTube License, CC-BY
Algorithms and Data Structures - Full Course for Beginners from Treehouse; Author: freeCodeCamp.org;https://www.youtube.com/watch?v=8hly31xKli0;License: Standard Youtube License