Cody

Problem 895. Generate N equally spaced intervals between -L and L

Solution 3376983

Submitted on 25 Oct 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
y = your_fcn_name(100,100); assert( y(1) == -100 && y(end) == 100 && mean(diff(y))== 2 && std(diff(y)) == 0 );

y = -100 1

Assertion failed.

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

y = -100

Assertion failed.

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

y = Columns 1 through 30 -100 -97 -94 -91 -88 -85 -82 -79 -76 -73 -70 -67 -64 -61 -58 -55 -52 -49 -46 -43 -40 -37 -34 -31 -28 -25 -22 -19 -16 -13 Columns 31 through 60 -10 -7 -4 -1 2 5 8 11 14 17 20 23 26 29 32 35 38 41 44 47 50 53 56 59 62 65 68 71 74 77 Columns 61 through 67 80 83 86 89 92 95 98

Assertion failed.

Suggested Problems

More from this Author56

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!