sand15

360 Reputation

10 Badges

5 years, 296 days

MaplePrimes Activity


These are questions asked by sand15

Hi,

Let a in ] 0, 1[  and  x real

Let  f := sin(x) / ( ( sin(a*x) )^a * ( sin((1-a)*x) )^(1-a) );

How can I find the limit of f as x goes to 0 ?
(limit, series, taylor don't work, wether I set or not assumptions on "a" [assume/assuming])

PS 1:  the limit is found once a numeric value is given to alpha

PS 2:  By simple calculations:
           sin(x) ~x  ;  sin(a*x) ~ ax  ; sin((1-a)*x) ~(1-a)x and thus
          ==>  f(x->0) ~ x / ( -a*x)^a * ((1-a)*x)^(1-a) )
                              = x / ( -a^a * (1-a)^(1-a) * x^(a+1-a)
                              = 1 /  ( -a^a * (1-a)^(1-a)  )

Hi,

Is it possible to write the title of a plot on two different lines with different fonts for each line?
For instance:

MyTitle := typeset("Identity function", "\n(illustration));
plot(x, x=0..1, title=MyTitle);

with the upper line  [times, bold, 14]
and the lower one   [times, roman, 12]

 

Hi,

I use the first example in the HeatMap help page.

restart:
with(Statistics):
RM := LinearAlgebra:-RandomMatrix(10):
HeatMap(RM);

I want to replace each tickmarks k (k=1..10) by cat(`A`, k).
So I do

NewTickMarks := [seq(k+1/2=cat(`A`, k), k=1..10)]:
HeatMap( RM, tickmarks=[NewTickMarks , NewTickMarks ] );

The horizontal tickmarks are displayed as expected: why the vertical tickmarks do not appear?

PS : HeatMap( RM, tickmarks=[NewTickMarks , default] ) changes the horizontal tickmarks without removing the vertical ones.

Thnks for the help
 

Hi everiboty


This is a notional example derived from my real application.
I have different quantities named Object1, Object2, ... ObjectN (N being a nonnegative integer) and a boolean sequence A of length N.
By construction A contains only one "true" values (and thus N=-1 "false").
I wrote a procedure Choice that takes as input such a sequence and returns the single object among Object1, ... ObjectN for which [A][n]=true.

I know that it would have been clever to name the quantities Object1, ... ObjectN differently (for instance by indexing them), but I'm constrained by what already exists.
Here is my procedure

restart:
Choice := proc(a)
  local l, n, object:
  l := [seq(args(k), k=1..nargs)]:
  n := ListTools:-Search(true, l):
  object := Object||n:
  print(object):
end proc:

# a few examples of Object(s)
Object1 := {x1, y1, z1}: 
Object2 := {x2, y2}:
Object3 := {x3}:

# application:
A := false, true, false:
Choice(A);

    {x2, y2}


Now I want to insert this procedure within a another one named “f”:
restart:

f := proc():
local Object1, Object2, Object3:
local Choice, A:
Choice := proc(a)

  local l, n, object:
  l := [seq(args(k), k=1..nargs)]:
  n := ListTools:-Search(true, l):
  object := Object||n:
  print(object):
end proc:

Object1 := {x1, y1, z1}: 
Object2 := {x2, y2}:
Object3 := {x3}:

# here I give A some values, in the true application A is the sequence
# returned by a Maplet through a Shutdown command
# More precisely A correspond to “N” buttons of the same group … then
# only one is “true”.

A := false, true, false:
Choice(A);
end proc;

f();

    Object2

 


Replacing print(object): by print(eval(object)): within procedure  Choice produces  the same ‘uneval’ answer.

I cannot figure out why procedure f doesn’t return the expected {x2, y2} answer
The only workaround I have found is to replace
  object := Object||n:
  print(object):


by this awfull sequence
    if n=1 then print(Object1)
  elif n=2 then print(Object1)
  …
  end if


Could you please help me to understand where is my error and how could I fix it?

Thanks in advance

Hi all,

I use GraphTheory:-DrawGraph (Maple 2018)
Is there a simple way to suppress or modify the ellipses plotted around a vertex ?

(by "simple" I mean: without using plootools:-getdata and doing some ad hoc modifications)

Thanks for your help


BTW: I'm asking you this because DrawGraph returns poor results in some situations:

with(GraphTheory):
g := Graph({{"azertyuiopqsdfghjklmwxcvbn", 1}, {"azertyuiopqsdfghjklmwxcvbn", 2}}):
DrawGraph(g, style=tree, root="azertyuiopqsdfghjklmwxcvbn")

4 5 6 7 8 9 10 Last Page 6 of 18