D = 'Company Name: MathWorks';s = struct('f1', A, 'f2', B, 'f3', C, 'f4', D);for m=1:6
for n=1:5
s(m,n)=s(1,1);
end
endCalculate the amount of memory required for the structure itself, and then for the data it
contains:structure = fields x ((60 x array elements) + 64) =
4 x ((60 x 30) + 64) = 7,456 bytesdata = (field1 + field2 + field3 + field4) x array elements =
(240 + 2000 + 1800 + 54) x 30 = 122,820 bytesAdd the two, and then compare your result with the size returned by MATLAB:Total bytes calculated for structure s: 7,456 + 122,820 = 130,276whos s
Name Size Bytes Class Attributess 6x5 130036 struct29 Memory Usage