Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

can i please get some guidance and coding in matlab for this question. PART 1- 3

ID: 3748285 • Letter: C

Question

can i please get some guidance and coding in matlab for this question.

PART 1- 3-D and 4-D numerical arrays Create two multi-dimensional arrays where the array values correspond to the multiplication of the indices: Create an 8 x 8 x 8 numerical array (3-D) and . These arrays are similar to the multiplication table in Lecture 4 (slide 13), but are 3-D & 4-D instead of 2-D. Make sure that you use piece-wise multiplication, and not matrix multiplication. Fill the values in the matrices using Triple- and Quadruple- nested for loops. Once you have filled the arrays, demonstrate how you would display only page 7 of the 3D array to the screen. Also show all values that occur in the 4D matrix at the locations row-3 and column-4 of each page.

Explanation / Answer

clear all
close all
clc
a=zeros(8,8,8)
for i=1:8
for j=1:8
for k=1:8
a(i,j,k)=i*j*k;
end
end
end
a(;,;,7) %acceessing7th page
b=zeros(5,5,5,5)
for i=1:5
for j=1:5
for k=1:5
for p=1:5
b(i,j,k,p)=i*j*k*p;
end
end
end
end
b(3,4,;,;)% accessing 3rd row and 4th column

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote