My apologies for causing confusion but I made a mistake in my original
post.
Here is what it should have been:
g:matrix([3/2,-1/2,-1],[-1/2,1/2+s,-s],[-1,-s,1+2*s]);
currents:matrix([1],[0],[0]);
u:invert(g).currents;
result:u[2]/u[1];
and now I get the expected result with ratsimp()
(%i82) ratsimp(result);
4 s + 1
(%o82) [--------------]
2
2 s + 4 s + 1
thanks for the help offered
hugo
On Thu, 29 Oct 2009, Stavros Macrakis wrote:
> I also get those warnings (which you can turn off by setting
> ratprint:false), but I get the result [1] in the end:
>
> (%i14) [(0.5*(s+1)+s)/((s+0.5)*(s+1)-s^2)];
> (%o14) [(0.5*(s+1)+s)/((s+0.5)*(s+1)-s^2)]
> (%i15) ratsimp(%);
> `rat' replaced 0.5 by 1/2 = 0.5
>
> `rat' replaced 0.5 by 1/2 = 0.5
> (%o15) [1]
>
> By the way, Maxima in general works better with exact numbers (1/2)
> rather than floats (0.5).
>
> ??????????? -s
>
> On Thu, Oct 29, 2009 at 12:48 PM, Hugo Coolens <coolens at kahosl.be> wrote:
> u:invert(g).currents;
> result:u[2]/u[1];
>
>
>
>