After execute the following MATLAB loop: g = [92, 45, 90, 80…
After execute the following MATLAB loop: g = [92, 45, 90, 80, 94, 75]; count=0 sum = 0; for k = 1:length(g) if g(k) >= 90 count = count + 1; sum = sum + g(k); end end a = sum/count; What is the value of sum? [ans1] What is the value of a? [ans2]
Read DetailsAt the command line, if we type b = 3; a = 4; [r, s] = calcu…
At the command line, if we type b = 3; a = 4; [r, s] = calculation(b,a); using the function file function [p q] = calculation(a, b) % compute a math formula p = a*b; q = a+p/b; the value(s) in r will be [ans1] the value(s) in s will be [ans2] The variables a and b are [ans3] variables. (Choose from the following: local; global)
Read Details