# [Maxima] plot of plsquares polynom

Jan Hendrik Müller jan.mueller at math.uni-dortmund.de
Tue Feb 7 09:23:07 CST 2012

```To whom may be interested, this works fine:

gl:plsquares(M,[x,y,z],z,2)\$
fpprintprec:4\$
float(gl);
draw3d(
xlabel  = "Entfernung",
ylabel  = "Gewicht",
zlabel  = "Transportkosten",
point_size=2,
color=black,
points(M),
grid=true,
explicit(rhs(gl), x,0,350, y,0,100));

Thanks to Robert and Mario (por los informationes sobre draw3d)
Jan

Robert Dodier schrieb:
> Looks like the return value of plsquares is an equation z = ....
> Try something like
>
> foo : plsquares (...);
> plot3d (rhs (foo), [x, ...], [y, ...]);
>
> HTH
>
> Robert Dodier
>
>
> On 2/1/12, Jan Hendrik Müller<jan.mueller at math.uni-dortmund.de>  wrote:
>> Hi all,
>> two questions:
>> - how can z be plotted? plsquares works fine but the plot doesn't work
>>
>> plsquares(matrix([1,2,0],[3,5,4],[4,7,9],[5,8,10],[1,3,4],[2,5,7],[1,6,9],[3,1,4],[1,1,1],[4,3,6],[6,7,8]),[x,y,z],z,3,3)\$
>>       plot3d(z, [x,0,9], [y,0,9]);
>> - the rows of the matrix (only as an example) have to be substituted by
>> the lines of the .txt file attached. Any idea how to realise that is welcome
>> Jan
>>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Transportkosten3.txt
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120207/f09a3b76/attachment.txt>
```