Question: Matlab Problem 2: Use nested for loops to perform the following exercises. Do not use function mean (a) Create the 3-D function: T(z, y, z)
Problem 2: Use nested for loops to perform the following exercises. Do not use function mean (a) Create the 3-D function: T(z, y, z) = 22+2y2+3z2 in a rectangular domain with x = by length(y) by length(z). Set p2 The answer should be a 2-D matrix with the dimension of length(x) by length(y) The answer should be a vector with the dimension of length(z) answer into p2d. The answer should be a single number 3:0, 1:3 ; y = 1:0. 1:1] and z = [-2:0.1:2 . Matrix T should have the dimension of length(x) (b) Compute the average values of T along the z-direction and put the answer into p2b. (c) Compute the average values of T over the x-y planes and put the answer into p2c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
