Maple 2021 Questions and Posts

These are Posts and Questions associated with the product, Maple 2021

Hello

I'm a Master student and for my thesis I need to get the following function in Maple with the if then commando (or onother one that will get the same result):

But I didn't find the solution yet.

Can anyone help me out?

Thank you in advance.

Hi everyone 

I have a question regarding an animation. The maple file is attached at the bottom. (parts of it are from tomleslie 12910

I have two spheres which move and rotate over time. Now I would like to show one ball at a certain time and the other one at a certain time and not both over the whole animation.

For example:

x1 should only be shown and visible from time -1 to 0 

x2  should only be shown and visible from time 0 to 1 

Because I want to show a kind of transition from x1 to x2 at the time 0 i cannot just start one animation at -1 and the other at 0 because then they would run at the sime time which is not the goal. 

has anyone an idea?

Thanks in advance!

how_transition.mw

restart
EQ := proc(M, N) RETURN((y - M[2])/(x - M[1]) = (N[2] - M[2])/(N[1] - M[1])); end proc:
 with(plots):   
 with(geometry):   
_EnvHorizontalName := 'x':   _
EnvVerticalName := 'y':  
a := 7;  b := 5;  
c:=sqrt(a^2-b^2); 
 t:= (3* Pi)/(4):    
ellipse(el,x^2/a^2 + y^2/b^2 - 1 ): 
 point(M1, a*cos(t),b*sin(t)):  
point(F1,-c,0):point(F2,c,0):    
line( L1,[F1,M4]): 
point(M1, a*cos(t),b*sin(t)):  
EQ([a*cos(t),b*sin(t)],[-c,0]);  
solve(`%`,y);m:=coeff(`%`,x);   
line(L3,y=m*(x-c)); 
op(solve({x^2/a^2 + y^2/b^2 - 1 =0, y=m*(x-c)},{x,y},explicit)[2])[1]:xM2:=rhs(`%`):  
op(solve({x^2/a^2 + y^2/b^2 - 1 =0, y=m*(x-c)},{x,y},explicit)[2])[2]:yM2:=rhs(`%`):  
point(M2,xM2,yM2); 
line( tang1,x*xM2/a^2 + y*yM2/b^2 = 1);  
intersection(C1,L1,tang1);  
line(L4,[F1,M2]);  C1:=[ HorizontalCoord(C1), VerticalCoord(C1)]; 
 F1:=[-c,0];M2:= [ HorizontalCoord(M2), VerticalCoord(M2)];    
display( [ textplot( [[ -c, 0, "F1"],[ c,0, "F2"] ,                         
[ HorizontalCoord(M1), VerticalCoord(M1), "M1"],                          
[ HorizontalCoord(M2), VerticalCoord(M2), "M2"],                         
[ HorizontalCoord(C1), VerticalCoord(C1), "C1"] ],'align'={"above",'right'},                       [polygonplot([C1,F1,M2], color=blue,filled=true,transparency=0.9)]);     
draw( [ el(color=red),M1(color=black,symbol=solidcircle, symbolsize=16),
                      M2(color=black,symbol=solidcircle, symbolsize=16),                      
                      L1( color=black),L3(color=green),L4(color=green),                      
                      tang1(color=red), 
                      F1(color=blue, symbol=solidcircle, symbolsize=16),                      
                      F2(color=red, symbol=solidcircle, symbolsize=16),
                      C1(color=black, symbol=solidcircle, symbolsize=16),                     ],                                    axes=none ) ] );
Error, missing operator or `;` Many errors Icant corrected.  Thank you.

Hello;

Hope you are fine. I need to learn how can I call my code in the other file of maple, define new value for A and can get results. For this purpose, I just take an simple example as

questionmaple.mw

restart; A := 5; B := 10; AAA[0] := 10; for i from 0 while i <= A do AAA[i+1] := B*i*AAA[0] end do

5

 

10

 

10

 

0

 

100

 

200

 

300

 

400

 

500

(1)
 

``

Download questionmaple.mw

Hi Everyone, 

ich have a question, that is probably rather trivial. I am currently doing some calculations with the differential geometry package. (I know the Physics package was recommended, however, the DG package seems more appropriate for my purposes after having a look through the Physics help page)

My goal is to substitute a functional expression into equations derived in curvilinear (spherical and helical) coordinates. my problem now is that maple won't expand the differentials of the expressions I have substituted. 

I hope the answer isn't too trivial. Although I assume it will be :) 

NULL

restart

with(DifferentialGeometry); with(Tensor); with(Tools); Preferences("ShowFramePrompt", false); with(VectorCalculus); BasisFormat(false)
``

DGsetup([r, theta, phi], M)

DGsetup([r, theta, phi], M)

(1)

Defining the Metric Tensor and Calculating the Connection Coefficients

 

g := evalDG(`&t`(dr, dr)+r^2*sin(phi)^2*`&t`(dtheta, dtheta)+r^2*`&t`(dphi, dphi))

_DG([["tensor", M, [["cov_bas", "cov_bas"], []]], [[[1, 1], 1], [[2, 2], r^2*sin(phi)^2], [[3, 3], r^2]]])

(1.1)

g_inv := InverseMetric(g)

_DG([["tensor", M, [["con_bas", "con_bas"], []]], [[[1, 1], 1], [[2, 2], 1/(r^2*sin(phi)^2)], [[3, 3], 1/r^2]]])

(1.2)

C := Christoffel(g)

DGinfo(C, "ObjectComponents")

[[[1, 2, 2], -r*sin(phi)^2], [[1, 3, 3], -r], [[2, 1, 2], 1/r], [[2, 2, 1], 1/r], [[2, 2, 3], cos(phi)/sin(phi)], [[2, 3, 2], cos(phi)/sin(phi)], [[3, 1, 3], 1/r], [[3, 2, 2], -sin(phi)*cos(phi)], [[3, 3, 1], 1/r]]

(1.3)

Defining the PDF as a Tensor (Metric) Density

 

f := f__1(r, theta, phi)

f__1(r, theta, phi)

(2.1)

rho := MetricDensity(g, -1)

_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])

(2.2)

Tools:-DGinfo(rho, "TensorDensityType")

Convective Operator

 

CONV := CovariantDerivative(v*f, C)

CONV_1 := simplify(ContractIndices(CONV, [[1, 2]]))

CONV_2 := expand(subs(f__1(r, theta, phi) = f__2(r, theta, phi)*rho, CONV_1))

2*f__2(r, theta, phi)*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])*v__r/r+v__phi*(diff(f__2(r, theta, phi), phi))*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])+v__phi*f__2(r, theta, phi)*(diff(_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]]), phi))+cos(phi)*f__2(r, theta, phi)*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])*v__phi/sin(phi)+(diff(f__2(r, theta, phi), theta))*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])*v__theta+v__r*(diff(f__2(r, theta, phi), r))*_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]])+v__r*f__2(r, theta, phi)*(diff(_DG([["tensor", M, [[], [["bas", -1]]]], [[[], 1/(r^4*sin(phi)^2)^(1/2)]]]), r))

(3.1)

NULL

In particular, the last line should simplify quite a bit when expanding derivatives.

Download Tensor_Calc_simplified.mw

Problema with textplot

restart:with(plots):
  with(geometry):
  _EnvHorizontalName := 'x':
  _EnvVerticalName := 'y':
  a := 7:
  b := 3:
  ellipse(p, x^2/a^2 + y^2/b^2 - 1, [x, y]):
  Fig := proc(t)
              local M, l1,L1,L2,  q, m, c , tex;
              global a, b, p;
              point(M, a*cos(t), b*sin(t));
              if   VerticalCoord(M)=0
              then line(l1, x=HorizontalCoord(M));
              else m:=eval[recurse]( rhs
                                     ( isolate
                                       ( diff
                                         ( eval
                                           ( Equation(p),
                                             y=y(x)
                                           ),
                                           x
                                         ),
                                         diff(y(x),x)
                                       )
                                     ),
                                     [ y(x)=y,
                                       x=HorizontalCoord(M),
                                       y=VerticalCoord(M)
                                     ]
                                   );
                   c:=VerticalCoord(M)-m*HorizontalCoord(M);
                   line(l1, y=m*x+c);
              fi;
              reflection(q, p, l1);
              line(L1, [point(P1, evalf~(coordinates(foci(q)[1]))),
                            point(P2, evalf~(coordinates(foci(q)[2])))]):  
              line(L2, [point(P3, evalf~(coordinates(foci(p)[1]))),
                            point(P4, evalf~(coordinates(foci(p)[2])))]): 
              segment(P1P3,[P1,P3]): circle(cir1,[P3,2*a]):
              segment(P2P4,[P2,P4]): 
              circle(cir1,[P3,2*a]): circle(cir2,[P4,2*a]):
              textplot([[P2[], "F1"], [P4[], "F2"]], font = [times, 10], align = {below, left}):            
              draw( [ p(color = blue),P1P3(color=magenta,linestyle=3),
                      q(color = blue),P2P4(color=magenta,linestyle=3),
                      l1(color = black),L1(color = black),cir1(color=magenta,linestyle=3),
                      cir2(color=magenta,linestyle=3),
                      M(color = blue, symbol = solidcircle, symbolsize = 16),
                      P1(color = red, symbol = solidcircle, symbolsize = 16),
                      P2(color = red, symbol = solidcircle, symbolsize = 16),
                      P3(color = red, symbol = solidcircle, symbolsize = 16),
                      P4(color = red, symbol = solidcircle, symbolsize = 16)
                    ],
                    axes = none,
                    scaling = constrained);
          end proc:
#
# Change nFig to type float
#
   nFig := 180.0:
#
# Make sure loop index is a float, and change end point
# on loop to nFig-1.0
#
   Figs := seq(Fig(2*Pi*i/nFig), i = 0.0 .. nFig-1.0):
   plots:-display(Figs, insequence = true);
Error, (in plots:-textplot) improper op or subscript selector
Error, (in plots:-display) expecting plot structure but received: Figs

Hi Everyone,

I want to do some fourier analysis on a numeric ODE solution but first I wanted to understand all the commands and make sure it worked with a simple example. I created a Array of data which I attempted to take the DFT of but I got an error and I cannot seem to figure out why, I looked through the help pages and it looks like inputs use an Array of data but for some reason mine wont work. 

Worksheet attached, any help greatly appreciated. 

DFT_Test.mw

_local(D);
f := (x, y) -> 3*x^2 - 3*y*x + 6*y^2 - 6*x + 7*y - 9;
coeffs(f(x, y));
A, B, C, D, E, F := %;
theta := 1/2*arctan(B/(A - C));
solve({-2*A*xc - B*yc = D, -B*xc - 2*C*yc = E});
assign(%);
x := xcan*cos(theta) - ycan*sin(theta) + xc;
y := xcan*sin(theta) + ycan*cos(theta) + yc;
Eq := simplify(expand(f(x, y)));
xcan^2/simplify(sqrt(-tcoeff(Eq)/coeff(Eq, xcan^2)))^`2` + ycan^2/simplify(sqrt(-tcoeff(Eq)/coeff(Eq, ycan^2)))^`2` = 1;
a := sqrt(-tcoeff(Eq)/coeff(Eq, xcan^2));
b := sqrt(-tcoeff(Eq)/coeff(Eq, ycan^2));
c := sqrt(a^2 - b^2);
F1 := [xc + c*cos(theta), yc + c*sin(theta)];
evalf(%);
F1 := [xc - c*cos(theta), yc - c*sin(theta)];
evalf(%);
Points := pointplot([F1[], F2[]], symbol = solidcircle, color = [red], symbolsize = 6);
xcan := plot(yc + tan(theta)*('x' - xc), 'x' = -2 .. 3.5, color = black);
ycan := plot(yc - ('x' - xc)/tan(theta), 'x' = 0.1 .. 1.5, color = black);
Ellipse := plots[implicitplot](f('x', 'y'), 'x' = -2 .. 3.5, 'y' = -2 .. 1.5, color = red, thickness = 2, gridrefine = 5);
labels := plots[textplot]([[0.4, 1.3, "ycan"], [3.2, 0.75, "xcan"]], font = [TIMES, ROMAN, 14]);
plots[display](xcan, ycan, Points, Ellipse, labels, scaling = constrained);

I do not why I get this message:

Error, (in plots:-display) expecting plot structure but received: pointplot([17/21-(2/21)*(1407/(-(3/2)*2^(1/2)+9/2)-1407/((3/2)*2^(1/2)+9/2))^(1/2)*cos((1/8)*Pi), -8/21-(2/21)*(1407/(-(3/2)*2^(1/2)+9/2)-1407/((3/2)*2^(1/2)+9/2))^(1/2)*sin((1/8)*Pi), F2[]], symbol = solidcircle, color = [red], symbolsize = 6) NULL;

Thank you for your help.
 

Good day,

I am looking for some guidance with the Syrup toolbox

I have a netlist that was generated with the Altium designer Spice simulator (XSpice based), I was able to import it into LTSpice and verrify the results.

I want to move it into maple to make use of the modellica code generation.

I then began modifying the netlist in order to meet the netlist syntax of Syrup. One of the most prominant change I needed to make was the arbitrary input nodes for my Voltage dependant Voltage sources. 

Therefore, for any line that implies arbitrary sources such as:

E_U8_E1 U8_N208620 LO
+ VALUE { IF(V(U8_N208706, 0) > 0.5, 5, -5) }

was changed to:

V1    16   17 1vdc

E_U8_E1 U8_N208620 LO 16 17
+ VALUE { IF(V(U8_N208706, 0) > 0.5, 5, -5) }

This, of course, is a non ideal workaround which brings me to question 1,

Is there a way to define a arbitrary source with the Spice parser in Syrup?

Once these changes were made, it seems the Solve function in Syrup can parse the netlist without issue, however when it gets to the Solve portion it throws the following error:

Solve("file://C:/Users/msavoy/Documents/Spice_cct/inverter_newfet_nonot.cir", 'tran');
Solve: Analyzing SPICE deck "The Apple" (ignoring this line)
Error, (in Syrup:-Solve) invalid input: rcopy uses a 1st argument, A (of type anything), which is missing

Attached is a copy of the netlist, inverter_newfet_nonot.txtI am honestly at a lost as to what could be throwing the rcopy error

Furthermore, I wanted to test out the Modellica code generation in Syurp, it appears that it does not like having subcircuits, as running the test:

V 1 0 1
L1 1 2 L
C1 2 0 C
L2 2 3 L
C2 3 0 C
L3 3 4 L
C3 4 0 C
Vshort 4 5 0
Rt 5 0 1
.SUBCKT TEST A B C Y
V1 14 15 1
EINT YINT 0 14 15
+ VALUE {IF(V(A) > 0.5 && V(B) > 0.5 && V(C) > 0.5, 1, 0)}
RINT YINT Y 1
CINT Y 0 1n
.ENDS TEST
.end

provides the error of:

test_c := ToModelica("file://C:/Users/msavoy/Documents/Spice_cct/test_cct_RCL.txt", 'probes' = ["Rt.v"], 'parameters' = {C = 2, L = 1});
Error, (in Syrup:-ToModelica) invalid input: nodeToModelica expects its 1st argument, node, to be of type nonnegint, but received Y

Is it possible to define a sub circuit in a netlist that is to be converted to Modellica, or do all subcircuits need to be defined in their own file?

Thank you

Hello,

I am trying to create a Homogeneous transformation matrix, where I am given the point 'p' through which a unit rotation axis 'x' passes and the point/vector on which this Homogenous transformation acts is rotated by 'theta'.

I used the Rodrigues formula (the one in the blue-green box) to define the rotation matrix;

unit_axis_cross_mat := unapply(<<0 | -x[3] | x[2]>, <x[3] | 0 | -x[1]>, <-x[2] | x[1] | 0>>, x::Vector);
rot_mat := unapply(LinearAlgebra[IdentityMatrix](3) + unit_axis_cross_mat(<x[1], x[2], x[3]>)*sin(theta) + MatrixPower(unit_axis_cross_mat(<x[1], x[2], x[3]>), 2)*(1 - cos(theta)), x::Vector, theta)

I then tried to concatenate them to generate the matrix function

, where the exponential term represents the rotation matrix (defined above) as such:

trans_mat_ang := unapply(ArrayTools[Concatenate](1, ArrayTools[Concatenate](2, rot_mat(<x[1], x[2], x[3]>, theta), (LinearAlgebra[IdentityMatrix](3) - rot_mat(<x[1], x[2], x[3]>, theta)) . <p[1], p[2], p[3]>), <0 | 0 | 0 | 1>), x::Vector, theta, p::Vector)

But I end up getting the error 

"Error, (in ArrayTools:-Concatenate) number of columns must match"

To diagnose it, I try to evaluate the 1st Concatenation:

trans_mat := unapply(<ArrayTools[Concatenate](2, rot_mat(<x[1], x[2], x[3]>, theta), (LinearAlgebra[IdentityMatrix](3) - rot_mat(<x[1], x[2], x[3]>, theta)) . <p[1], p[2], p[3]>)>, x::Vector, p::Vector, theta);

which runs successfully, but when I try to evaluate it:

trans_mat(<1, 0, 0>, <1, 0, 0>, 0)

, I get a symbolic expression .

Although the expression is correct algabrically, I expected a full evaluation for the numerical inputs.

I am attaching my Homogeneous_Transformation.mw for your ease of diagnosis.

Is this the cause of the error of "Number of Columns must match"?

Any help towards this would be appreciated.

Regards

 

Fig := proc(t) 
local xD, yD, D, C, Ii, Points, tex,sol; 
global A, B, b, Omega1, EL1, EL2; 
xD := Omega1[1] + aa*cos(t); 
yD := bb*sin(t); 
D := [xD, yD]; 
C := [xD + b, yD]; 
sol:=solve({EQ(A,D),EQ(C,B)},{x,y});
Ii:=[subs(sol,x),subs(sol,y)]:
Points := pointplot([A[], B[], C[], C[], D[], E[], Omega1[]], symbol = solidcircle, color = [red], symbolsize = 6); 
tex := textplot([[A[], "A"], [B[], "B"], [C[], "C"], [D[], "D"], [E[], "E"], [Omega1[], "&Omega;1"]], align = ["above", "right"]); 
display([polygonplot([A, B, C, D], color = blue, filled = true, transparency = 0.9), Points, tex, EL1, EL2,plot([D,Ii]),plot([Ii,C])], axes = normal, scaling = constrained); end proc:
Fig((3*Pi)/4):
display([seq(Fig((2*Pi*i)/40), i = 1 .. 80)], insequence = true);
Warning, data could not be converted to float Matrix
Warning, data could not be converted to float Matrix
Warning, data could not be converted to float Matrix
Warning, data could not be converted to float Matrix
Warning, data could not be converted to float Matrix
Warning, data could not be converted to float Matrix
Warning, data could not be converted to float Matrix
Warning, data could not be converted to float Matrix
I am sorry; How to manage with such a message. Thank you very much.

restart;
with(plots):
_local(D):

EQ := proc(M, N) local eq; eq := (y - M[2])/(x - M[1]) = (N[2] - M[2])/(N[1] - M[1]); end proc;
     EQ := proc (M, N) local eq; eq := (y-M[2])/(x-M[1]) = 

        (N[2]-M[2])/(N[1]-M[1]) end proc


On considère un trapèze dans lequel une base est fixe l'autre base a une longueur constante et la somme des 2 autres côtés est constaante.
Trouver :
1-. le lieu des sommets mobiles.
A := [xA, 0]:
B := [xA + a, 0]:
D := [xD, yD]:
C := [xD + b, yD]:
EQ(B, C);
E := [xA + a - b, 0]:
Omega1 := (A + E)/2;
Application numérique :
Lieux des sommets C et D

xA := -5:
a := 13:#a>=b
b := 7:
c := -3:
xD := -6:
xC := xD + c:

A:
B:
C:
D:
Ll:=11:aa:= Ll/2: 
cc := (a - b)/2:
bb := sqrt(aa^2 - cc^2):
el1 := (x - Omega1[1])^2/aa^2 + y^2/bb^2 = 1:
sol := solve(subs(x = xD, (x - Omega1[1])^2/aa^2 + y^2/bb^2 = 1), y):
yD := sol[1]:
el2 := (x - Omega1[1] - b)^2/aa^2 + y^2/bb^2 = 1:
EL1 := implicitplot(el1, x = -9 .. 4, y = -6 .. 6, color = blue):
EL2 := implicitplot(el2, x = -9 .. 12, y = -6 .. 12, color = blue):
Trap := polygonplot([A, B, C, D], color = blue, filled = true, transparency = 0.9):
Points := pointplot([A[], B[], C[], C[], D[], E[], Omega1[]], symbol = solidcircle, color = [red], symbolsize = 6):
tex := textplot([[A[], "A"], [B[], "B"], [C[], "C"], [D[], "D"], [E[], "E"], [Omega1[], "&Omega;1"]], align = ["above", "right"]):
display([Trap, EL1, EL2, tex, Points], axes = normal, scaling = constrained):
Fig := proc(xD) 
local yD, D, C,Points,tex; 
global A, B, b, Omega, xA, xB, EL1, EL2; 
solve(subs(x = xD, (x - Omega1[1])^2/aa^2 + y^2/bb^2 = 1), y); 
yD := %[1]; D:= [xD, yD]; C := [xD + b, yD];
Points := pointplot([A[], B[], C[], C[], D[], E[], Omega1[]], symbol = solidcircle, color = [red], symbolsize = 6): 
tex := textplot([[A[], "A"], [B[], "B"], [C[], "C"], [D[], "D"], [E[], "E"], [Omega1[], "&Omega;1"]], align = ["above", "right"]):
display([polygonplot([A, B, C, D], color = blue, filled = true, transparency = 0.9), Points,tex,EL1, EL2], axes = normal, scaling = constrained); 
end proc:

Fig(2):Fig(-4):
Fig([seq(-6 + 3*i/10), i = 1.20], insequence = true);
Error, (in Engine:-Dispatch) badly formed input to solve: not fully algebraic
;I don't understand this error message. Thank you gfor your help.
 

Hi everyone 

I have a problem regarding the animation of a flying ball. 

I get the coordinates and rotation in rad/s out of differential equations. Now I want to show the movement of the ball including the rotation in an animation. 

With just the coordinates it works just fine, but when I try do add the rotation the error message "number of elements in lust must be a multiple of 2" appears

I would be grateful for some advice. Thank you in advance.

I added my file, hope it helps.

how_rot.mw

I made an error by trying to multiply two nonconformable matrices. I think, I should receive an error message. But in this example this did not occur.

Strange.mw

restart; with(LinearAlgebra); alias(`&bigotimes;` = LinearAlgebra:-KroneckerProduct); interface(rtablesize = 16); kernelopts(version); interface(version)

`&bigotimes;`

[10, 10]

`Maple 2021.2, X86 64 LINUX, Nov 23 2021, Build ID 1576349`

`Standard Worksheet Interface, Maple 2021.2, Linux, November 23 2021 Build ID 1576349`

Matrices nonconformable, Maple should give error message:

`&bigotimes;`(Matrix(1, 4, 1), IdentityMatrix(4)); Dimension(%); M := Matrix(4, 4, shape = symmetric, symbol = m); Dimension(%)

Matrix([[1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]])

4, 16

M := Matrix(4, 4, {(1, 1) = m[1, 1], (1, 2) = m[1, 2], (1, 3) = m[1, 3], (1, 4) = m[1, 4], (2, 2) = m[2, 2], (2, 3) = m[2, 3], (2, 4) = m[2, 4], (3, 3) = m[3, 3], (3, 4) = m[3, 4], (4, 4) = m[4, 4]}, storage = triangular[upper], shape = [symmetric])

4, 4

MatrixMatrixMultiply(`&bigotimes;`(Matrix(1, 4, 1), IdentityMatrix(4)), DiagonalMatrix(Diagonal(M)))

Matrix([[m[1, 1], 0, 0, 0], [0, m[2, 2], 0, 0], [0, 0, m[3, 3], 0], [0, 0, 0, m[4, 4]]])

`&bigotimes;`(Matrix(1, 4, 1), IdentityMatrix(4)).DiagonalMatrix(Diagonal(M))

Matrix([[m[1, 1], 0, 0, 0], [0, m[2, 2], 0, 0], [0, 0, m[3, 3], 0], [0, 0, 0, m[4, 4]]])

KroneckerProduct(Matrix(1, 4, 1), IdentityMatrix(4)).DiagonalMatrix(Diagonal(M))

Matrix([[m[1, 1], 0, 0, 0], [0, m[2, 2], 0, 0], [0, 0, m[3, 3], 0], [0, 0, 0, m[4, 4]]])

(Matrix(4, 16, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 1, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 1, (1, 10) = 0, (1, 11) = 0, (1, 12) = 0, (1, 13) = 1, (1, 14) = 0, (1, 15) = 0, (1, 16) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 1, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 1, (2, 11) = 0, (2, 12) = 0, (2, 13) = 0, (2, 14) = 1, (2, 15) = 0, (2, 16) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (3, 7) = 1, (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (3, 11) = 1, (3, 12) = 0, (3, 13) = 0, (3, 14) = 0, (3, 15) = 1, (3, 16) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1, (4, 5) = 0, (4, 6) = 0, (4, 7) = 0, (4, 8) = 1, (4, 9) = 0, (4, 10) = 0, (4, 11) = 0, (4, 12) = 1, (4, 13) = 0, (4, 14) = 0, (4, 15) = 0, (4, 16) = 1})).DiagonalMatrix(Diagonal(M))

Matrix([[m[1, 1], 0, 0, 0], [0, m[2, 2], 0, 0], [0, 0, m[3, 3], 0], [0, 0, 0, m[4, 4]]])

`&bigotimes;`(Matrix(1, 4, 1), IdentityMatrix(4)).Matrix(4, 4, shape = diagonal, symbol = m)

Matrix([[m[1, 1], 0, 0, 0], [0, m[2, 2], 0, 0], [0, 0, m[3, 3], 0], [0, 0, 0, m[4, 4]]])

whattype(`&bigotimes;`(Matrix(1, 4, 1), IdentityMatrix(4))); Dimension(`&bigotimes;`(Matrix(1, 4, 1), IdentityMatrix(4)))

Matrix

4, 16

whattype(DiagonalMatrix(Diagonal(M))); Dimension(M)

Matrix

4, 4

hereafter results are correct: Matrices

nonconformable, therefore error messages appear.

`&bigotimes;`(Matrix(1, 4, 1), IdentityMatrix(4)).M

Error, (in LinearAlgebra:-Multiply) first matrix column dimension (16) <> second matrix row dimension (4)

`&bigotimes;`(Matrix(1, 4, 1), IdentityMatrix(4)).Matrix(4, 4, shape = symmetric, symbol = m)

Error, (in LinearAlgebra:-Multiply) first matrix column dimension (16) <> second matrix row dimension (4)

Download Strange.mw

Hi everyone 

I have a problem with an animation that I dont know how to solve. 

Let's say I have three sets of coordinates. (one static and two moving dependet on time)

1:= [x1;z1]

2:= [x2(t);z2(t)]

3:= [x3(t);z3(t)]

Now I want out of these 3 points two lines that are connected  with each other like this:

line 1:= 1 and 2

line 2:= 2 and 3

These lines should move over time in the 2d space. The only point that doesnt move is point 1. In the animation there should only be the 2 lines visible for each frame. (not a trace or something like this) 

does anyone have an idea how I solve this?

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