Cody

Problem 45397. Assess the scatter of wind turbines in a field

Solution 2766463

Submitted on 1 Aug 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
assert(isequal(assess_windfarm([5 6 6 6 6 3 5 1]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test1 (line 1) assert(isequal(assess_windfarm([5 6 6 6 6 3 5 1]),3))

2   Fail
assert(isequal(assess_windfarm([1 8 3 5 8 2 2 3]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test2 (line 1) assert(isequal(assess_windfarm([1 8 3 5 8 2 2 3]),5))

3   Fail
assert(isequal(assess_windfarm([8 4 3 2 4 3 2 4]),2))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test3 (line 1) assert(isequal(assess_windfarm([8 4 3 2 4 3 2 4]),2))

4   Fail
assert(isequal(assess_windfarm([1 5 1 5 7 2 4 5]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test4 (line 1) assert(isequal(assess_windfarm([1 5 1 5 7 2 4 5]),6))

5   Fail
assert(isequal(assess_windfarm([1 4 6 2 7 8 7 5]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test5 (line 1) assert(isequal(assess_windfarm([1 4 6 2 7 8 7 5]),5))

6   Fail
assert(isequal(assess_windfarm([3 6 2 8 5 5 2 1]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test6 (line 1) assert(isequal(assess_windfarm([3 6 2 8 5 5 2 1]),4))

7   Fail
assert(isequal(assess_windfarm([3 7 8 6 6 2 5 7]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test7 (line 1) assert(isequal(assess_windfarm([3 7 8 6 6 2 5 7]),4))

8   Fail
assert(isequal(assess_windfarm([4 8 1 3 5 1 6 5]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test8 (line 1) assert(isequal(assess_windfarm([4 8 1 3 5 1 6 5]),6))

9   Fail
assert(isequal(assess_windfarm([5 7 7 7 3 4 7 1]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test9 (line 1) assert(isequal(assess_windfarm([5 7 7 7 3 4 7 1]),3))

10   Fail
assert(isequal(assess_windfarm([1 3 5 8 6 3 3 7]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test10 (line 1) assert(isequal(assess_windfarm([1 3 5 8 6 3 3 7]),6))

11   Fail
assert(isequal(assess_windfarm([8 6 3 1 7 5 8 1]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test11 (line 1) assert(isequal(assess_windfarm([8 6 3 1 7 5 8 1]),8))

12   Fail
assert(isequal(assess_windfarm([5 3 7 2 4 4 7 6]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test12 (line 1) assert(isequal(assess_windfarm([5 3 7 2 4 4 7 6]),4))

13   Fail
assert(isequal(assess_windfarm([2 3 2 6 5 2 2 4]),1))

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test13 (line 1) assert(isequal(assess_windfarm([2 3 2 6 5 2 2 4]),1))

14   Fail
assert(isequal(assess_windfarm([8 5 1 1 7 4 4 7]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test14 (line 1) assert(isequal(assess_windfarm([8 5 1 1 7 4 4 7]),4))

15   Fail
assert(isequal(assess_windfarm([3 5 6 7 3 6 8 1]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test15 (line 1) assert(isequal(assess_windfarm([3 5 6 7 3 6 8 1]),5))

16   Fail
assert(isequal(assess_windfarm([5 4 3 3 7 8 2 7]),2))

y = 1

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test16 (line 1) assert(isequal(assess_windfarm([5 4 3 3 7 8 2 7]),2))

17   Fail
assert(isequal(assess_windfarm([2 8 7 4 6 4 7 3]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test17 (line 1) assert(isequal(assess_windfarm([2 8 7 4 6 4 7 3]),6))

18   Fail
assert(isequal(assess_windfarm([1 5 8 2 4 6 1 8]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test18 (line 1) assert(isequal(assess_windfarm([1 5 8 2 4 6 1 8]),8))

19   Fail
assert(isequal(assess_windfarm([7 5 2 4 5 8 7 8]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test19 (line 1) assert(isequal(assess_windfarm([7 5 2 4 5 8 7 8]),3))

20   Fail
assert(isequal(assess_windfarm([6 4 8 4 2 4 6 5]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test20 (line 1) assert(isequal(assess_windfarm([6 4 8 4 2 4 6 5]),6))

21   Fail
assert(isequal(assess_windfarm([7 8 8 5 8 1 1 3]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test21 (line 1) assert(isequal(assess_windfarm([7 8 8 5 8 1 1 3]),3))

22   Fail
assert(isequal(assess_windfarm([5 5 8 5 4 5 6 1]),2))

y = 1

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test22 (line 1) assert(isequal(assess_windfarm([5 5 8 5 4 5 6 1]),2))

23   Fail
assert(isequal(assess_windfarm([7 2 4 3 3 6 2 3]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test23 (line 1) assert(isequal(assess_windfarm([7 2 4 3 3 6 2 3]),3))

24   Fail
assert(isequal(assess_windfarm([2 2 3 8 4 4 2 8]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test24 (line 1) assert(isequal(assess_windfarm([2 2 3 8 4 4 2 8]),3))

25   Fail
assert(isequal(assess_windfarm([4 7 5 4 8 7 4 7]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test25 (line 1) assert(isequal(assess_windfarm([4 7 5 4 8 7 4 7]),4))

26   Fail
assert(isequal(assess_windfarm([8 4 3 5 8 6 4 6]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test26 (line 1) assert(isequal(assess_windfarm([8 4 3 5 8 6 4 6]),6))

27   Fail
assert(isequal(assess_windfarm([8 5 5 3 1 2 1 4]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test27 (line 1) assert(isequal(assess_windfarm([8 5 5 3 1 2 1 4]),3))

28   Fail
assert(isequal(assess_windfarm([1 8 6 1 1 2 4 2]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test28 (line 1) assert(isequal(assess_windfarm([1 8 6 1 1 2 4 2]),5))

29   Fail
assert(isequal(assess_windfarm([1 6 3 7 4 4 1 1]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test29 (line 1) assert(isequal(assess_windfarm([1 6 3 7 4 4 1 1]),4))

30   Fail
assert(isequal(assess_windfarm([1 5 2 7 7 8 4 2]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test30 (line 1) assert(isequal(assess_windfarm([1 5 2 7 7 8 4 2]),5))

31   Fail
assert(isequal(assess_windfarm([2 5 7 3 4 6 8 2]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test31 (line 1) assert(isequal(assess_windfarm([2 5 7 3 4 6 8 2]),6))

32   Fail
assert(isequal(assess_windfarm([6 5 4 8 4 2 6 5]),3))

y = 1 y = 2 y = 3

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test32 (line 1) assert(isequal(assess_windfarm([6 5 4 8 4 2 6 5]),3))

33   Fail
assert(isequal(assess_windfarm([3 7 8 8 2 2 1 5]),2))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test33 (line 1) assert(isequal(assess_windfarm([3 7 8 8 2 2 1 5]),2))

34   Fail
assert(isequal(assess_windfarm([1 4 8 5 3 2 4 8]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test34 (line 1) assert(isequal(assess_windfarm([1 4 8 5 3 2 4 8]),6))

35   Fail
assert(isequal(assess_windfarm([1 4 7 1 6 8 3 2]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test35 (line 1) assert(isequal(assess_windfarm([1 4 7 1 6 8 3 2]),6))

36   Fail
assert(isequal(assess_windfarm([6 8 5 8 2 7 3 4]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test36 (line 1) assert(isequal(assess_windfarm([6 8 5 8 2 7 3 4]),6))

37   Fail
assert(isequal(assess_windfarm([2 7 5 6 7 1 8 4]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test37 (line 1) assert(isequal(assess_windfarm([2 7 5 6 7 1 8 4]),5))

38   Fail
assert(isequal(assess_windfarm([7 6 7 2 4 5 8 7]),1))

y = 1

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test38 (line 1) assert(isequal(assess_windfarm([7 6 7 2 4 5 8 7]),1))

39   Fail
assert(isequal(assess_windfarm([8 5 5 7 1 8 4 1]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test39 (line 1) assert(isequal(assess_windfarm([8 5 5 7 1 8 4 1]),6))

40   Fail
assert(isequal(assess_windfarm([6 2 2 5 3 3 4 4]),2))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test40 (line 1) assert(isequal(assess_windfarm([6 2 2 5 3 3 4 4]),2))

41   Fail
assert(isequal(assess_windfarm([4 5 2 2 1 3 7 2]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test41 (line 1) assert(isequal(assess_windfarm([4 5 2 2 1 3 7 2]),3))

42   Fail
assert(isequal(assess_windfarm([6 6 7 7 3 3 5 3]),2))

y = 1

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test42 (line 1) assert(isequal(assess_windfarm([6 6 7 7 3 3 5 3]),2))

43   Fail
assert(isequal(assess_windfarm([7 7 5 3 6 2 4 4]),4))

y = 1 y = 2 y = 3 y = 4

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test43 (line 1) assert(isequal(assess_windfarm([7 7 5 3 6 2 4 4]),4))

44   Fail
assert(isequal(assess_windfarm([5 8 7 8 2 5 1 7]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test44 (line 1) assert(isequal(assess_windfarm([5 8 7 8 2 5 1 7]),5))

45   Fail
assert(isequal(assess_windfarm([5 7 8 8 4 1 5 2]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test45 (line 1) assert(isequal(assess_windfarm([5 7 8 8 4 1 5 2]),5))

46   Fail
assert(isequal(assess_windfarm([2 3 1 6 6 5 3 7]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test46 (line 1) assert(isequal(assess_windfarm([2 3 1 6 6 5 3 7]),3))

47   Fail
assert(isequal(assess_windfarm([5 8 8 3 5 3 5 7]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test47 (line 1) assert(isequal(assess_windfarm([5 8 8 3 5 3 5 7]),6))

48   Fail
assert(isequal(assess_windfarm([6 2 7 1 4 6 7 3]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test48 (line 1) assert(isequal(assess_windfarm([6 2 7 1 4 6 7 3]),6))

49   Fail
assert(isequal(assess_windfarm([6 8 2 2 2 3 3 8]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test49 (line 1) assert(isequal(assess_windfarm([6 8 2 2 2 3 3 8]),3))

50   Fail
assert(isequal(assess_windfarm([1 5 2 7 2 5 8 3]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test50 (line 1) assert(isequal(assess_windfarm([1 5 2 7 2 5 8 3]),8))

51   Fail
assert(isequal(assess_windfarm([1 2 4 3 2 8 6 8]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test51 (line 1) assert(isequal(assess_windfarm([1 2 4 3 2 8 6 8]),3))

52   Fail
assert(isequal(assess_windfarm([4 8 1 5 7 2 8 7]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test52 (line 1) assert(isequal(assess_windfarm([4 8 1 5 7 2 8 7]),6))

53   Fail
assert(isequal(assess_windfarm([7 5 7 3 2 3 5 7]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test53 (line 1) assert(isequal(assess_windfarm([7 5 7 3 2 3 5 7]),5))

54   Fail
assert(isequal(assess_windfarm([3 4 7 5 8 2 7 6]),4))

y = 1 y = 2 y = 3 y = 4

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test54 (line 1) assert(isequal(assess_windfarm([3 4 7 5 8 2 7 6]),4))

55   Fail
assert(isequal(assess_windfarm([2 4 4 5 7 1 7 7]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test55 (line 1) assert(isequal(assess_windfarm([2 4 4 5 7 1 7 7]),3))

56   Fail
assert(isequal(assess_windfarm([3 4 5 6 6 7 4 4]),0))

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test56 (line 1) assert(isequal(assess_windfarm([3 4 5 6 6 7 4 4]),0))

57   Fail
assert(isequal(assess_windfarm([8 5 7 3 5 5 8 1]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test57 (line 1) assert(isequal(assess_windfarm([8 5 7 3 5 5 8 1]),6))

58   Fail
assert(isequal(assess_windfarm([5 5 1 8 8 4 7 2]),4))

y = 1 y = 2 y = 3

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test58 (line 1) assert(isequal(assess_windfarm([5 5 1 8 8 4 7 2]),4))

59   Fail
assert(isequal(assess_windfarm([5 3 4 7 2 3 4 3]),2))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test59 (line 1) assert(isequal(assess_windfarm([5 3 4 7 2 3 4 3]),2))

60   Fail
assert(isequal(assess_windfarm([7 8 2 2 6 4 8 8]),2))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test60 (line 1) assert(isequal(assess_windfarm([7 8 2 2 6 4 8 8]),2))

61   Fail
assert(isequal(assess_windfarm([6 7 4 6 8 5 8 6]),6))

y = 1 y = 2 y = 3 y = 4 y = 5

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test61 (line 1) assert(isequal(assess_windfarm([6 7 4 6 8 5 8 6]),6))

62   Fail
assert(isequal(assess_windfarm([4 6 8 2 4 8 4 6]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test62 (line 1) assert(isequal(assess_windfarm([4 6 8 2 4 8 4 6]),8))

63   Fail
assert(isequal(assess_windfarm([8 8 6 1 1 5 5 8]),2))

y = 1

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test63 (line 1) assert(isequal(assess_windfarm([8 8 6 1 1 5 5 8]),2))

64   Fail
assert(isequal(assess_windfarm([6 6 5 3 8 5 1 6]),5))

y = 1 y = 2 y = 3 y = 4

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test64 (line 1) assert(isequal(assess_windfarm([6 6 5 3 8 5 1 6]),5))

65   Fail
assert(isequal(assess_windfarm([5 1 8 3 2 1 3 2]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test65 (line 1) assert(isequal(assess_windfarm([5 1 8 3 2 1 3 2]),3))

66   Fail
assert(isequal(assess_windfarm([6 1 3 3 8 4 7 5]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test66 (line 1) assert(isequal(assess_windfarm([6 1 3 3 8 4 7 5]),6))

67   Fail
assert(isequal(assess_windfarm([7 1 8 7 1 4 3 6]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test67 (line 1) assert(isequal(assess_windfarm([7 1 8 7 1 4 3 6]),4))

68   Fail
assert(isequal(assess_windfarm([2 5 5 5 4 1 5 4]),2))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test68 (line 1) assert(isequal(assess_windfarm([2 5 5 5 4 1 5 4]),2))

69   Fail
assert(isequal(assess_windfarm([1 4 4 5 7 6 7 1]),2))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test69 (line 1) assert(isequal(assess_windfarm([1 4 4 5 7 6 7 1]),2))

70   Fail
assert(isequal(assess_windfarm([2 4 8 7 4 3 1 6]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test70 (line 1) assert(isequal(assess_windfarm([2 4 8 7 4 3 1 6]),4))

71   Fail
assert(isequal(assess_windfarm([5 2 4 2 7 3 8 1]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test71 (line 1) assert(isequal(assess_windfarm([5 2 4 2 7 3 8 1]),8))

72   Fail
assert(isequal(assess_windfarm([7 6 5 6 6 1 8 1]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test72 (line 1) assert(isequal(assess_windfarm([7 6 5 6 6 1 8 1]),3))

73   Fail
assert(isequal(assess_windfarm([3 2 8 1 5 6 6 7]),2))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test73 (line 1) assert(isequal(assess_windfarm([3 2 8 1 5 6 6 7]),2))

74   Fail
assert(isequal(assess_windfarm([1 7 5 6 2 5 6 8]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test74 (line 1) assert(isequal(assess_windfarm([1 7 5 6 2 5 6 8]),4))

75   Fail
assert(isequal(assess_windfarm([4 1 1 6 7 6 3 8]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test75 (line 1) assert(isequal(assess_windfarm([4 1 1 6 7 6 3 8]),3))

76   Fail
assert(isequal(assess_windfarm([5 8 1 2 7 8 7 3]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test76 (line 1) assert(isequal(assess_windfarm([5 8 1 2 7 8 7 3]),3))

77   Fail
assert(isequal(assess_windfarm([2 7 7 3 2 3 7 7]),1))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test77 (line 1) assert(isequal(assess_windfarm([2 7 7 3 2 3 7 7]),1))

78   Fail
assert(isequal(assess_windfarm([5 5 3 6 7 4 4 4]),1))

y = 1

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test78 (line 1) assert(isequal(assess_windfarm([5 5 3 6 7 4 4 4]),1))

79   Fail
assert(isequal(assess_windfarm([3 6 8 8 6 3 6 2]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test79 (line 1) assert(isequal(assess_windfarm([3 6 8 8 6 3 6 2]),6))

80   Fail
assert(isequal(assess_windfarm([1 2 2 5 1 7 6 8]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test80 (line 1) assert(isequal(assess_windfarm([1 2 2 5 1 7 6 8]),3))

81   Fail
assert(isequal(assess_windfarm([4 6 8 5 3 8 1 3]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test81 (line 1) assert(isequal(assess_windfarm([4 6 8 5 3 8 1 3]),8))

82   Fail
assert(isequal(assess_windfarm([8 3 3 1 8 2 3 8]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test82 (line 1) assert(isequal(assess_windfarm([8 3 3 1 8 2 3 8]),4))

83   Fail
assert(isequal(assess_windfarm([4 5 5 6 1 5 1 7]),4))

y = 1 y = 2 y = 3

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test83 (line 1) assert(isequal(assess_windfarm([4 5 5 6 1 5 1 7]),4))

84   Fail
assert(isequal(assess_windfarm([3 7 2 5 8 1 1 1]),5))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test84 (line 1) assert(isequal(assess_windfarm([3 7 2 5 8 1 1 1]),5))

85   Fail
assert(isequal(assess_windfarm([6 5 1 7 5 1 1 2]),3))

y = 1 y = 2 y = 3

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test85 (line 1) assert(isequal(assess_windfarm([6 5 1 7 5 1 1 2]),3))

86   Fail
assert(isequal(assess_windfarm([7 1 2 2 1 7 6 6]),1))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test86 (line 1) assert(isequal(assess_windfarm([7 1 2 2 1 7 6 6]),1))

87   Fail
assert(isequal(assess_windfarm([6 5 3 6 1 2 1 8]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test87 (line 1) assert(isequal(assess_windfarm([6 5 3 6 1 2 1 8]),3))

88   Fail
assert(isequal(assess_windfarm([8 1 4 6 3 7 5 4]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test88 (line 1) assert(isequal(assess_windfarm([8 1 4 6 3 7 5 4]),6))

89   Fail
assert(isequal(assess_windfarm([3 7 8 6 4 8 3 5]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test89 (line 1) assert(isequal(assess_windfarm([3 7 8 6 4 8 3 5]),6))

90   Fail
assert(isequal(assess_windfarm([8 3 3 8 1 3 5 2]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test90 (line 1) assert(isequal(assess_windfarm([8 3 3 8 1 3 5 2]),6))

91   Fail
assert(isequal(assess_windfarm([6 7 5 6 7 2 5 1]),3))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test91 (line 1) assert(isequal(assess_windfarm([6 7 5 6 7 2 5 1]),3))

92   Fail
assert(isequal(assess_windfarm([5 7 8 4 3 6 8 5]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test92 (line 1) assert(isequal(assess_windfarm([5 7 8 4 3 6 8 5]),4))

93   Fail
assert(isequal(assess_windfarm([8 2 1 3 4 4 3 6]),2))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test93 (line 1) assert(isequal(assess_windfarm([8 2 1 3 4 4 3 6]),2))

94   Fail
assert(isequal(assess_windfarm([1 4 3 3 1 5 3 2]),3))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test94 (line 1) assert(isequal(assess_windfarm([1 4 3 3 1 5 3 2]),3))

95   Fail
assert(isequal(assess_windfarm([1 3 5 7 1 8 2 7]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test95 (line 1) assert(isequal(assess_windfarm([1 3 5 7 1 8 2 7]),8))

96   Fail
assert(isequal(assess_windfarm([7 8 2 5 4 2 5 5]),2))

y = 1 y = 2

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test96 (line 1) assert(isequal(assess_windfarm([7 8 2 5 4 2 5 5]),2))

97   Fail
assert(isequal(assess_windfarm([2 5 8 4 6 4 1 3]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test97 (line 1) assert(isequal(assess_windfarm([2 5 8 4 6 4 1 3]),8))

98   Fail
assert(isequal(assess_windfarm([7 3 1 5 3 6 5 7]),6))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test98 (line 1) assert(isequal(assess_windfarm([7 3 1 5 3 6 5 7]),6))

99   Fail
assert(isequal(assess_windfarm([7 2 1 7 6 1 8 5]),4))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test99 (line 1) assert(isequal(assess_windfarm([7 2 1 7 6 1 8 5]),4))

100   Fail
assert(isequal(assess_windfarm([5 5 7 7 4 1 6 3]),4))

y = 1 y = 2 y = 3

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test100 (line 1) assert(isequal(assess_windfarm([5 5 7 7 4 1 6 3]),4))

101   Fail
assert(isequal(assess_windfarm([1 1 1 1 1 1 1 1]),0))

Index exceeds the number of array elements (8). Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test101 (line 1) assert(isequal(assess_windfarm([1 1 1 1 1 1 1 1]),0))

102   Fail
assert(isequal(assess_windfarm([1 8 1 3 1 5 1 8]),8))

Array indices must be positive integers or logical values. Error in assess_windfarm (line 4) if POS(ii) == POS(ii+1)||POS(ii) == POS(ii+1)-1||POS(ii) == POS(ii+1)+1||POS(ii) == POS(ii-1)||POS(ii) == POS(ii-1)-1||POS(ii) == POS(ii-1)+1 Error in Test102 (line 1) assert(isequal(assess_windfarm([1 8 1 3 1 5 1 8]),8))