3

I can get maxima to solve an equation but can't figure out why it won't show it's numerical value without typing the extra command/step of float(%). Is there away to automatically convert a solved variable to a numerical format.

Example of equation below:

kill(all); 
alpha:float(.0014931); 
endfreq:50; dursec:1200;   
solve(alpha=log(startfreq/endfreq)/dursec,float(startfreq));

what comes back is

startfreq=50%e(44793/25000)

or

$\left[ {\it startfreq}=50\,e^{{{44793}\over{25000}}} \right] $

I would like it to say 299.988 instead

Adam
  • 1,776
Rick T
  • 497

2 Answers2

2

Wrap float() around the final expression:

kill(all); 
alpha:float(.0014931); 
endfreq:50; dursec:1200;   
float(solve(alpha=log(startfreq/endfreq)/dursec,float(startfreq)));
2

If you want numeric value set numer to true :

kill(all)$ 
numer:true$
ratprint: false$
alpha:0.0014931$ 
endfreq:50$ 
dursec:1200$ 
s:solve(alpha=log(startfreq/endfreq)/dursec,startfreq)$
s[1];

then output will be :

startfreq=299.988159465253

HTH

Adam
  • 1,776