gulliet

241 Reputation

6 Badges

16 years, 237 days

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by gulliet

See ?selection on the online help for more info.
> lst:=[seq([seq(i+10*j,i=1..5)],j=1..4)];

 lst := [[11, 12, 13, 14, 15], [21, 22, 23, 24, 25], [31, 32, 33, 34, 35], 

   [41, 42, 43, 44, 45]]

> lst[1..,2]; # Take the second column of each row

                              [12, 22, 32, 42]

Regards, -- Jean-Marc
This occurs only if the identity is on the right-end of an expression that contains more that two elements and is not surrounded by parentheses .
> restart;
> define('`&*`','multilinear','flat','identity'=1);
> (a &* b) &* c - a &* (b &* c);
                                      0
> a &* 1;
                                      a
> 1 &* a;
                                      a
> 1 &* a &* b;
                                   a &* b
> a &* 1 &* b;
                                   a &* b
> a &* b &* 1;
                                 &*(a, b, 1)
> a &* (b &* 1);
                                   a &* b
Regards, -- Jean-Marc
This occurs only if the identity is on the right-end of an expression that contains more that two elements and is not surrounded by parentheses .
> restart;
> define('`&*`','multilinear','flat','identity'=1);
> (a &* b) &* c - a &* (b &* c);
                                      0
> a &* 1;
                                      a
> 1 &* a;
                                      a
> 1 &* a &* b;
                                   a &* b
> a &* 1 &* b;
                                   a &* b
> a &* b &* 1;
                                 &*(a, b, 1)
> a &* (b &* 1);
                                   a &* b
Regards, -- Jean-Marc
define() accepts expressions and procedures in addition to keywords, so the distributivity law of &* over + could be defined as follows:
> define('`&*`','multilinear',a &* (b + c) = (a &* b) + 
(a &* c),'flat','identity'=1);

> x &* (y + z);
                               x &* y + x &* z

> 2 &* (3 + a);
                                   6 + 2 a

Regards, -- Jean-Marc
define() accepts expressions and procedures in addition to keywords, so the distributivity law of &* over + could be defined as follows:
> define('`&*`','multilinear',a &* (b + c) = (a &* b) + 
(a &* c),'flat','identity'=1);

> x &* (y + z);
                               x &* y + x &* z

> 2 &* (3 + a);
                                   6 + 2 a

Regards, -- Jean-Marc
I believe you mean something like that:
restart;
mu := 5.0; sigma := 2.0; 
X1 := RandomTools:-Generate(list(distribution(Normal(mu, sigma)), 1100)); 
K1 := select(proc (x) options operator, arrow; 0 <= x and mu-3*sigma <= x
and x <= mu+3*sigma end proc, X1)[1 .. 1000]; 
nops(X1); nops(K1);

                                    1100
                                    1000
Regards, -- Jean-Marc
I believe you mean something like that:
restart;
mu := 5.0; sigma := 2.0; 
X1 := RandomTools:-Generate(list(distribution(Normal(mu, sigma)), 1100)); 
K1 := select(proc (x) options operator, arrow; 0 <= x and mu-3*sigma <= x
and x <= mu+3*sigma end proc, X1)[1 .. 1000]; 
nops(X1); nops(K1);

                                    1100
                                    1000
Regards, -- Jean-Marc
You could also use the interactive matrix browser. 97_largevectorsee1.jpg 97_largevectorsee2.jpg Regards, -- Jean-Marc
You could also use the interactive matrix browser. 97_largevectorsee1.jpg 97_largevectorsee2.jpg Regards, -- Jean-Marc
97_cnvertmatrixtolist.jpg Regards, -- Jean-Marc
97_cnvertmatrixtolist.jpg Regards, -- Jean-Marc
You can find the answers to your questions about Maple syntax and functions in the online help. 97_helpsys1.jpg You can either browse the online documentation or search for specific topic or keywords in the left-hand pane. For instance, type trunc and hit the button labeled "Search". 97_helpsys2.jpg Also, you can access specific pages related to a function by evaluating the question mark operator ? followed by some topic or function name. For instance, 97_helpsys3.jpg will bring you to 97_helpsys4.jpg Regards, -- Jean-Marc
You can find the answers to your questions about Maple syntax and functions in the online help. 97_helpsys1.jpg You can either browse the online documentation or search for specific topic or keywords in the left-hand pane. For instance, type trunc and hit the button labeled "Search". 97_helpsys2.jpg Also, you can access specific pages related to a function by evaluating the question mark operator ? followed by some topic or function name. For instance, 97_helpsys3.jpg will bring you to 97_helpsys4.jpg Regards, -- Jean-Marc
97_defineinertopassoc.jpg Regards, -- Jean-Marc
97_defineinertopassoc.jpg Regards, -- Jean-Marc
1 2 3 4 5 6 7 Last Page 3 of 15