Ronan

1401 Reputation

16 Badges

14 years, 29 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are questions asked by Ronan

I have a example overloaded procdeure below. Due to '=' the optional input in the 2nd proc gets trapped in the 1st proc. I have tried various ways to get around this. Obviously I could make the  optional input in the 2nd proc non-optional if all else fails. Is there a way around this?

restart

Test:=overload([
proc(l1::{`+`,`*`,`=`, `symbol`,procedure,not(list)},
l2::{`+`,`*`,`=`, `symbol`,procedure,not(list)} ) #need to detect if 'point' is present

option overload;
if not(has([_params[2]],point)) then #if true need to go the next proc

print("1st proc ",l1," ",l2);
return
end if;
end proc,

proc(l1::{`+`,`*`,`=`, `symbol`,procedure,not(list)},
{point::list:=NULL}) #oprional input

print("2nd proc",l1,"point",point);

end proc
]):

 

l:=3*x+4*y-5;
h:=4*x-8*y = 5;
P:=[3,5]

3*x+4*y-5

 

4*x-8*y = 5

 

[3, 5]

(1)

Test(l,h)

 

"1st proc ", 3*x+4*y-5, " ", 4*x-8*y = 5

(2)

Test(l,point=P)

 

Test(h,point=[2,7])

 

 

Download 2026-02-28_Q_Test_proc_Line_point_inputs.mw

I am trying to set the default Cartesian and Parametric variables to set them golbally or locally in a command..

How do I achieve this? 

restart

interface(version)

`Standard Worksheet Interface, Maple 2026.0, Windows 10, March 05 2026 Build ID 2001916`

(1)

TM := module () local Cartvars, Parmvars; export Cartline, Parmline; global x, y, z;  Cartvars := [x, y, z]; Parmvars := [alpha, beta, rho]; Cartline := proc (p1::list, p2::list, { vars := Cartvars }) local l; global Cartvars; l := (p2[2]-p1[2])*vars[1]+(p1[1]-p2[1])*vars[2]-p2[2]*p1[1]+p1[2]*p2[1]; return l end proc; Parmline := proc (p1::list, p2::list, { varp := Parmvars }) local l; global Parmvars; l := `~`[`+`](p1, varp[1]*`<,>`(p2-p1)); return l end proc end module

TM:-Cartline([4, 3], [-8, 4])

Cartvars[1]+12*Cartvars[2]-40

(2)

TM:-Cartline([4, 3], [-8, 4], vars = [x, y])

x+12*y-40

(3)

NULL

TM:-Parmline([4, 3], [-8, 4])

Vector[column](%id = 36893490963638479436)

(4)

TM:-Parmline([4, 3], [-8, 4], varp = [alpha])

Vector[column](%id = 36893490963638469564)

(5)

NULL

Download 2026-03-26_Q_Module_Generic_Variables.mw

Does this symbol for equicalence exist in Maple ?  I can't find it in the pallets. 

If not is there a way of making it so I could add it to my favourites?

I am trying to check if a matrix quailfies as being skew-symmetric. So I added it to it's transpose to get a matrix of zeroes. 

How do I check it  equals the ZeroMatrix?

restart

NULL

M := Matrix(3, 3, {(1, 1) = 0, (1, 2) = (40*sqrt(7)+140)/(560+sqrt(7)), (1, 3) = (80*sqrt(7)+35)/(560+sqrt(7)), (2, 1) = (-40*sqrt(7)-140)/(560+sqrt(7)), (2, 2) = 0, (2, 3) = (280-32*sqrt(7))/(560+sqrt(7)), (3, 1) = (-80*sqrt(7)-35)/(560+sqrt(7)), (3, 2) = (-280+32*sqrt(7))/(560+sqrt(7)), (3, 3) = 0})

Matrix(%id = 36893490078408578100)

(1)

mtest := simplify(M+M^%T)

Matrix(%id = 36893490078408571348)

(2)

LinearAlgebra:-ZeroMatrix(3)

Matrix(%id = 36893490078408566412)

(3)

is(mtest = LinearAlgebra:-ZeroMatrix(3))

false

(4)

NULL

Download 2025-05-30_is_Matrix_skew-symmetric.mw

This seems rediculous to have to ask. I just want to display a plane. The plot is used in other plots so I gave it a name. I get "length of output exceed 1000000" and the plot does not display. I then have to "display" the plot name "display(plt0)" to see it. I had tried geom3d but found if infuriating, (maybe I am missing something there).

An I missing something simple here?

restart

NULL

with(plots)

pln := x-2*y+3*z

x-2*y+3*z

(1)

NULL

display(implicitplot3d(pln, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, style = patchnogrid, transparency = .6))

 

NULL

NULL

plt0 := display(implicitplot3d(pln, x = -3 .. 3, y = -3 .. 3, z = -3 .. 3, style = patchnogrid, transparency = .6))

`[Length of output exceeds limit of 1000000]`

(2)

display(plt0)

 

Intended use

NULL

Download 2025-05-18_Q_display_a_simple_plane.mw

1 2 3 4 5 6 7 Last Page 1 of 36