Answer the following questions for the array shown below. $$ \text { array } 1=\left[\begin{array}{rrrrr} 1.1 & 0.0 & 2.1 & -3.5 & 6.0 \\ 0.0 & 1.1 & -6.6 & 2.8 & 3.4 \\ 2.1 & 0.1 & 0.3 & -0.4 & 1.3 \\ -1.4 & 5.1 & 0.0 & 1.1 & 0.0 \end{array}\right] $$ a. What is the size of array2? b. What is the value of array \(1(4,2)\) ? c. What is the size and value of array \(1(:, 2: 2)\) ? d. What is the size and value of array \(1([13]\), end) ?

Short Answer

Expert verified
a. Size of array1: 4 x 5 b. Value of array \(1(4,2)\): 5.1 c. Size of array \(1(:, 2: 2)\): 4 x 1; Value of array \(1(:, 2: 2)\): \[ \left[\begin{array}{r} 0.0 \\ 1.1 \\ 0.1 \\ 5.1 \end{array}\right] \] d. Size of array \(1([1 3], \text{end})\): 2 x 1; Value of array \(1([1 3], \text{end})\): \[ \left[\begin{array}{r} 6.0 \\ 1.3 \end{array}\right] \]

Step by step solution

01

Part (a): Finding the size of the array1

To find the size of an array, we need to count the number of rows and the number of columns. In this case, we can see that array1 has 4 rows and 5 columns. So the size of array1 is: Size of array1: 4 x 5
02

Part (b): Finding the value of array \(1(4,2)\)

To find the value of array \(1(4,2)\), we need to look at the element in the 4th row and the 2nd column of array1. The element at this position is 5.1. So: Value of array \(1(4,2)\): 5.1
03

Part (c): Finding the size and value of array \(1(:, 2: 2)\)

To find the size and value of array \(1(:, 2: 2)\), we need to understand colon notation. Colon means all elements along that dimension. In this case, we want all rows but only the 2nd column. The array we are looking for will have the following elements: $$ \left[\begin{array}{r} 0.0 \\ 1.1 \\ 0.1 \\ 5.1 \end{array}\right] $$ Size of array \(1(:, 2: 2)\): 4 x 1 Value of array \(1(:, 2: 2)\): $$ \left[\begin{array}{r} 0.0 \\ 1.1 \\ 0.1 \\ 5.1 \end{array}\right] $$
04

Part (d): Finding the size and value of array \(1([1 3], \text{end})\)

To find the array \(1([1 3], \text{end})\), first, we need to understand brackets and the 'end' notation. Brackets specify the indices of the rows we want to extract, and 'end' means the last column of the array. In this case, we want the 1st and 3rd rows and the last column (5th column). The sub-array will have the following elements: $$ \left[\begin{array}{r} 6.0 \\ 1.3 \end{array}\right] $$ Size of array \(1([1 3], \text{end})\): 2 x 1 Value of array \(1([1 3], \text{end})\): $$ \left[\begin{array}{r} 6.0 \\ 1.3 \end{array}\right] $$

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Solve the following system of simultaneous equations for \(x\). \(\begin{aligned}-2.0 x_{1}+5.0 x_{2}+1.0 x_{3}+3.0 x_{4}+4.0 x_{5}-1.0 x_{6}=0.0 \\ 2.0 x_{1}-1.0 x_{2}-5.0 x_{3}-2.0 x_{4}+6.0 x_{5}+4.0 x_{6}=& 1.0 \\\\-1.0 x_{1}+6.0 x_{2}-4.0 x_{3}-5.0 x_{4}+3.0 x_{5}-1.0 x_{6}=&-6.0 \\\ 4.0 x_{1}+3.0 x_{2}-6.0 x_{3}-5.0 x_{4}-2.0 x_{5}-2.0 x_{6}=10.0 \\\\-3.0 x_{1}+6.0 x_{2}+4.0 x_{3}+2.0 x_{4}-6.0 x_{5}+4.0 x_{6}=&-6.0 \\ 2.0 x_{1}+4.0 x_{2}+4.0 x_{3}+4.0 x_{4}+5.0 x_{5}-4.0 x_{6}=&-2.0 \end{aligned}\)

Radio Receiver. A simplified version of the front end of an AM radio receiver is shown in Figure 2.13. This receiver consists of an \(R L C\) tuned circuit containing a resistor, capacitor, and an inductor connected in series. The RLC circuit is connected to an external antenna and ground as shown in the figure. The tuned circuit allows the radio to select a specific station out of all the stations transmitting on the AM band. At the resonant frequency of the circuit, essentially all of the signal \(V_{0}\) appearing at the antenna appears across the resistor, which represents the rest of the radio. In other words, the radio receives its strongest signal at the resonant frequency. The resonant frequency of the LC circuit is given by the equation $$ f_{0}=\frac{1}{2 \pi \sqrt{L C}} $$ where \(L\) is inductance in henrys (H) and \(C\) is capacitance in farads (F). Write a program that calculates the resonant frequency of this radio set given specific values of \(L\) and \(C\). Test your program by calculating the frequency of the radio when \(L=0.1 \mathrm{mH}\) and \(C=0.25 \mathrm{nF}\).

Aireraft Turning Radius. An object moving in a circular path at a constant tangential velocity \(v\) is shown in Figure 2.14. The radial acceleration required for the object to move in the circular path is given by the equation $$ a=\frac{v^{2}}{r} $$ where \(a\) is the centripetal accelenation of the object in \(\mathrm{m} / \mathrm{s}^{2}, v\) is the tangential velocity of the object in \(\mathrm{m} / \mathrm{s}\), and \(r\) is the turning radius in meters. Suppose that the object is an aircraft, and answer the following questions about it: a. Suppose that the aircraft is moving at Mach \(0.85\), or \(85 \%\) of the speed of sound. If the centripetal acceleration is \(2 \mathrm{~g}\), what is the turning radius of the aircraft? (Note: For this problem, you may assume that Mach 1 is equal to \(340 \mathrm{~m} / \mathrm{s}\), and that \(1 \mathrm{~g}=9.81 \mathrm{~m} / \mathrm{s}^{2}\).) b. Suppose that the speed of the aircraft increases to Mach 1.5. What is the turning radius of the aircraft now? c. Plot the turning radius as a function of aircraft speed for speeds between Mach \(0.5\) and Mach 2.0, assuming that the accelention remains \(2 \mathrm{~g}\). d. Suppose that the maximum acceleration that the pilot can stand is \(7 \mathrm{~g}\). What is the minimum possible turning radius of the aircraft at Mach 1.5? e. Plot the turning radius as a function of centripetal acceleration for accelerations between \(2 \mathrm{~g}\) and \(8 \mathrm{~g}\), assuming a constant speed of Mach \(0.85\).

Are the following MATLAB variable names legal or illegal? Why? a. dog1 b. \(1 \mathrm{dog}\) c. Do you_know_the_way_to_san_jose d. help e. What's_up?

Position and Velocity of a Ball. If a stationary ball is released at a height \(h_{o}\) above the surface of the Earth with a vertical velocity \(v_{o}\), the position and velocity of the ball as a function of time will be given by the equations $$ \begin{gathered} h(t)=\frac{1}{2} g t^{2}+v_{0} t+h_{0} \\ v(t)=g t+v_{0} \end{gathered} $$ where \(g\) is the acceleration due to gravity \(\left(-9.81 \mathrm{~m} / \mathrm{s}^{2}\right), h\) is the height above the surface of the Earth (assuming no air friction), and \(v\) is the vertical component of velocity. Write a MATLAB program that prompts a user for the initial height of the ball in meters and velocity of the ball in meters per second, and plots the height and velocity as a function of time. Be sure to include proper labels in your plots.

See all solutions

Recommended explanations on Psychology Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free