syahirah rahimi

15 Reputation

One Badge

0 years, 281 days

MaplePrimes Activity


These are questions asked by syahirah rahimi

I desire to find the summation value of errors from EA1 to EA19. After finding the summation, i want to find the average error. Can any of experts show how the maple should be done?

restart

ERROR COMPARISON

 

n := [84, 83, 83, 81, 85, 86, 86, 83, 82, 83, 84, 83, 81, 80, 83, 79, 82, 81, 85]

[84, 83, 83, 81, 85, 86, 86, 83, 82, 83, 84, 83, 81, 80, 83, 79, 82, 81, 85]

(1)

nops(n)

19

(2)
• 

-BBDF*FORMULA*FORWARD+PC

A := [90.3333, 85.3636, 80.1313, 81.4518, 78.9241, 90.2078, 89.8305, 85.9949, 78.7198, 79.8495, 84.3264, 86.2465, 82.7222, 78.1001, 77.8260, 86.7687, 77.2371, 85.2345, 81.7439]

[90.3333, 85.3636, 80.1313, 81.4518, 78.9241, 90.2078, 89.8305, 85.9949, 78.7198, 79.8495, 84.3264, 86.2465, 82.7222, 78.1001, 77.8260, 86.7687, 77.2371, 85.2345, 81.7439]

(3)

``

nops(A)

19

(4)

NULL

for i to 19 do EA[i] := abs(A[i]-n[i]) end do

6.3333

 

2.3636

 

2.8687

 

.4518

 

6.0759

 

4.2078

 

3.8305

 

2.9949

 

3.2802

 

3.1505

 

.3264

 

3.2465

 

1.7222

 

1.8999

 

5.1740

 

7.7687

 

4.7629

 

4.2345

 

3.2561

(5)

``

 

NULL

``

(6)

Download error_pc-bbdf_forward_formula.mw

 i’ve run the coding. The result is almost my expectation. However, why is the previous value not be substituted into the next one? As example, f4 should be submitted into f5 to evaluate its value

restart:

m := [80, 79, 83, 92, 74, 80, 87, 77, 103, 84, 87, 77, 88, 86, 83, 80, 79, 80, 93, 68, 106, 76, 103]

[80, 79, 83, 92, 74, 80, 87, 77, 103, 84, 87, 77, 88, 86, 83, 80, 79, 80, 93, 68, 106, 76, 103]

(1)

 

F := k -> `if`(
                k::even,
                2/3*m[k] + 2/3*f[k-1] - 1/3*f[k-2],
                2/11*f[k-3] - 9/11*f[k-2] + 12/11*f[k-1] + 6/11*m[k]
                ):


f[2] := m[2];
f[3] := m[3];
for i from 4 to 23 do
  F(i):
end do;

79

 

83

 

271/3

 

-145/11+(12/11)*f[4]

 

160/3+(2/3)*f[5]-(1/3)*f[4]

 

(2/11)*f[4]-(9/11)*f[5]+(12/11)*f[6]+522/11

 

154/3+(2/3)*f[7]-(1/3)*f[6]

 

(2/11)*f[6]-(9/11)*f[7]+(12/11)*f[8]+618/11

 

56+(2/3)*f[9]-(1/3)*f[8]

 

(2/11)*f[8]-(9/11)*f[9]+(12/11)*f[10]+522/11

 

154/3+(2/3)*f[11]-(1/3)*f[10]

 

(2/11)*f[10]-(9/11)*f[11]+(12/11)*f[12]+48

 

172/3+(2/3)*f[13]-(1/3)*f[12]

 

(2/11)*f[12]-(9/11)*f[13]+(12/11)*f[14]+498/11

 

160/3+(2/3)*f[15]-(1/3)*f[14]

 

(2/11)*f[14]-(9/11)*f[15]+(12/11)*f[16]+474/11

 

160/3+(2/3)*f[17]-(1/3)*f[16]

 

(2/11)*f[16]-(9/11)*f[17]+(12/11)*f[18]+558/11

 

136/3+(2/3)*f[19]-(1/3)*f[18]

 

(2/11)*f[18]-(9/11)*f[19]+(12/11)*f[20]+636/11

 

152/3+(2/3)*f[21]-(1/3)*f[20]

 

(2/11)*f[20]-(9/11)*f[21]+(12/11)*f[22]+618/11

(2)

 

Download bbdf.mw


there’s few redundant values. I just want the positive values. How it can be done?

restart

NULL

n := [80, 79, 83, 84, 83, 83, 81, 85, 86, 86, 83, 82, 83, 84, 81, 80, 83, 79, 82, 81, 85]

[80, 79, 83, 84, 83, 83, 81, 85, 86, 86, 83, 82, 83, 84, 81, 80, 83, 79, 82, 81, 85]

(1)

``

nops(n)

21

(2)

for i from 3 to 17 do f[i] := n[i-2]-3*n[i-1]+3*n[i]; i = i+1; f[i+1] := n[i-2]+4*n[i-1]-6*n[i]+n[i+1] end do

92

 

3 = 4

 

-18

 

82

 

4 = 5

 

-10

 

80

 

5 = 6

 

4

 

84

 

6 = 7

 

-1

 

77

 

7 = 8

 

14

 

95

 

8 = 9

 

-17

 

84

 

9 = 10

 

-9

 

85

 

10 = 11

 

-4

 

77

 

11 = 12

 

14

 

83

 

12 = 13

 

9

 

86

 

13 = 14

 

-3

 

85

 

14 = 15

 

-9

 

74

 

15 = 16

 

13

 

81

 

16 = 17

 

11

 

90

 

17 = 18

 

-18

(3)

``

NULL


 

Download fyp_2.mw

why the output wont appear eventhough I think the working is right?

Page 1 of 1