Question: matlab function [centroid] = find Centroid (subAreas, y_hat) A = 0; AreaMoment = 0; for i = 1 : length (subAreas) AreaMoment = AreaMoment +
function [centroid] = find Centroid (subAreas, y_hat) A = 0; AreaMoment = 0; for i = 1 : length (subAreas) AreaMoment = AreaMoment + subAreas (i) A = A + subAreas (1); end y_hat(i); centroid = AreaMoment / A; end What will be the output of the following script? Please explain in detail. % List of sub areas AA = [10, 5, 5); % List of centroid of sub areas y = [5, 3, -2); % Find the centroid entrd = find Centroid (AA, Y); disp (entrd)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
