clc clear %% Problem 1 B = 2; H = 4; Area = 2*4*.5; fprintf("The right-angled triangle has area = %.1f m^2.\n",Area); %% Problem 2 p = 1.225; r = 220/2; h = 248; A = r^2 * pi; V = [0:1:20]; na = .397; nm = .96; ne = .94; Pin = .5 * p * A .* V.^3; ** = na * nm * ne; PObservedOut = ** .* Pin; PTMOut = 0.593 .* Pin; Pdif = ((PTMOut - PObservedOut) ./ PObservedOut) .* 100; fprintf("At a wind velocity of 12 m/s the results for the Haliade-X turbine are as follows:\n"); fprintf("The output power generated is %.2f watts \n", PObservedOut(13)); fprintf("The theoretical maximum output power that can be generated according to Betz's law is %.2f watts\n",PTMOut(13)) fprintf("The percentage difference between the output power generated and the theoretical maximum output power is %.2f%%.\n", Pdif(13));