subject
Engineering, 17.03.2020 23:20 saabrrinnaaa

In this this problem you will be using for loops to take a matrix of random number and create a new matrix that is the same as the random matrix, but with zeros on the diagonal. a) Create matrix m that is a 10x10 matrix of random whole numbers from 1 to 20. You will have to manipulate the random number generator function to modify the interval and get only whole numbers. b) Create a for loop that runs for index i equal to the index for every row in the matrix. Next, create a nested for loop that runs for index j equal to the index for every column in the matrix. This is very similar to the Your Turn - Extra slide of Lecture 13. c) Now, we want to use our for loops to create a new niatrix, n, that is equal to matrix m, but with zeros on the diagonal. You should use an if/else statement to create this new matrix. If the location is on the diagonal (i=j), then the value of matrix n at the location will be zero. Otherwise, the value of matrix n equals the value of matrix m at each location

ansver
Answers: 2

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
question
Engineering, 03.07.2019 23:20
Two technicians are discussing the intake air temperature (iat) sensor. technician a says that the computer uses the iat sensor as a backup to the engine coolant temperature (ect) sensor. technician b says that the powertrain control module (pcm) will subtract the calculated amount of fuel if the air measures hot. who is correct
Answers: 3
question
Engineering, 04.07.2019 18:10
Apump is used to circulate hot water in a home heating system. water enters the well-insulated pump operating at steady state at a rate of 0.42 gal/min. the inlet pressure and temperature are 14.7 lbf/in.2, and 180°f, respectively; at the exit the pressure is 60 lbf/in.2 the pump requires 1/15 hp of power input. water can be modeled as an incompressible substance with constant density of 60.58 lb/ft3 and constant specific heat of 1 btu/lb or. neglecting kinetic and potential energy effects, determine the temperature change, in °r, as the water flows through the pump.
Answers: 1
question
Engineering, 04.07.2019 18:10
A-mn has a cubic structure with a0 0.8931 nm and a density of 7.47 g/cm3. b-mn has a different cubic structure, with a0 0.6326 nm and a density of 7.26 g/cm3. the atomic weight of manganese is 54.938 g/mol and the atomic radius is 0.112 nm. determine the percent volume change that would occur if a-mn transforms to b-mn.
Answers: 2
You know the right answer?
In this this problem you will be using for loops to take a matrix of random number and create a new...
Questions
question
Mathematics, 07.05.2021 19:10
question
Chemistry, 07.05.2021 19:10
question
Mathematics, 07.05.2021 19:10
Questions on the website: 13722360