Menu

(Solved) : 6 Following Codes One Matlab Script Write Output U 3 2 8 1 7 Myfun2 U Function P Myfun2 X Q44002119 . . .

(6) The following codes are in one Matlab script, write the output for a. u = (3, 2, 8, 1, 7); a = myfun2(u) function p = myf

a matlab program

(6) The following codes are in one Matlab script, write the output for a. u = (3, 2, 8, 1, 7); a = myfun2(u) function p = myfun2(x) for i=1: length(x) y(i) = x(i) * 2: end p = myfunl(y); end function xsmall = myfunl(x) xsmall = x(x <= 5); end Show transcribed image text (6) The following codes are in one Matlab script, write the output for a. u = (3, 2, 8, 1, 7); a = myfun2(u) function p = myfun2(x) for i=1: length(x) y(i) = x(i) * 2: end p = myfunl(y); end function xsmall = myfunl(x) xsmall = x(x

Expert Answer


Answer to (6) The following codes are in one Matlab script, write the output for a. u = (3, 2, 8, 1, 7); a = myfun2(u) function p …

OR