acer

32333 Reputation

29 Badges

19 years, 325 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

You haven't shown the full example that demands loading all of VectorCalculus, or using assume instead of say assuming. So it's not possible to properly address subsequent -- but as yet unstated -- issues you may have.

However,

restart;

kernelopts(version);

`Maple 2018.0, X86 64 LINUX, Mar 9 2018, Build ID 1298750`

f := (x, y) -> x^2-y^2;

proc (x, y) options operator, arrow; x^2-y^2 end proc

with(VectorCalculus):

assume(x, 'real');
assume(y, 'real');

:-D[1](f);

proc (x, y) options operator, arrow; 2*x end proc

:-D[2](f);

proc (x, y) options operator, arrow; -2*y end proc

:-D[1]( unapply(x^2-y^2, [x,y]) );

proc (x, y) options operator, arrow; 2*x end proc

:-D[2]( unapply(x^2-y^2, [x,y]) );

proc (x, y) options operator, arrow; -2*y end proc

 

Download VCD.mw

eqs := {a + b + c = 1,
        a^2 + b^2 + c^2 = 2,
        a^3 + b^3 + c^3 = 3}:

a^4 + b^4 + c^4 = eval(R,solve(eqs union {a^4 + b^4 + c^4=R}));

                        4    4    4   25
                       a  + b  + c  = --
                                      6 
a^5 + b^5 + c^5 = eval(R,solve(eqs union {a^5 + b^5 + c^5=R}));

                         5    5    5    
                        a  + b  + c  = 6

I recall having the same questions, when ColorTools first appeared.

At that time I was able to find, in the internal code, a transformation Matrix corresponding to D50 (which confirmed a few empirical tests). In a subsequent release I noticed that had changed to correspond to D65. But there seems to be little or no documentation about that.

And I believe that by "RGB" the ColorTools package means sRGB, not a wider gamut like Adobe RGB. (Some monitors allow one to toggle amongst such. But I have never tested what effect that might have on what the Maple GUI shows. A missing bit of knowledge might be which the Java GUI's renderer is using.)

Another interesting detail might be just how ColorTools makes certains colors (when converted to RGB from, say, Lab or Luv) "displayable". It's not always clear how it may regress back to the displayable gamut, ie. does it regress linearly back to the white point, or what?

Eventually I wrote my own converters (also via XYZ colorspace) because I wanted them to Compile and be fast on datatype=float[8] rtables representing many colors (eg, images). That gives me full control about the mathematical conversion, though details of the GUI's renderer may still be a missing link in the chain, if I want to visualize.

What form do you want for the results?

restart;

kernelopts(version);

`Maple 2015.2, X86 64 LINUX, Dec 20 2015, Build ID 1097895`

f:=(coth(x)^(1/3)-tanh(x)^(1/3))*(coth(x)^(2/3)+tanh(x)^(2/3)+1);

(coth(x)^(1/3)-tanh(x)^(1/3))*(coth(x)^(2/3)+tanh(x)^(2/3)+1)

simplify(expand(f)) assuming x>0;

1/(sinh(x)*cosh(x))

h:=simplify(combine(f,trig)) assuming x>0;

1/(sinh(x)*cosh(x))

combine(h);

2/sinh(2*x)

g:=(coth(x)^(1/3)-tanh(x)^(1/3))^2+4;

(coth(x)^(1/3)-tanh(x)^(1/3))^2+4

simplify(map(simplify,combine(g)),trigh) assuming x>0;

2+tanh(x)^(2/3)+coth(x)^(2/3)

P:=u->simplify(map(simplify,expand(simplify(expand(u)))),trigh):

P(f) assuming x>0;

1/(sinh(x)*cosh(x))

P(g) assuming x>0;

cosh(x)^(2/3)/sinh(x)^(2/3)+sinh(x)^(2/3)/cosh(x)^(2/3)+2

Q:=u->simplify(combine(convert(u,tanh)),trigh):

Q(f) assuming x>0;

1/tanh(x)-tanh(x)

Q(g) assuming x>0;

1/tanh(x)^(2/3)+tanh(x)^(2/3)+2

 

Download trighsimp.mw

Do you want something like this?

[edit] Originally I used the range 0*Unit(mm)..100*Unit(mm) along with the accomodating x*Unit(mm) in the calls to tau and Q when plotted. But that only works (by accident) in Maple 2017. So below I've changed the range to 0..100 instead, which makes more sense alongside the argument x*Unit(mm) and which seems to work in both Maple 2017 and Maple 2019.[/edit]

restart

``

b := 120*Unit('mm')

h := 200*Unit('mm')NULL

V := 8*Unit('kN')

I__x := (1/12)*b*h^3

"Q(x):=1/(2)*((h^(2))/(4)-(100⟦mm⟧-x)^(2))*b:" 

"tau(x):=(V*Q(x))/(`I__x`*b):"

plot(proc (x) options operator, arrow; Q(x*Unit('mm')) end proc, 0 .. 100, useunits = [Unit('mm'), Unit('mm')^3])

``

plot(proc (x) options operator, arrow; tau(x*Unit('mm')) end proc, 0 .. 100, useunits = [Unit('mm'), Unit('kN')/Unit('mm')^2])

``

Plot_function_with_units_ac3.mw

[edit] How you approach this may well depend on what you start with. If you have the liberty of entering the initial expression passed to exp (or sin and cos) then it is easier since you can use a replacement symbol for Pi. My suggestions below are more for the case that you've already obtained the -1/2+1/2*I*3^(1/2) form. [/edit]

Here are three related ways.

The first two include examples of printing the inert % form of sin and cos calls without getting the gray elements in the output.

The third way simply delays evaluation (and in consequence is fragile because any subsequent full evaluation undoes the effect).

restart;

 

ec:=proc(Z) local t:=argument(Z);
            abs(Z)*(%cos(t)+I*%sin(t));
    end proc:

 

z:=17*exp(I*2*Pi/3);

-17/2+((17/2)*I)*3^(1/2)

ec(z);

17*%cos((2/3)*Pi)+(17*I)*%sin((2/3)*Pi)

InertForm:-Display(ec(z), inert=false);

17*%cos((2/3)*Pi)+(17*I)*%sin((2/3)*Pi)

value(ec(z));

-17/2+((17/2)*I)*3^(1/2)

restart;

 

ec:=proc(Z) local t:=argument(Z);
            abs(Z)*(%cos(t)+I*%sin(t));
    end proc:

`print/%sin` := Z->'sin'(Z):
`print/%cos` := Z->'cos'(Z):

 

z:=17*exp(I*2*Pi/3);

-17/2+((17/2)*I)*3^(1/2)

ec(z);

17*%cos((2/3)*Pi)+(17*I)*%sin((2/3)*Pi)

value(ec(z));

-17/2+((17/2)*I)*3^(1/2)

restart;

 

ec2:=proc(Z) local t:=argument(Z);
            abs(Z)*('cos'(t)+I*'sin'(t));
    end proc:

 

z:=17*exp(I*2*Pi/3);

-17/2+((17/2)*I)*3^(1/2)

foo:=ec2(z);

17*cos((2/3)*Pi)+(17*I)*sin((2/3)*Pi)

eval(foo,1);

17*cos((2/3)*Pi)+(17*I)*sin((2/3)*Pi)

foo;

-17/2+((17/2)*I)*3^(1/2)

 

Download inert_rcistheta.mw

You may also use InertForm:-Display to show the %Pi from Carl's Answer without the gray symbol. Eg,

bar:=cos(2*%Pi/3)+I*sin(2*%Pi/3);
InertForm:-Display(bar, inert=false);
value(bar);

But in that case you cannot so easily extend the `print` facility to make that aspect automatic.

It is possible to adjust the underlying code so that it also colors (extended typesetting mode) typeset math.

The following seems to work ok for me in Maple 2016.2 through to Maple 2019.0.

Tabulate_mathcolor_hotedit.mw

I don't think that you are doing anything wrong. It's not easy to handle the (possible) splitting fields always best, in general. But your example shows that there's likely something to improve. (I'm submitting a bug report.)

restart:

M:=Matrix(3, 3, [[-2*lambda-kappa__c, -2*sqrt(2)*g, 0],
                 [(1/2)*g*N*sqrt(2), -lambda-(1/2)*kappa__c-gamma__phi,
                  -sqrt(2)*g], [0, g*N*sqrt(2), -2*gamma__phi]]);

Matrix(3, 3, {(1, 1) = -2*lambda-`#msub(mi("κ",fontstyle = "normal"),mi("c"))`, (1, 2) = -2*sqrt(2)*g, (1, 3) = 0, (2, 1) = (1/2)*g*N*sqrt(2), (2, 2) = -lambda-(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`, (2, 3) = -sqrt(2)*g, (3, 1) = 0, (3, 2) = g*N*sqrt(2), (3, 3) = -2*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`})

evals, evecs:=LinearAlgebra:-Eigenvectors(M):

EX := ee ->
  subsindets(ee,And(RootOf,satisfies(u->nops(u)>1 and
                                     type(op(2,u),
                                          identical(index)=posint))),
             u->[allvalues(RootOf(op(1,u)),explicit)][rhs(op(2,u))]):

EX(evals);

Vector(3, {(1) = -lambda-(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`+(1/2)*sqrt(-16*N*g^2+4*lambda^2+4*lambda*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-8*lambda*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`^2-4*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`+4*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`^2), (2) = -lambda-(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`-(1/2)*sqrt(-16*N*g^2+4*lambda^2+4*lambda*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-8*lambda*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`^2-4*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`+4*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`^2), (3) = -lambda-(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`})

subsindets(%,radical,u->map(collect,u,g,simplify));
 

Vector(3, {(1) = -lambda-(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`+(1/2)*sqrt(-16*N*g^2+(2*lambda+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-2*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`)^2), (2) = -lambda-(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`-(1/2)*sqrt(-16*N*g^2+(2*lambda+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-2*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`)^2), (3) = -lambda-(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`})

EX(evecs):
subsindets(%,radical,u->map(collect,u,g,simplify));

Matrix(3, 3, {(1, 1) = 8*g^2/(lambda+(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`+(1/2)*sqrt(-16*g^2*N+(2*lambda+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-2*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`)^2))^2, (1, 2) = 8*g^2/(lambda+(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`-(1/2)*sqrt(-16*g^2*N+(2*lambda+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-2*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`)^2))^2, (1, 3) = 2/N, (2, 1) = -2*sqrt(2)*g/(lambda+(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`+(1/2)*sqrt(-16*g^2*N+(2*lambda+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-2*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`)^2)), (2, 2) = -2*sqrt(2)*g/(lambda+(1/2)*`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`-(1/2)*sqrt(-16*g^2*N+(2*lambda+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-2*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`)^2)), (2, 3) = -(1/4)*sqrt(2)*(2*lambda+`#msub(mi("κ",fontstyle = "normal"),mi("c"))`-2*`#msub(mi("γ",fontstyle = "normal"),mi("φ",fontstyle = "normal"))`)/(g*N), (3, 1) = 1, (3, 2) = 1, (3, 3) = 1})

 

Download evals_ac.mw

I have previously submitted bug reports for examples such as this where simplify(...,size) does not compress as much as can a judicious collect with simplification of the ensuing coefficients.

In this example that situation occurs for the subexpression within the radical.

I have an oracle that speculatively tries collecting w.r.t. the relevant names in the subexpression (sum), and indicates which compresses well or best. Hence the following suggestions, relating to collect w.r.t. g. These vary a little because more generally you may or may not want other kinds of simplification effects:

restart:

expr1:=-lambda-(1/2)*kappa__c
       -gamma__p-(1/2)*sqrt(-16*N*g^2+4*lambda^2-8*lambda*gamma__p
                            +4*lambda*kappa__c
                            +4*gamma__p^2-4*gamma__p*kappa__c
                            +kappa__c^2):

desired_form:=1/2*(-2*gamma__p - kappa__c - 2 *lambda
              - sqrt(-16*N*g^2 + (-2 * gamma__p
              + kappa__c + 2 * lambda)^2)):
desired_form;

-gamma__p-(1/2)*kappa__c-lambda-(1/2)*(-16*N*g^2+(-2*gamma__p+kappa__c+2*lambda)^2)^(1/2)

subsindets(expr1,radical,u->map(collect,u,g,simplify));

-gamma__p-(1/2)*kappa__c-lambda-(1/2)*(-16*N*g^2+(-2*gamma__p+kappa__c+2*lambda)^2)^(1/2)

subsindets(expr1,radical,u->map(collect,u,g,uu->simplify(uu,size)));

-gamma__p-(1/2)*kappa__c-lambda-(1/2)*(-16*N*g^2+(-2*gamma__p+kappa__c+2*lambda)^2)^(1/2)

subsindets(expr1,`+`,u->frontend(collect,[u,g,simplify]));

-gamma__p-(1/2)*kappa__c-lambda-(1/2)*(-16*N*g^2+(-2*gamma__p+kappa__c+2*lambda)^2)^(1/2)

subsindets(expr1,`+`,u->frontend(collect,[u,g,uu->simplify(uu,size)],
                                 [{`+`,`*`},{}],uu->simplify(uu,size)));

-gamma__p-(1/2)*kappa__c-lambda-(1/2)*(-16*N*g^2+(-2*gamma__p+kappa__c+2*lambda)^2)^(1/2)

Download simplification_under_sqrt_ac.mw

Even if you use 2D Input mode the methodology of assigning a procedure with the syntax f(x) := ... is a bad idea, not least because it is ambiguous syntax that can easily lead to problems.

There are a variety of ways to accomplish the substitution for s2 within the procedure body.

First, in 2D Input,

restart

f := proc (x) options operator, arrow; x^2*s2+x+1+s2 end proc

proc (x) options operator, arrow; x^2*s2+x+1+s2 end proc

f(2)

5*s2+3

g := subs(s2 = 9, eval(f))

proc (x) options operator, arrow; 9*x^2+x+10 end proc

g(2)

48

h := subs(s2 = 9, proc (x) options operator, arrow; x^2*s2+x+1+s2 end proc)

proc (x) options operator, arrow; 9*x^2+x+10 end proc

h(2)

48

s := subs(s2 = 9, unapply(s2*x^2+s2+x+1, x))

proc (x) options operator, arrow; 9*x^2+x+10 end proc

s(2)

48

t := unapply(subs(s2 = 9, s2*x^2+s2+x+1), x)

proc (x) options operator, arrow; 9*x^2+x+10 end proc

t(2)

48

``

Download subs_proc_2D.mw

And now in 1D Maple Notation,

restart;

f := x -> x^2*s2+x+1+s2;

proc (x) options operator, arrow; x^2*s2+x+1+s2 end proc

f(2);

5*s2+3

g := subs(s2=9, eval(f));

proc (x) options operator, arrow; 9*x^2+x+10 end proc

g(2);

48

h := subs(s2=9, x -> x^2*s2+x+1+s2);

proc (x) options operator, arrow; 9*x^2+x+10 end proc

h(2);

48

s := subs(s2=9, unapply(x^2*s2+x+1+s2, x));

proc (x) options operator, arrow; 9*x^2+x+10 end proc

s(2);

48

t := unapply(subs(s2=9, x^2*s2+x+1+s2), x);

proc (x) options operator, arrow; 9*x^2+x+10 end proc

t(2);

48

 

Download subs_proc.mw

In the case that you have already assigned to s2 then you can use the unapply command directly. Eg,

s2 := 9:

f := unapply(x^2*s2+x+1+s2, x);

                   2
      f := x -> 9 x  + x + 10

f(2);

                48

As for how the body of the procedure gets pretty-printed (formatted as 2D Math), or not, you have a few alternatives.

restart;

s2 := 9:

f := unapply(x^2*s2+x+1+s2, x);

                   2
      f := x -> 9 x  + x + 10

lprint(eval(f));    # line-printing

  x -> 9*x^2+x+10

sprintf("%a", eval(f));    # as a string

           "x -> 9*x^2+x+10"

sprintf("%-P", eval(f));  # Maple 2019.0

         "x -> 9*x^2 + x + 10"

showstat(f);

  f := proc(x)
     1   9*x^2+x+10
  end proc

You could also set interface(prettyprint=1) (or 0) but keep in mind that would affect display of other expressions as well.

Why not scale down the 1014x1024 pixel image before using it? That should reduce the memory allocation by the kernel. (I chose 50x50, but you could experiment.)


 

restart;

with(plots): with(ImageTools):

imgsmaller := Scale(Read(cat(kernelopts(homedir),"/mapleprimes/smile.jpg")),1..50):
op(2,imgsmaller);

1 .. 50, 1 .. 50, 1 .. 3

str:="","","","","","","","","","","?":
location_func,dy,dz:=3*sin(2*3.14/10*y),.75,.75:

Asmaller := display(seq(display(textplot3d([0,1,4.5,cat(str[1..ha])],align='right'),
                                textplot3d([0,3.5,-4.5,"By Janesefor ~"],align='right'),
                                plot3d([0,s,t],subs(y=ha-1,
                                                    [s=y-dy..y+dy,
                                                     t=location_func-dz..location_func+dz])[],
                                       image=imgsmaller,axes=none,scaling=constrained,
                                       orientation=[180,90,-180],view=[default,0..10,-5..5],
                                       glossiness=0,lightmodel=light4)),
                        ha=[`$`(1..nops([str]))]),
                    insequence=true):

Asmaller;

Download smile_acc.mw

Also, here is a way to animate it as a 2D plot. (I used parts of a method from this old post, where the data of an image can be used as the color data of a densityplot structure.) I made it with 22 frames and displayed it with size=[500,500], but you could change those.

restart;

with(plots): with(ImageTools): with(ArrayTools):

imgsc := Scale(Read(cat(kernelopts(homedir),
                    "/mapleprimes/smile.jpg")),1..50):

(m,n) := Width(imgsc), Height(imgsc);

50, 50

C := Alias(imgsc,[m*n,3]):
DataTranspose(C,n,m,1): # acts inplace
img := FlipDimension(Alias(C,[m,n,3]),2):
(imgsc,C) := 'imgsc','C': gc();

zeromn := Matrix(1..m,1..n,datatype=float[8]):

putface:=proc(a,b)
     PLOT(GRID(a..a+1, b..b+1, ArrayTools:-Alias(zeromn),
               COLOR(RGB,ArrayTools:-Alias(img))),
          STYLE(PATCHNOGRID));
end proc:

str:="","","","","","","","","","","?":
location_func,dy,dz:=3*sin(2*3.14/10*y),.75,.75:

numframes := 22;
A := animate(display,['putface(t,3*sin(2*3.14/10*t))',
                      textplot([5,4.5,
                               'cat'('seq'([str][i],i=1..floor(1+t)))]),
                      gridlines=false, scaling=unconstrained,
                      axes=none, view=[default,-3.0..5.0]],
             t=0..10,frames=numframes,paraminfo=false):

22

plots:-display(A, size=[500,500], insequence);

Download smile_acer.mw

Do you mean custom tickmarks along the axis?  If so then try searching the Maple Help for tickmarks.

You might try making sure that you have the latest point-release update for Maple 2016. That is a free download if you already have a valid installation of Maple 2016. (You can also check for updates within Maple's main menubar.)

The update to Maple 2016.2 is available here. It includes changes in the point-release(s) before it, eg. Maple 2016.1.

(One reason I mention this is that the update Maple 2016.1 release notes specifically mentions some "Enhancements to Maple's context-sensitive menus" to right-click context-menus. So perhaps that might address some of your performance issues.)

If the problems persist, then more details might help diagnose the problem. What packages, if any, do you have loaded when the context-menu is slow to generate and display? Is it only slow the first time in a session, including following any restart? Is it slow for a particular kind of expression? And, as Carl queried, do you have the language set to something other then English?

Maple has its own 3rd-party installer and uninstaller. While Maple itself (once installed) is 64-bit, its installer has some 32-bit runtime components.

So to install Maple 2018 or 2019 for Debian it is necessary to have some 32-bit compatibility packages installed. See this Maplesoft Tech Support page for a list (which includes a Debian note).

Yes, in principle it's possible to run Maple on Debian.

You can map the expand command over a matrix or Matrix.

The simplify command will map automatically over those, in modern Maple.

restart;
# Using lowercase matrix

Ts:=matrix([[cos(omega*t), cos(omega*t-2/3*Pi), cos(omega*t+2/3*Pi)],
            [sin(omega*t), sin(omega*t-2/3*Pi), sin(omega*t+2/3*Pi)],
            [1/2, 1/2, 1/2]]):

Xin:=matrix([[cos(omega*t+alpha)],
             [cos(omega*t+alpha-2/3*Pi)],
             [cos(omega*t+alpha+2/3*Pi)]]):

map(simplify@expand,linalg:-multiply(Ts, Xin));

Matrix(3, 1, {(1, 1) = (3/2)*cos(alpha), (2, 1) = -(3/2)*sin(alpha), (3, 1) = 0})

simplify(map(expand,linalg:-multiply(Ts, Xin)));

Matrix(3, 1, {(1, 1) = (3/2)*cos(alpha), (2, 1) = -(3/2)*sin(alpha), (3, 1) = 0})

restart;
# Using capitalized Matrix

Ts:=Matrix([[cos(omega*t), cos(omega*t-2/3*Pi), cos(omega*t+2/3*Pi)],
            [sin(omega*t), sin(omega*t-2/3*Pi), sin(omega*t+2/3*Pi)],
            [1/2, 1/2, 1/2]]):

Xin:=Matrix([[cos(omega*t+alpha)],
             [cos(omega*t+alpha-2/3*Pi)],
             [cos(omega*t+alpha+2/3*Pi)]]):

map(simplify@expand, Ts . Xin);

Vector(3, {(1) = (3/2)*cos(alpha), (2) = -(3/2)*sin(alpha), (3) = 0})

simplify(map(expand, Ts . Xin));

Vector(3, {(1) = (3/2)*cos(alpha), (2) = -(3/2)*sin(alpha), (3) = 0})

 

Download map_expand_matrix.mw

First 154 155 156 157 158 159 160 Last Page 156 of 336