Answered step by step
Verified Expert Solution
Question
1 Approved Answer
matlab function: function [centroid] = find_Centroid(subAreas, y_hat) A=0; AreaMoment =0; for i=1 : length(subAreas) AreaMoment = AreaMoment+subAreas(i) * y_hat(i); A = A + subAreas (i);
matlab function:
function [centroid] = find_Centroid(subAreas, y_hat)
A=0;
AreaMoment =0;
for i=1 : length(subAreas)
AreaMoment = AreaMoment+subAreas(i) * y_hat(i);
A = A + subAreas (i);
end
centroid = AreaMoment / A;
end
what will be the output of the followint script?
%List of sub areas
AA=[10, 5, 5];
%List of centroid sub areas
y= [5, 3, -2];
%Find the centroid
cntrd= find_Centroid(AA, y);
disp(cntrd)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started