Question: Please_modify_loop_logic

I have spent much of my time earlier to make curve fitting possible. Somehow, because of my mistakes, the format for curve fitting changed. Can any one help me with getting my answer for curve fitting in the doc and from the excel data enclosed. Data imported, but donot know how to order the way it wants. I know the way,but do not iknow how to get it now.

Thanks

Ramakrishnan VExperimentalData.xlsxPleasePlot_Doubt.mw
 

restart; with(ExcelTools)

D6EFF := [20, 25, 23, 29]

[20, 25, 23, 29]

(1)

D6EFFP := evalf[3](CurveFitting:-LeastSquares(BP, D4EFF, v, curve = a*v^2+b*v+c))

58.8-19.8*v+2.75*v^2

(2)

 

M1 := Import("C:/Users/dell/Desktop/ExperimentalData.xlsx", 2)

Matrix(%id = 18446745680754394150)

(3)

M1[1, 11]

"D6P10U"

(4)

M1[1, 10]

"D6P5U"

(5)

M1[2, 15]

.267

(6)

NULL

for i to 21 do N[i] := NULL; for j to 7 do N[i] := N[i], M1[j, i] end do; d[i] := NULL; for j to 7 do d[i] := d[i], [N[1][j], N[i][j]] end do end do; y := a*x^2+b*x+c; for i from 2 to 21 do d[i] := [d[i]]; c[i] := CurveFitting[LeastSquares](d[i], x, curve = y) end do

Error, (in CurveFitting:-LeastSquares) data points not in recognizable format

 

d[1]

["BrakePower", "BrakePower"], [2.356, 2.356], [2.749, 2.749], [3.142, 3.142], [3.534, 3.534], [3.927, 3.927], [4.32, 4.32]

(7)

d[2]

[["BrakePower", "S2"], [2.356, .303], [2.749, .271], [3.142, .256], [3.534, .249], [3.927, .244], [4.32, .241]]

(8)

d[3]

["BrakePower", "S4"], [2.356, .256], [2.749, .225], [3.142, .211], [3.534, .205], [3.927, .2], [4.32, .197]

(9)

NULL

``


 

Download PleasePlot_Doubt.mw

 

Please Wait...