Kitonum

21440 Reputation

26 Badges

17 years, 37 days

MaplePrimes Activity


These are answers submitted by Kitonum

A:=<0,1,1,1,0,1; 1,0,0,0,1,1; 1,0,0,0,1,1; 1,0,0,0,1,1;0,1,1,1,0,1; 1,1,1,1,1,0>:
evalc(LinearAlgebra:-Eigenvalues(A));  
# Symbolic (exact) result
evalf(%);  # Approximate result
                             


 

L:=[[TC,DB], [], [TD,JK], [IW,CM], [], [KJ,DJ]];
remove(s->s=[], L);
 # or
remove(`=`, L, []);

The first equation is set incorrectly. See the corrected file  SimEquations_new.mw

First we inserted the row  R  into the matrix  A, and then inserted  the column  C  into the matrix  A1:

A:=LinearAlgebra:-RandomMatrix(6, generator=0..9);
R:=LinearAlgebra:-RandomVector[row](6, generator=0..9);
C:=LinearAlgebra:-RandomVector(7, generator=0..9);
A1:=<<A[..3], R>, A[4..]>;
A2:=<A1[..,..3] | C | A1 [..,4..]>;

 

Edit.

To plot space curves, I usually use  plots:-spacecurve  command, because it gives the best quality, and instead of transparency I select the appropriate  orientation:

restart;
PP:=0.8707945038*exp(-50.00000000*(m-.842e-1)^2+2.745342070*(m-.842e-1)*(a-2.3722)-.1046792095*(a-2.3722)^2):
A:=plots:-spacecurve([a, -0.2, eval(PP,m=-0.2)+0.005], a = -5 .. 8, color=red, thickness=4):
B:=plot3d(PP, a = -5 .. 8, m = -0.7 .. 0.7, style=surface, color=khaki, numpoints=5000):
C:=plot3d([a, -0.2, z], a = -5 .. 8, z = 0 .. 0.9, style=surface, color="LightBlue"):
plots:-display(A,B,C, orientation=[-30,70]);

             

Edit.

In this line  k = 10; Matrix([[time, harmonic], seq([t, evalf(S2)], t = 0 .. 1, 0.001)]);

of your code, the matrix is not calculated, because should be   k:=10  instead of  k=10

In further lines, if  k  will take different values, you must first execute  k:='k'

Under the summation sign write  'k'=any value

X:=<3,4,2,5>:  Y:=<5,3,0,1>:  Z:=<1,2,3,4>:
plots:-display(plot(Z,X, color=red), plot(Z,Y, color=blue));  
# or
plot(convert~([`[]`~(Z,X),`[]`~(Z,Y)],list));  # or 
plot(map(convert,[zip(`[]`,Z,X),zip(`[]`,Z,Y)],list));  # for older versions of Maple
 

restart:    
# a piecewise function    
p1:=piecewise(a(t)^2=0,<cos(a(t))^2+sin(a(t))^2,0>,<1,1/a(t)>):
evalindets(p1, Vector, p->diff~(p,t));

           

 

 

P:=[`TC,DB`, `PC,JL`, `TD,JK`, `IW,CM`, `CC,PG`, `KJ,DJ`];
map(`[]`, P);

You wrote  " v := x->% " equivalent to "v:=unapply(%,x)" . It is false. The main difference between these two ways of specifying a function is that when you write  f:=t->A  in the input line, Maple does nothing, by this simply a procedure is specified, which calculates something only when it is called.  f:=unapply(A, t)  also sets a procedure, but at the same time, at the time of its assignment, Maple calculates what is written in  A .

Compare:
t^2;
f:=t->%;
5;
f(2);

and

t^2;
g:=unapply(%, t);
5;
g(2);

 

Replace the line  v:=t->%  with the line  v:=unapply(%, t)

For the label do the same.

Explore(plots:-display(plots:-textplot([2,-10,k=evalf[3](a)+2], font=[times,bold,16]), plot((a+2)*x+6, x = -5 .. 5, view = -10 .. 10)), parameters = [a = -4.0 .. 3], initialvalues = [a = 1]);

Example:

V:=LinearAlgebra:-RandomVector(10, generator = -10. .. 10.);
seq(`if`(V[i]>0, [i, V[i]], NULL), i=1..10);

Use the differential operator  D  for this:

f:=(x,y)->(x^3+y^3)^(1/3);
g:=D[1](f);
g(1,y);

                

First 147 148 149 150 151 152 153 Last Page 149 of 289