Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions