Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Re: [Maxima-discuss] unable to plot result of variable assignment

 Re: [Maxima-discuss] unable to plot result of variable assignment From: Jaime Villate - 2014-06-04 12:30:08 ```On 04-06-2014 09:36, message wrote: > ve:(solve(va=vd,vx)); > [vx = 15] OK, the symbol ve is now associated to a list, with only one element and that element is the equation "vx=15" Notice that vx is still a symbol that has no value associated to it. Values are associated to symbols using the operator ":" and not with "=". > ve=(solve(va=vd,vx)); > [vx = 15] = [vx = 15] no, that makes no sense. > > What is the correct instruction to return a number result please (i.e. > %o... 15)? Since 15 is the right hand side of the equation "vx=15", which is the first element in the value associated to the symbol ve, you must use rhs(ve[1]). If you want to use it in the plot command you showed yesterday, type: plot2d (vf, [vx, 0, rhs ( ve[1]) ] ); you could also associate the result 15 to a symbol: symbol: rhs(ve[1]); and then use it when you need it: plot2d (vf, [vx, 0, symbol] ); Jaime ```

 Re: [Maxima-discuss] unable to plot result of variable assignment From: message - 2014-06-04 08:36:42 ```On 2014-06-03 15:40, maxima-discuss-request@... wrote: > > ------------------------------ > > Message: 2 > Date: Tue, 03 Jun 2014 10:27:47 +0000 > From: message > Subject: [Maxima-discuss] unable to plot result of variable assignment > > va:10; > vb:20; > vc:30; > vd:(vb*vx/vc); > /*or is it better to use the '=' operator? > vd=(vb*vx/vc);*/ > vd*vc/vb; > solve(va=vd,vx); > ve:(solve(va=vd,vx)); > > ------------------------------ > > Message: 3 > Date: Tue, 03 Jun 2014 12:40:51 +0200 > From: Gunter K?nigsmann > Subject: Re: [Maxima-discuss] unable to plot result of variable > assignment > > vf is fit for plotting. But ve is a assignment, not a number. > ve:(solve(va=vd,vx)); [vx = 15] ve=(solve(va=vd,vx)); [vx = 15] = [vx = 15] What is the correct instruction to return a number result please (i.e. %o... 15)? > The plot command should work if you replace ve by rhs(ve[1]): The > right-hand side of the first solution. > Agree, thanks. ```
 Re: [Maxima-discuss] unable to plot result of variable assignment From: Jaime Villate - 2014-06-04 12:30:08 ```On 04-06-2014 09:36, message wrote: > ve:(solve(va=vd,vx)); > [vx = 15] OK, the symbol ve is now associated to a list, with only one element and that element is the equation "vx=15" Notice that vx is still a symbol that has no value associated to it. Values are associated to symbols using the operator ":" and not with "=". > ve=(solve(va=vd,vx)); > [vx = 15] = [vx = 15] no, that makes no sense. > > What is the correct instruction to return a number result please (i.e. > %o... 15)? Since 15 is the right hand side of the equation "vx=15", which is the first element in the value associated to the symbol ve, you must use rhs(ve[1]). If you want to use it in the plot command you showed yesterday, type: plot2d (vf, [vx, 0, rhs ( ve[1]) ] ); you could also associate the result 15 to a symbol: symbol: rhs(ve[1]); and then use it when you need it: plot2d (vf, [vx, 0, symbol] ); Jaime ```