Name (print) / SID
What value is assigned to ans in the code below. I have done the first two for you.
Write here / Write hereans = 1 < 10; / 1 / ans = 1 > 10; / 0
ans = 1 < 1; / ans = 1 <= 1;
ans = 1 < 1.5; / ans = 1 < round(1.5);
ans = 1 < min(1,999); / ans = 1 < min(1,inf);
1 <= min(1,inf); / ans = 1 < 2 + rand;
kermit = 5;
ans = kermit < 5 / kermit = 5;
ans = kermit <= 5
kermit = 11;
ans = kermitkermit / kermit = 55;
ans = kermit == kermit
kermit = 5;
ans = kermit ~= kermit / kermit = 5;
ans = kermit ~= kermit^2
kermit = 5;
piggy = 2;
ans = kermit == piggy / kermit = 5;
piggy = 2;
ans = kermit ~= piggy
kermit = 5;
piggy = 2;
ans = kermit <= piggy / kermit = 5;
piggy = 2;
ans = kermit >= piggy
kermit = 5;
piggy = 2;
ans = kermit+ piggy <= Inf / kermit = 25;
piggy = 21;
ans = kermit + piggy <= Inf
kermit = 59;
piggy = 27;
ans = kermit+ piggy <= 85 / kermit = 59;
piggy = 27;
ans = kermit+ piggy == 82
What of the following are Legal function names that we could make up and use, and which are Not? I have done the first two for you.
Write here / Write hereMyMaxOfSevenNumbers / L / At Swim two birds / N
AtSwimtwobirds / Sues Max of Seven
MyMaxOfSeven#s / _My_MaxOf_Seven
At_Swim_two_birds / 4x
Fork thine / MyMaxOfSevenNums
isAnOddNum? / if
Never^at / Never^@
MyMaxOf7Numbers / N_o_T
X4 / 4_x
Look at the following function I wrote: It does exactly what the build in function max does.
What value is assigned to ans in the code below. In some cases the answer may be “Error: Unexpected MATLAB expression.” I have done the first one for you.
Write here / Write hereans = EamonnMax(12,2) / 12 / ans = EamonnMax(2,2)
ans = EamonnMax(-12,-2) / ans = round( EamonnMax(2) )
ans = EamonnMax(2,3,4) / ans = EamonnMax(2,3,4,1)
kermit = 59;
piggy = 27;
ans = EamonnMax(kermit,piggy) / kermit = 9;
ans = EamonnMax(kermit,10)
kermit = 7;
piggy = EamonnMax(11,8)
ans = EamonnMax(kermit,piggy) / kermit = 17;
piggy = EamonnMax(-18, kermit)
ans = EamonnMax(kermit,piggy)
kermit = Inf;
piggy = EamonnMax(-Inf,8)
ans = EamonnMax(kermit,piggy) / kermit = round(7.1);
piggy = round(7.9);
ans = EamonnMax(kermit,piggy)
GOD = EamonnMax(123,321)
ans = EamonnMax(G O D,789) / fish = round(EamonnMax(1.2,0))
ans = EamonnMax(fish,0)
Look at the following function I wrote: It does something...
What value is assigned to ans in the code below. In some cases the answer may be “Error: Unexpected MATLAB expression.”
Write here / Write hereans = mist(113,2) / ans = mist(11,2)
ans = mist(10,2) / ans = mist(11,2)
ans = mist(10,2,17) / > blue = 12;
ans = mist(10,blue,2)
> blue = 12;
ans = mist(blue-8,7) / > blue = 12;
ans = mist(blue-8,blue)
> blue = 11;
ans = mist(blue+8,7) / > blue = 11;
ans = mist(blue+8,round(10.1))
ans = mist(10,7.6) / ans = round(mist(10,7.6))
> fish = 111; % Think carefully!
ans = mist(1,9) / > taco = 1; % Think carefully!
ans = mist(1,4)
> fowl = 121; % Think carefully!
ans = mist(7,1) / > fowl = 121;
ans = mist(fowl,fish,taco)