Kitonum

20269 Reputation

26 Badges

15 years, 348 days

MaplePrimes Activity


These are replies submitted by Kitonum

@JAMET  Look carefully at my answer about this (multiplying a matrix by a vector).

@JAMET 

restart;
with(linalg):
xA := 4;
yA := 10;
xB := 0;
yB := 0;
xC := 13;
yC := 0;
Mat := matrix(3, 3, [xA, xB, xC, yA, yB, yC, 1, 1, 1]);
eta:=(x,y,z)->evalm(Mat&*[x,y,z]);
eta(1,2,3);  

 

@mmcdara  
1. Thank you for your insightful analysis of the examples discussed. I am aware of these shortcomings in the program and will try to fix them as soon as I have enough free time.

2. You write that the program is too complicated. But how will you solve a similar problem if the number  n  is large enough. The first step  combinat:-partition(100)  or  combinat:-partition(100, 9)  will take too long, even if Maple has enough memory for this. My program is quite easy to cope with the problem  Partition(100, 1..100, {2,3,6,9});

@yangtheary  I don't understand what kind of help you need. Is there anything you don't understand about the code?

@vv   c<>5

@Maqroll  Consider 2 ways to define the function: h:=x->expr  and  h:=unapply(expr, x) , where  expr  is an expression. If the expression  expr  does not require any evaluation, then these 2 ways are equivalent, for example   h:=x->x^2+1  and  h:=unapply(x^2+1, x) 
If  expr  requires calculation, for example, it is given as an integral as in your example or in some other way, then at the moment of the definition of an arrow-function it is not calculated, but will be calculated only when you call this function with some argument value. In the case of unapply-function, the expression  expr  is evaluated immediately when this function is specified. Compare

f := x->a*x/(4*x^2+b):
h:=x->int(f(t),  t=0..x, continuous);
h(x);
h(1);
 	
h:=unapply(int(f(t),  t=0..x, continuous), x);
h(1);

 

To do this, you can use piecewise command in the inert form. To make the brace blue instead of grey, we use InertForm:-Display command.

An example:

Sys:={x+y-z = 3, x-y-z = 5, -x-y-z = 7}:
%piecewise(``, Sys[1], ``, Sys[2], ``, Sys[3]);
InertForm:-Display(%, inert=false);

                                     

@Prakash J  To find the values of these parameters, as well as the value of the alpha parameter, some additional conditions are needed.

@C_R  You can easily plot a cube with this method:

plots:-implicitplot3d(max(-x,x-1,-y,y-1,-z,z-1), x=-0.5..1.5, y=-0.5..1.5, z=-0.5..1.5, style=surface, axes=normal, grid=[100,100,100]);

                  

 

@C_R  You wrote "...Can you give me hint what  max  does with implict geometries?...".

The intersection of 2 of these tori (including the surfaces themselves) is given by the system of inequalities  {T1<=0, T2<=0}  that is equivalent to 1 inequality  max(T1,T2) <=0 . The equality  max(T1,T2)=0 defines the surface of this solid.

@vs140580  Remove the  print  command from the body of your procedures:

trying_new.mw

@vs140580  I don't understand why you can't do this:

op(0,RandomTools:-Generate(choose({A(Graphln, k),B(Graphln, k),C(Graphln, k)})));

@Carl Love  Thanks, I've edited my answer.

@nm  Thanks a lot for the answer!

@acer  Thanks a lot for the detailed answer!

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