Gillee

152 Reputation

7 Badges

4 years, 83 days

MaplePrimes Activity


These are questions asked by Gillee

Hi,

Is there a way to change the font type and size when printing a table of data using DocumentTools:-Tabulate? Also can I change the column width?

DocTabFont.mw

Hi,

I was wondering why each time solve is executed, I get a different of number of solutions and can I specify the number of solutions?

 

Thanks so much for taking time to answering this question.

 



Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/number_of_solutions.mw .
 

I don't way the above error happened. But here is my worksheet below.

Download number_of_solutions.mw

restart:
with(plots):
kernelopts(version);
 

How do I setup solve to find only the real and imaginary part of Zeta to be both positive and the real part of Zeta to be the smallest positive value? For example: real part = 1.348412872 and imaginary part = 0.04230725448.

Acceleration ratio (db) and phase (deg). Convert ratio to linear and phase to radian. 
dat := <14.52407334|-162.1310124>:
A := 10^(dat[1]/20.):
phi := dat[2]*Pi/180.:
R:= 0.3036:
Characteristic equation Eqn 5
f := (Zeta,A,phi) -> cos(Zeta) - R * Zeta * sin(Zeta) - exp(-phi * I)/A:

soln := [solve(f(Zeta,A,phi), Zeta)]:
 

Tests.mw

Hi,


I was applying the Grip Map to the procedure LArip. It apparently finished in less than 5 seconds. But when I wanted to display the results as an Array, this step required minutes. How can this time be reduced? Here is a piece of the code:

n := 8;
r := 2^n;
M := Vector(r, randperm(r) + [-seq(1, i = 1 .. r)], datatype = integer[4]);

LArip := proc(k::integer, r::integer, M::Vector(datatype = integer[4]))
local N, j, t, i, A;
N := Vector(r, 0); A := Vector(r, 0);
i := k - 1;
for j from 0 to r - 1 do
for t from 0 to r - 1 do
N[t + 1] := Occurrences(1, Split(Xor(And(t, i), And(M[t + 1], j)))) mod 2;
end do;
A[j + 1] := Occurrences(0, convert(N[], list));
end do;
return convert(A, list);
end proc;

infolevel[Grid:-Map] := 3;
rt := time[real]();
Bb := Grid:-Map(k -> LArip(k, r, M), [$ (1 .. r)]);
GridMapTime := time[real]() - rt;
 

The worksheet is here:

Magma_GridMap.mw

Thank you for your help.

Hi,

I was hoping to run two procs: tgf3 and tgf4 in parallel using Grid, Run and get a faster execution time. As I understood the description of Grid Run, the first call to Grid Run will run in the background and before it is finished the second call Grid Run will start. I do not believe I have that situation in my script. I am not understanding Grid Run. How can this problem be fixed? Here is just a portion of the script using Grid Run:

Use Grid Run 0 for tgf3 and 1 for tgf4. Determine the real time and compare times. The Grid Runs do not appear to run in parallel.

rgt := time[real]();
Grid:-Run(0, `~`[tgf3@op](convert(L, listlist)), 'assignto' = ans3roots);
Grid:-Run(1, `~`[tgf4@op](convert(L, listlist)), 'assignto' = ans4roots);
ans3roots;
ans4roots;

GridRunTime := time[real]() - rgt;
                     GridRunTime := 44.074

Here is my script:

Grid_Run_2.mw

 

Thank you for your help.

1 2 3 Page 1 of 3