Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 341 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

Choose view that doesn't include vertical lines with negative x, something like view=[0..6,0..1.5]. I don't think that I chose framed axes and 500 numpoints - I just modified that guy's example. They can be added to the options in the display command. Many other options can be added, see ?plot,option __________ Alec Mihailovs http://mihailovs.com/Alec/
Choose view that doesn't include vertical lines with negative x, something like view=[0..6,0..1.5]. I don't think that I chose framed axes and 500 numpoints - I just modified that guy's example. They can be added to the options in the display command. Many other options can be added, see ?plot,option __________ Alec Mihailovs http://mihailovs.com/Alec/
For example,
f := 2*a*tan(t):

coeff(f,tan(t));

                                 2 a

remove(type,f,function);

                                 2 a

subsindets(f,function,1);

                                 2 a

eval(f,tan=1);

                                 2 a

select(type,f,atomic);
                                 2 a
_________ Alec Mihailovs http://mihailovs.com/Alec/
For example,
f := 2*a*tan(t):

coeff(f,tan(t));

                                 2 a

remove(type,f,function);

                                 2 a

subsindets(f,function,1);

                                 2 a

eval(f,tan=1);

                                 2 a

select(type,f,atomic);
                                 2 a
_________ Alec Mihailovs http://mihailovs.com/Alec/
For example,
f:=2*a+5*b+3.4*c:
 
`+`(coeffs(f));
                                 10.4
or
subsindets(f,name,1);
                                 10.4
or
map2(op,1,f);
                                 10.4
or
map(lcoeff,f);
                                 10.4
or
norm(f,1);
                                 10.4
(this one is shorter, but it is inefficient and gives the sum of coefficients only if the coefficients are non-negative.) __________ Alec Mihailovs http://mihailovs.com/Alec/
For example,
f:=2*a+5*b+3.4*c:
 
`+`(coeffs(f));
                                 10.4
or
subsindets(f,name,1);
                                 10.4
or
map2(op,1,f);
                                 10.4
or
map(lcoeff,f);
                                 10.4
or
norm(f,1);
                                 10.4
(this one is shorter, but it is inefficient and gives the sum of coefficients only if the coefficients are non-negative.) __________ Alec Mihailovs http://mihailovs.com/Alec/
Jan, Even if rotation on 90, 180, and 270 degrees can be done quite easily (as in that example), it is certainly good to have a command for that. What values for the second argument will be possible? Would that be possible to rotate on 30, or 60 degrees? What about reflections? And homothety? Crop? I am anxious to get Maple 11 to see what other editing operations are available. Wow, I just noticed View instead of Preview. Does that mean that the picture (or plot) will be displayed in all available space (and without axes)? Thank you, __________ Alec Mihailovs http://mihailovs.com/Alec/
That would give wrong values to the coefficients (the order is wrong),
a,b,c := coeffs(rhs(eq_fit),x);

                         a, b, c := -4, 3, 1
The following works in this example,
c,b,a:=coeffs(rhs(eq_fit),x);

                         c, b, a := -4, 3, 1
but one can't depend on that, the coefficients in coeffs are not ordered according to the degrees (of x in this case). The following is more robust,
a,b,c:=seq(coeff(rhs(eq_fit),x,i),i=2..0,-1);

                         a, b, c := 1, 3, -4
Patmatch also can be used,
patmatch(rhs(eq_fit),a::integer*x^2+b::integer*x+c::integer,S);
                                 
                               true

S;

                        [a = 1, b = 3, c = -4]
but I don't think that that is his (or her) problem. It looks as if he (or she) is trying to find a way to calculate these coefficients manually, step by step, without using fit commands. __________ Alec Mihailovs http://mihailovs.com/Alec/
That would give wrong values to the coefficients (the order is wrong),
a,b,c := coeffs(rhs(eq_fit),x);

                         a, b, c := -4, 3, 1
The following works in this example,
c,b,a:=coeffs(rhs(eq_fit),x);

                         c, b, a := -4, 3, 1
but one can't depend on that, the coefficients in coeffs are not ordered according to the degrees (of x in this case). The following is more robust,
a,b,c:=seq(coeff(rhs(eq_fit),x,i),i=2..0,-1);

                         a, b, c := 1, 3, -4
Patmatch also can be used,
patmatch(rhs(eq_fit),a::integer*x^2+b::integer*x+c::integer,S);
                                 
                               true

S;

                        [a = 1, b = 3, c = -4]
but I don't think that that is his (or her) problem. It looks as if he (or she) is trying to find a way to calculate these coefficients manually, step by step, without using fit commands. __________ Alec Mihailovs http://mihailovs.com/Alec/
For example,
X,Y:=<1,2,3,4>,<0,6,14,24>:
Statistics:-NonlinearFit(a*t^2+b*t+c,X,Y,t,output=parametervalues);

  [a = 0.99999999999999988, b = 3.00000000000000088,

        c = -4.00000000000000088]

convert(%,rational);

                        [a = 1, b = 3, c = -4]
_________ Alec Mihailovs http://mihailovs.com/Alec/
For example,
X,Y:=<1,2,3,4>,<0,6,14,24>:
Statistics:-NonlinearFit(a*t^2+b*t+c,X,Y,t,output=parametervalues);

  [a = 0.99999999999999988, b = 3.00000000000000088,

        c = -4.00000000000000088]

convert(%,rational);

                        [a = 1, b = 3, c = -4]
_________ Alec Mihailovs http://mihailovs.com/Alec/
Just op it. __________ Alec Mihailovs http://mihailovs.com/Alec/
Just op it. __________ Alec Mihailovs http://mihailovs.com/Alec/
draw3d is the best choice in many cases for drawing graphs. And the plot can be rotated using a mouse. __________ Alec Mihailovs http://mihailovs.com/Alec/
draw3d is the best choice in many cases for drawing graphs. And the plot can be rotated using a mouse. __________ Alec Mihailovs http://mihailovs.com/Alec/
First 146 147 148 149 150 151 152 Last Page 148 of 180