[Maxima] question batch and plot
Stavros Macrakis
macrakis at alum.mit.edu
Tue May 30 16:54:50 CDT 2006
------=_Part_15271_11561460.1149026090624
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Christian,
Welcome to Maxima!
test():=
> block([x,y],
> eq1:x^2+3*x+1,
> solve(eq1,x),
> plot2d(eq1,[x,0,3]),
> );
A block returns the *last* value. In this case, that would be the return
value of the "plot2d" functions, which is not very interesting. To return
the list of solutions, try:
test():=
> block([x,y],
> eq1:x^2+3*x+1,
> sols: solve(eq1,x),
> plot2d(eq1,[x,0,3]),
> sols );
------=_Part_15271_11561460.1149026090624
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Christian,<br><br>Welcome to Maxima!<br><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">test():=<br>block([x,y],<br>eq1:x^2+3*x+1,<br>
solve(eq1,x),<br>plot2d(eq1,[x,0,3]),<br>);</blockquote><div><br>A block returns the *last* value. In this case, that would be the return value of the "plot2d" functions, which is not very interesting. To return the list of solutions, try:
<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">test():=<br>block([x,y],<br>eq1:x^2+3*x+1,<br>sols: solve(eq1,x),<br>plot2d(eq1,[x,0,3]),
<br>sols );</blockquote><br>
<br></div></div>
------=_Part_15271_11561460.1149026090624--
More information about the Maxima
mailing list