Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Correct

124Size
Leading solution size is 8.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
y_correct = 1;
assert(isequal(your_fcn_name,y_correct))

                    
2
Pass
 
%%
y_correct = 1:100;
assert(isequal(your_fcn_name,y_correct))
s =
mt19937ar random stream
             Seed: 5489
  NormalTransform: Ziggurat
{Warning: The RandStream.setDefaultStream static method will
be removed in a future release.  Use
RandStream.setGlobalStream instead.}
{> In RandStream.RandStream>RandStream.setDefaultStream at 456
  In your_fcn_name at 14
  In verifyCode>evaluateCode at 189
  In verifyCode at 37
  In fevalJSON at 14}
3
Pass
 
%%
y_correct = rand(100);
assert(isequal(your_fcn_name,y_correct))
s =
mt19937ar random stream
             Seed: 5489
  NormalTransform: Ziggurat
{Warning: The RandStream.setDefaultStream static method will
be removed in a future release.  Use
RandStream.setGlobalStream instead.}
{> In RandStream.RandStream>RandStream.setDefaultStream at 456
  In your_fcn_name at 18
  In verifyCode>evaluateCode at 189
  In verifyCode at 37
  In fevalJSON at 14}
s =
mt19937ar random stream
             Seed: 5489
  NormalTransform: Ziggurat
{Warning: The RandStream.setDefaultStream static method will
be removed in a future release.  Use
RandStream.setGlobalStream instead.}
{> In RandStream.RandStream>RandStream.setDefaultStream at 456
  In your_fcn_name at 21
  In verifyCode>evaluateCode at 189
  In verifyCode at 37
  In fevalJSON at 14}
4
Pass
 
%%
y_correct = randi(100);
assert(isequal(your_fcn_name,y_correct))
s =
mt19937ar random stream
             Seed: 5489
  NormalTransform: Ziggurat
{Warning: The RandStream.setDefaultStream static method will
be removed in a future release.  Use
RandStream.setGlobalStream instead.}
{> In RandStream.RandStream>RandStream.setDefaultStream at 456
  In your_fcn_name at 25
  In verifyCode>evaluateCode at 189
  In verifyCode at 37
  In fevalJSON at 14}
5
Pass
 
%%
y_correct = 'lol';
assert(isequal(your_fcn_name,y_correct))