Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,986 Was thanked: 1124 time(s) in 721 post(s)
|
Originally Posted by: hawe Originally Posted by: mkraska
Meanwhile I prepare a project to cubic splines in a very simple basic matter. I have generated the coefficients of the polynoms for(j,range(1,(rows(X)-1)),for(i,range(0,3),el(vars,(j-1)*4+i+1):str2num(concat("a",num2str(j),num2str(i))))) ==>mat(a10,a11,a12,a13,a20,a21,a22,a23,a30,a31,a32,a33,a40,a41,a42,a43,1,16) I build the lin Equ system and solve it in Maxima, it seems to me Assign doesn't do assignment. ... VAR should have the values of aij after Assign? BTW: I tried to simplify (ratsimp, expand) the cubic polynoms - Maximalog shows simplified functions, but Optimization nullifies it. After setting to none I get the true term from Maxima back - it took me a while to figure it out. 1. No need to wrap Maxima() around Solve(). Solve() is known to SMath Studio via the plugin, just as Assign. 2. You need to actually execute the Assign() call by requesting a result. Otherwise nothing will happen. You could also write Assign(Solve( ))= and you get solutions and assignments in a single cell. 3. It is always a good idea to switch off optimization for symbolic Maxima results. 4. Processing equation-shaped results using at() is absolutely ok. |
|