Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 338 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

uses allows skipping module names for the procedures from that module. For example, since I included Maplets in the uses line, I was able to write just Display(m) at the end of the procedure, instead of Maplets:-Display(m). I used Get and Set from Maplets:-Tools. It contains some other useful things, the description of which can be found in ?Maplets,Tools. The end in the middle of the procedure T was the end of function g. The end of T is after Display(m) at the end. T() at the end is a call to procedure T. f, g, and m are declared global so that functions f and g could access maplet elements while the maplet m is displayed. Certainly, you can specify the size of the maplet in the Window element (as well as in many other elements),
with(Maplets:-Elements):
m := Maplet(Window(height=400,width=600,[])):
Maplets:-Display(m);
By the way, Standard Maple has Maplet Builder that is quite convenient for creating Maplets of medium complexity, see ?MapletBuilder . __________ Alec Mihailovs http://mihailovs.com/Alec/
uses allows skipping module names for the procedures from that module. For example, since I included Maplets in the uses line, I was able to write just Display(m) at the end of the procedure, instead of Maplets:-Display(m). I used Get and Set from Maplets:-Tools. It contains some other useful things, the description of which can be found in ?Maplets,Tools. The end in the middle of the procedure T was the end of function g. The end of T is after Display(m) at the end. T() at the end is a call to procedure T. f, g, and m are declared global so that functions f and g could access maplet elements while the maplet m is displayed. Certainly, you can specify the size of the maplet in the Window element (as well as in many other elements),
with(Maplets:-Elements):
m := Maplet(Window(height=400,width=600,[])):
Maplets:-Display(m);
By the way, Standard Maple has Maplet Builder that is quite convenient for creating Maplets of medium complexity, see ?MapletBuilder . __________ Alec Mihailovs http://mihailovs.com/Alec/
One can make elements to appear or to disappear by using visible option. See, for example, my A simple Maplet example on this site. __________ Alec Mihailovs http://mihailovs.com/Alec/
One can make elements to appear or to disappear by using visible option. See, for example, my A simple Maplet example on this site. __________ Alec Mihailovs http://mihailovs.com/Alec/
First, your first 1) question. It is easy to do if you want to have integers in the sqrt form only temporarily,
f:=t->'sqrt(t^2)':

f(3);
                               sqrt(9)

%;

                               3
If you want to have them in sqrt form permanently, it is tricky, but also possible (the idea belongs to Joe Riel). The following procedure does that,
f:=t->sscanf(cat("*$",sprintf("%m",t^2),"#\"\"\"\"\"#"),"%m")[]:
For example,
f(3);
                                  
                                 sqrt(9)

%;
                                 sqrt(9)

evalf(%);
                             3.000000000
The second 1) question. You can put 2 or more solve commands on one line, separated by commas, as I did in one of the examples earlier. For example,
solve(y=0),solve(y=1);

                                 0, 1
The 2) question. Same as the above, just put all commands on the same line, separated by commas,
subs(t=2,y(t)), subs(t=3,y(t));
                              y(2), y(3)

subs(t=2,y(t))*`  for t=2,   `*subs(t=3,y(t))*`  for t=3`;

                  y(2)   for t=2,    y(3)   for t=3
______________ Alec Mihailovs http://mihailovs.com/Alec/
First, your first 1) question. It is easy to do if you want to have integers in the sqrt form only temporarily,
f:=t->'sqrt(t^2)':

f(3);
                               sqrt(9)

%;

                               3
If you want to have them in sqrt form permanently, it is tricky, but also possible (the idea belongs to Joe Riel). The following procedure does that,
f:=t->sscanf(cat("*$",sprintf("%m",t^2),"#\"\"\"\"\"#"),"%m")[]:
For example,
f(3);
                                  
                                 sqrt(9)

%;
                                 sqrt(9)

evalf(%);
                             3.000000000
The second 1) question. You can put 2 or more solve commands on one line, separated by commas, as I did in one of the examples earlier. For example,
solve(y=0),solve(y=1);

                                 0, 1
The 2) question. Same as the above, just put all commands on the same line, separated by commas,
subs(t=2,y(t)), subs(t=3,y(t));
                              y(2), y(3)

subs(t=2,y(t))*`  for t=2,   `*subs(t=3,y(t))*`  for t=3`;

                  y(2)   for t=2,    y(3)   for t=3
______________ Alec Mihailovs http://mihailovs.com/Alec/
Some information about what is happening can be obtained by setting infolevel to some number greater than 1. For example,
infolevel[all]:=10:
would, probably, give more information than you would like to know. Also, setting printlevel to a higher level, such as
printlevel:=10:
or higher would give a lot of information including polynomial coefficients. It seems as if remez method fails in this example, and it is not completely clear whether it is Maple's fault (that could be more or less easily fixed), or remez method's fault (that can be fixed only by using some other method.) __________ Alec Mihailovs http://mihailovs.com/Alec/
Some information about what is happening can be obtained by setting infolevel to some number greater than 1. For example,
infolevel[all]:=10:
would, probably, give more information than you would like to know. Also, setting printlevel to a higher level, such as
printlevel:=10:
or higher would give a lot of information including polynomial coefficients. It seems as if remez method fails in this example, and it is not completely clear whether it is Maple's fault (that could be more or less easily fixed), or remez method's fault (that can be fixed only by using some other method.) __________ Alec Mihailovs http://mihailovs.com/Alec/
afg1=0 and afg1=1 can not happen simultaneously - either afg1 is 0, or 1, but not both at the same time. I didn't actually advise solve({K,y=6}), I adviced solve({K,afg1}). I still don't understand your problem. I might better understand it if you said what result you would like to get. __________ Alec Mihailovs http://mihailovs.com/Alec/
afg1=0 and afg1=1 can not happen simultaneously - either afg1 is 0, or 1, but not both at the same time. I didn't actually advise solve({K,y=6}), I adviced solve({K,afg1}). I still don't understand your problem. I might better understand it if you said what result you would like to get. __________ Alec Mihailovs http://mihailovs.com/Alec/
Building lists by adding elements one by one is very inefficient, especially for large lists. The same thing with assigning list elements. That's why - to prevent users from using such an inefficient technique, the original designers of Maple made this restriction on assigning elements for lists with more than 100 elements,
L:=[$1..100]:
L[1]:=5;
                              L[1] := 5
L:=[$1..101]:
L[1]:=5;
Error, assigning to a long list, please use Arrays
The best way is to use tables as in my example in Simple question about increasing the size of a Matrix thread, or Arrays, as the error message advices. It shouldn't be a big problem to replace lists with Arrays, I think, especially if the code is not that long. ______________ Alec Mihailovs http://mihailovs.com/Alec/
Building lists by adding elements one by one is very inefficient, especially for large lists. The same thing with assigning list elements. That's why - to prevent users from using such an inefficient technique, the original designers of Maple made this restriction on assigning elements for lists with more than 100 elements,
L:=[$1..100]:
L[1]:=5;
                              L[1] := 5
L:=[$1..101]:
L[1]:=5;
Error, assigning to a long list, please use Arrays
The best way is to use tables as in my example in Simple question about increasing the size of a Matrix thread, or Arrays, as the error message advices. It shouldn't be a big problem to replace lists with Arrays, I think, especially if the code is not that long. ______________ Alec Mihailovs http://mihailovs.com/Alec/
Jan, Using Maplets is a brilliant idea! I should respond earlier, but I planned to include it in my Simulation of Brownian Motion blog entry. However, time went by, and for reasons expressed in my answer to Axel Vogt in Numerical Inverse Laplace Transform (at the end of the thread), my interest to that topic has vanished. Nevertheless, I am sure that I will use it many times later for the solution of other huge plot size problems. Thank you! __________ Alec Mihailovs http://mihailovs.com/Alec/
Like everything, using HTML for input has some advantages and some disadvantages. The main deisadvantage is that < sign and style should be corrected. From my point of view, HTML input has much more advantages than disadvantages: tags for entering 2d math, italics, bold text, underlined, html links, unordered and ordered lists, definition lists, subscripts and superscripts, inserting pictures etc. Perhaps, I would think differently if web development wasn't my second profession though. __________ Alec Mihailovs http://mihailovs.com/Alec/
The system {rs1,rs2} in addition to solutions of the system {eq1,eq2,eq3,eq4} has other solutions. For example, when the lhs of the first term of trs1 equals minus lhs of the second term, and similarly for trs2, and these lhs' are not necessarily zeros, or even when they are zeros, it could be because of cos(ω*δ)=cos(r*ω*δ)=1 independently of values of eq1, eq2, eq3, and eq4. __________ Alec Mihailovs http://mihailovs.com/Alec/
First 153 154 155 156 157 158 159 Last Page 155 of 180