CAS sequence with take

hawe shared this question 2 months ago
Needs Answer

Topic is Multiple lineare Regression Activity File: https://www.geogebra.org/ma... I have a Matrix DATA to make a Function Y_a:=(x_4 * a_4) + (x_3 * a_3) + (x_2 * a_2) + (x_1 * a_1) + a_0 and find {a_4, a_3, a_2, a_1, a_0}, e.g. Y_x:=((-0.236) * x_1) + (3 * x_2) + (12.1 * x_3) + (0.0171 * x_4) + 78.7 To find the absolute Error I want to substitute x_i with DATA: Making subst pattern Sequence(Element(X_x,k) = Element(Flatten(Take(DATA, 1, 1)),k),k,1,n - 1) >{x_4 = 2310, x_3 = 2, x_2 = 2, x_1 = 20} OK, but if I put this in a sequence Sequence( Sequence(Element(X_x,k) = Element(Flatten(Take(DATA, j, j)),k),k,1,n - 1) , j , 1 , m) > Sorry, something went wrong... Why cant indexing take(DATA, j ,j)? I found a workaround, but shouldnt run this example? see file for trys (sorry, all linefeeds are ignored)

© 2019 International GeoGebra Institute