Locate the centroid y of the beam's cross-sectional area. Neglect the size of the corner welds at A and B for the calculation.

last resort, use else statement. Cannot put anything after the “else” expression or it won’t read it only “if” and “end” are needed the “elseif” and and “else” are not NEEDED >> %Day 7 MATLAB examples >> a=10;b=15;c=20; >> x=a**> y=a>c||b> %one means yes, zero means no >> z=a>c&&b> %these are 3 logical operators >> v=x&y v = 1 >> %if x is true and y is true, you should get a true for v as well >> %string compare syntax is "strcmp('Yes','No') >> %ex. s1='upon';s2={'Once','Upon','A','Time'};tf=strcmp(s1,s2) >> s1='upon';s2={'Once','Upon','A','Time'};tf=strcmp(s1,s2) tf = 0 0 0 0 >> %It's comparing each thing and saying yes this is true (1)**