Kitonum

21530 Reputation

26 Badges

17 years, 85 days

MaplePrimes Activity


These are answers submitted by Kitonum

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);

                

When working with exact (symbolic) expressions, we should simplify it as much as possible:

a:=abs(tan(Pi/5)-sqrt(5-2*sqrt(5)));
convert(a, radical);                     
signum(0, %, 0);

                 
 

In your picture I see  an expression:=an expression . To the left there must be a name, not an expression.

If you want to refer to an equation  A=B  later, you must give it a name, for example  eq:=A=B

You can use  plots:-tubeplot  command to paint different parts of the same axis in different colors.

Example:

restart;
P:=plot3d([r*cos(t),r*sin(t),r^2], r=0..1,t=0..2*Pi,  axes=normal, lightmodel=none):
r:=0.007:
Xpos:=plots:-tubeplot([t,0,0],t=0..1,radius=r, style=surface, color=red):
Ypos:=plots:-tubeplot([0,t,0],t=0..1,radius=r, style=surface, color=red):
Zpos:=plots:-tubeplot([0,0,t],t=0..1.45,radius=r, style=surface, color=red):
Xneg:=plots:-tubeplot([t,0,0],t=-1..0,radius=r, style=surface, color=blue):
Yneg:=plots:-tubeplot([0,t,0],t=-1..0,radius=r, style=surface, color=blue):
Zneg:=plots:-tubeplot([0,0,t],t=-0.45..0,radius=r, style=surface, color=blue):
plots:-display(P,Xpos,Ypos,Zpos,Xneg,Yneg,Zneg);

       



Addition. You can make the negative parts of the axes invisible if set  color=white :

restart;
P:=plot3d([r*cos(t),r*sin(t),r^2], r=0..1,t=0..2*Pi,  axes=normal, lightmodel=none, tickmarks=[[0,0.5,1],[0,0.5,1],[0,0.5,1,1.5]]):
r:=0.007:
Xpos:=plots:-tubeplot([t,0,0],t=0..1.2,radius=r, style=surface, color=red):
Ypos:=plots:-tubeplot([0,t,0],t=0..1.2,radius=r, style=surface, color=red):
Zpos:=plots:-tubeplot([0,0,t],t=0..1.55,radius=r, style=surface, color=red):
Xneg:=plots:-tubeplot([t,0,0],t=-1..0,radius=r, style=surface, color=white):
Yneg:=plots:-tubeplot([0,t,0],t=-1..0,radius=r, style=surface, color=white):
Zneg:=plots:-tubeplot([0,0,t],t=-0.45..0,radius=r, style=surface, color=white):
plots:-display(P,Xpos,Ypos,Zpos,Xneg,Yneg,Zneg);

       
 

 

Use  view  option.

Example:

plot3d(4*y-y^2, x=1..3.5, y=0.5..3.5, axes=normal);  # Without view option
plot3d(4*y-y^2, x=1..3.5, y=0.5..3.5, view=[0..4, 0..4, 0..5], axes=normal);  # With view option


 

p:=[3,6,-1]: q:=[4,-2,2]:
pq:=<q-p>;
whattype(pq);

 

Of course, this is easy to write down as a procedure whose parameters are the beginning and end of a vector:

VectorByPoints:=proc(p::list,q::list)
<q-p>;
end proc:

VectorByPoints([3,6,-1], [4,-2,2]);

First 148 149 150 151 152 153 154 Last Page 150 of 290