## Alec Mihailovs

Dr. Aleksandrs Mihailovs

## 21 Badges

19 years, 241 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

## Social Networks and Content at Maplesoft.com

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 Posts that have been published by Alec Mihailovs

## Help page for sqrt...

I'd like to see the following examples in the help page for sqrt,

```sqrt(149^3);
```

149*sqrt(149);

```sqrt(151^3);
```

sqrt(3442951);

Alec

## Lexical Table...

Maple

In the recent discussion about patching, a question about patching a function f including local variables of a module or another function was discussed. For example, let it be defined as

```A:=proc() global f,t; local x,y,z;
f:=()->x+y();
y:=()->z;
t:=()->x+z;
x,z:=0,1;
NULL end:
A();
```

Now,

```op(f);
() -> x + y()
f();
1
```

How to change it so that it would return 2 instead of 1, without reassigning it?

## Maple Wiki...

Everybody is invited to Maple Wiki .

It is hosted on Maple Advisor, a Maple community site independent of Maplesoft and/or Mapleprimes.

The site has started just a couple of days ago and doesn't have much of a content yet.

## Bernoulli Distribution with Serial Corre...

A random sample of length n drawn from Bernoulli distribution with probability of success prob, that has a correlation c with itself shifted back lag steps, can be generated using following procedure,

```SampleWithCorr:=proc(prob::And(numeric,satisfies(c->c>=0 and c<=1)),
lag::posint,c::And(numeric,satisfies(c->c<=1 and c>=-1)),n::posint)
local X,B,S,C,s,i;
uses Statistics;
X:=RandomVariable(Bernoulli(prob));
S:=Sample(X,n);
if n<=lag or s=0 then S else
s:=signum(c);
B:=RandomVariable(Bernoulli(abs(c)));
C:=Sample(B,n-lag);
if s=1 then
for i from lag+1 to n do
if C[i-lag]=1 then S[i]:=S[i-lag] fi od;
else for i from lag+1 to n do
if C[i-lag]=1 then S[i]:=1-S[i-lag] fi od
fi fi; S end:
```

## AddAlongDimension with float[8]...

```A:=Matrix(2,3,1,datatype=float[8]);
[1.    1.    1.]
A := [              ]
[1.    1.    1.]

ArrayTools:-AddAlongDimension(A);

[2., 2.]

B:=Matrix(3,10,1,datatype=float[8]);

[1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1.]
[                                               ]
B := [1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1. , 1.]
[                                               ]
```
 First 11 12 13 14 15 16 17 Last Page 13 of 23
﻿