clc clear price_A = [19, 18, 22, 21, 25, 19, 17, 21, 27, 29] price_B = [22, 17, 20, 19, 24, 18, 16, 25, 28, 27] price_C = [17, 13, 22, 23, 19, 17, 20, 21, 24, 28] days_above_both = sum((price_A > price_B) & (price_A > price_C)); disp(days_above_both) days_above_either = sum((price_A > price_B) | (price_A > price_C)); disp(days_above_either) days_above_either_but_not_both = sum(xor(price_A > price_B, price_A > price_C)); disp(days_above_either_but_not_both)
To embed this project on your website, copy the following code and paste it into your website's HTML: