Engineering
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

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, redrosesxx
Water at 55c flows across a flat plate whose surface temperature is held constant at 95c. if the temperature gradient at the plate's surface for a given value of x is 18 c/mm, find a) local heat transfer coefficient. b) heat flux
Answers: 3
image
Engineering, 04.07.2019 18:10, genyjoannerubiera
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
image
Engineering, 04.07.2019 18:10, oshawn108
Ahot wire operates at a temperature of 200°c while the air temperature is 20°c. the hot wire element is a tungsten wire of 5 um diameter and 2 mm in length. plot using excel current, heat transfer and heat generated by the wire for air velocity varying from 1-10 m/s in steps of lm/s? matlab the sensor voltage output, resistance, or assume nu 0.989 re033pr13 take air properties at tr (200°c20°c)/2 = 110°c properties of tungsten: c 0.13 kj/kg. k 3 p 19250 kg/m k (thermal conductivity) = 174 w/m. k
Answers: 2
image
Engineering, 04.07.2019 19:10, kimmy6973
What is creep? what is stress relaxation?
Answers: 1
Do you know the correct answer?
In this this problem you will be using for loops to take a matrix of random number and create a new...

Questions in other subjects:

Konu
Mathematics, 20.09.2020 02:01
Konu
History, 20.09.2020 02:01
Konu
Mathematics, 20.09.2020 02:01