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

Solution 253464

Submitted on 3 Jun 2013 by G K

Correct

16Size
Leading solution size is 12.
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 = your_fcn_name(100,100);
assert( y(1) == -100 && y(end) == 100 && mean(diff(y))== 2 && std(diff(y)) == 0 );

                    
2
Pass
 
%%
y = your_fcn_name(200,100);
assert( y(1) == -100 && y(end) == 100 && mean(diff(y))== 1 && std(diff(y)) == 0 );

                    
3
Pass
 
%%
y = your_fcn_name(2,100);
assert( y(1) == -100 && y(end) == 100 && mean(diff(y))== 100 && std(diff(y)) == 0 );