Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I recently prepared a worksheet to teach vector fundamentals in one of my classes, and I wanted to share it with you all. It's nothing special, but I found Maple really helpful in demonstrating the concepts visually. Below is a breakdown of what the worksheet covers, with some Maple code examples included.

Feel free to take a look and use it if you find it useful! Any feedback or suggestions on how to improve it would be appreciated.

restart

NULL

v := `<|>`(`<,>`(2, 3)); w := `<|>`(`<,>`(4, 1))

Matrix(%id = 36893488152076804092)

(1)

Basic Vector Operations

• 

Addition and Subtraction

 

We  can add and subtract vectors easily if they are of the same dimension.

NULL

u_add := v+w; u_sub := v-w

Matrix(%id = 36893488152076803596)

(2)

NULL

NULL

Typesetting[delayDotProduct]((((Triangle(L)*a*w*o*f*A*d*d)*i*t*i)*o*n*o)*f, Vector(s), true)

"The famous triangle law can be used for the addition of vectors and this method is also called the head-to-tail method,As per this law,two vectors can be added together by placing them together in such away that the first vector's head joins the tail of the second vector. Thus,by joining the first vector's tail to the head of the second vector,we can obtain the resultant vector sum."

NULL

with(plots); display(arrow([0, 0], [2, 3], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([2, 3], [4, 1], color = green, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [6, 4], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y], title = "
Triangle Law of Addition of Vectors", titlefont = [times, 20, bold])

 

NULL

NULL

Parallelogram Law of Addition of Vectors

"An other law that can be used for the addition of vectors is the parallelogram law of the addition of vectors*Let's take two vectors v and u,as shown below*They form the two adjacent sides of aparallelogram in their magnitude and direction*The sum v+u is represented in magnitude and direction by the diagonal of the parallelogram through thei rcommon point."

NULL

display(arrow([0, 0], [2, 3], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [6, 4], color = green, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [4, 1], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y], title = "

Parallelogram Law of Addition of Vectors", titlefont = [times, 20, bold])

 

NULL

NULL

NULL

NULL

NULL

NULL

NULL

• 

Scalar Multiplication

We can multiply a vector by a scalar. To multiply a vector by a scalar (a constant), multiply each of its components by the constant.

Suppose we let the letter  λ represent a real number and  u = (x,y) be the vector

v_scaled := 3*v

Matrix(%id = 36893488152152005076)

(3)

NULL

NULL

• 

-Define*the*opposite*vector*v

Error, (in LinearAlgebra:-Multiply) invalid arguments

 

Two vectors are opposite if they have the same magnitude but opposite direction.

v_opposite := -v; vec1 := arrow([0, 0], [2, 3], color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1); vec2 := arrow([0, 0], [-2, -3], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1); display([vec1, vec2], scaling = constrained, title = "Original Vector and its Opposite (-v)")

 
• 

Dot Product

Sometimes the dot product is called the scalar product. The dot product is also an example of an inner product and so on occasion you may hear it called an inner product.

Given the two vectors  `#mover(mi("a"),mo("&rarr;"))` = (x__1, y__1) and `#mover(mi("b"),mo("&rarr;"))` = (x__2, y__2)
 the dot product is, `#mover(mi("a"),mo("&rarr;"))`.`#mover(mi("b"),mo("&rarr;"))` = x__1*x__2+y__1*y__2

`#mover(mi("a"),mo("&rarr;"))`.`#mover(mi("b"),mo("&rarr;"))` = x__1*x__2+y__1*y__2

(4)

`#mover(mi("a"),mo("&rarr;"))` := `<|>`(`<,>`(5, -8))

Matrix(%id = 36893488152255219820)

(5)

`#mover(mi("b"),mo("&rarr;"))` := `<|>`(`<,>`(1, 2))

Matrix(%id = 36893488152255215244)

(6)


display(arrow([0, 0], [5, -8], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [1, 2], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y])

 

 

 

 

 

 

 

 

 

 

 

  with(LinearAlgebra)

dot_product := DotProduct(`#mover(mi("a"),mo("&rarr;"))`, `#mover(mi("b"),mo("&rarr;"))`)

-11

(7)
• 

Vector Norm (Magnitude)

To find the magnitude (or length) of a vector, use Norm.

norm_a := Norm(`#mover(mi("a"),mo("&rarr;"))`, 2); norm_b := Norm(`#mover(mi("b"),mo("&rarr;"))`, 2)

5^(1/2)

(8)
• 

Calculate the Cosine Between Two Vectors

cos_theta := dot_product/(norm_a*norm_b)

-(11/445)*89^(1/2)*5^(1/2)

(9)

angle_radians := arccos(cos_theta)

Pi-arccos((11/445)*89^(1/2)*5^(1/2))

(10)

angle_degrees := evalf(convert(angle_radians, degrees))

121.4295656*degrees

(11)

NULL

We can determine whether two vectors are parallel by using the scalar multiple method or the determinant (area of the parallelogram formed by the vectors) method.

``

• 

Scalar Multiple Method

a := Vector([5, -8]); b := Vector([10, -16]); k := a[1]/b[1]; is_parallel := a[2]/b[2] = k

1/2 = 1/2

(12)
• 

Determinant Method

determinant := a[1]*b[2]-a[2]*b[1]; result := determinant = 0

0 = 0

(13)

 

 

display(arrow([0, 0], [5, -8], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [10, -16], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y], title = "Parallel Vectors")

 

 

 

 

Two vectors a and b are perpendicular (vertical)

NULL

• 

if and only if their dot product is zero

a1 := Vector([1, 2]); b1 := Vector([-2, 1]); dot_product := DotProduct(a1, b1); is_perpendicular := dot_product = 0

0 = 0

(14)

display(arrow([0, 0], [-2, 1], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), arrow([0, 0], [1, 2], difference = true, color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1), scaling = constrained, labels = [x, y], title = "Perpendicular Vectors")

 
• 

Slope Method

slope_a := a1[2]/a1[1]; slope_b := b1[2]/b1[1]; is_perpendicular := slope_a*slope_b = -1

-1 = -1

(15)

NULL

• 

Special case: If one vector is vertical (undefined slope) and the other is horizontal (zero slope), they are perpendicular.

a2 := Vector([0, 3]); b2 := Vector([4, 0]); is_perpendicular := a2[1] = 0 and b2[2] = 0

true

(16)

vec1 := arrow([0, 0], [4, 0], color = blue, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1); vec2 := arrow([0, 0], [0, 3], color = red, shape = double_arrow, width = 0.1e-1, border = false, head_width = .1, head_length = .1); display([vec1, vec2], scaling = constrained, title = "Perpendicular Vectors")

 

NULL

Download vectors.mw

The tab key, and the mouse can be used to trigger completion selection in Maple 2024.1 like previous versions. 

For interface resposiveness, a new option (disabled by default) has been added to the interface tab of Maple 2024.1 Options (available from the Tools menu). Users that prefer to use enter to trigger completion selection can enable the option. 

Change the option here and apply to the session or globally if using enter to trigger completion selection is preferred.

Can we find the conditions on A1, A2, B1, B2, beta1, and beta2 for which numerator of Eq. (1) is zero? ss.mw

I am trying to create a ring of difference operators with customly defined actions. I have managed to get the code to work to an extent, but I am having trouble creating the inverse operators. For example, if Sn sends n to n+2, I want to create Sn^(-1) that sends n to n-2. When I tried to input this into the algebra itself, it gave me the following error: "Error, (in Ore_algebra:-skew_algebra) indeterminate n may appear in a single commutation only". Below is the code that creates the difference algebra. Apologies for the bad formatting.


> with(Ore_algebra);

> CreateDifferenceAlgebra := proc (vars::(list(symbol)), offsets::(list(numeric)))


local actions, i, var, diff_op,
shift_offset, algebra; actions := table();
for i to numelems(vars) do
   var := vars[i];
   diff_op := convert(cat("S",\var), symbol);
   shift_offset := offsets[i];
   actions[diff_op] := (proc (values) options operator, arrow; proc (u, order)
      local res; res := u;
      to order do res := subs(values[1] = values[1]+values[3], res*values[2]) end do;
      res
      end proc

   end proc)([var, diff_op, shift_offset]) end do;


algebra := Ore_algebra:-skew_algebra(seq(shift = [convert(cat("S",

vars[i]), symbol), vars[i]], i = 1 .. numelems(vars)),

action = {seq(convert(cat("S", vars[i]), symbol) =
actions[convert(cat("S", vars[i]), symbol)], i = 1 ..
numelems(vars))}); return algebra end proc


;

 

 

I have angled some test to be parallel to the slope of a line. It tuns out that the text is only parallel if scaling = constrained is used. That is not necasserily pratical for many plots. In prcttice I have a nice proedure for this. Is there any way to pickup the plot x-y scaling factor that maple decides on so I could built that into the procedure. I have manually rescaled her to demonstrate.

mmm...I see the website viewer does not rotate the text.

restart

with(plots):

P1:=[1,2]:P2:=[5/2,3]:

vec:=P2-P1

[3/2, 1]

(1)

ang:=arctan(vec[2],vec[1])

arctan(2/3)

(2)

plt1:=textplot([((P1+P2+[.2,.2])/2)[],"parallel piece of text",rotation=ang]):

plt2:=plottools:-line(P1,P2):

display(plt1,plt2)

 

display(plt1,plt2,scaling=constrained)

 

#scaling factor looks to be 1.5 i.e.delta(x)/delta(y) (2.5-1)/{3/2)

ang1:=arctan(1.5*vec[2],vec[1])

.7853981634

(3)

plt3:=textplot([((P1+P2+[.2,.2])/2)[],"parallel piece of text",rotation=ang1]):

display(plt3,plt2)

 
 

 

Download 2024-10-15_text_not_always_parallel.mw

restart;

{(-x-y+1)*t+n*y^2 = 0, -t*(x+y-1)*k+x = 0, (x+y-1)*(p-s)*k-p*(x-1) = 0, m*y^2+(n*x-m-t)*y-t*(x-1) = 0, n*x^2+(m*y-n-s)*x-s*(y-1) = 0, y*(n*x-n-s+1)+(1-x)*s+p*x-1 = 0, (x+y-1)*(p-s)*k+(-x-y+1)*p-m*x+s*y = 0, ((-x-y+1)*k+y)*t-m*y+m+x-1 = 0}

{0 < k, 0 < m, 0 < n, 0 < p, 0 < x, 0 < y, 0 < (-m*x+p)*t+(s-p)*(m*y-m+1), 0 < (n*x-n-p+1)*t+n*y*(p-s), 0 < (m*x-n*x+n-1)*t+(m*y-n*y-m+1)*s+(n*x-n+1)*(m*y-m+1)-n*y*m*x, 1 < x+y, k < 1, m < 1, n < 1, p < 1}

"solve(equalities union inequalities)", {k = .487116703, m = .656557610, n = .3562602382, p = .1863581607, s = .372716320, t = .8665379799, x = .4642487806, y = 1.635592831}

"------------------------------------------------------------------------------------------------------------------------------"

"solve(equalities)", {k = k, m = m, n = 0., p = 0., s = 0., t = 1., x = 0., y = 1.}, {k = 1., m = 0., n = 1., p = 0., s = 0., t = 1., x = 1., y = 1.}, {k = 2.130395435, m = 1.469396425, n = -1.299895929, p = 2.299895929, s = .8304995051, t = .1695004949, x = -.3611030805, y = .3611030805}, {k = .893308015, m = -1.942064138, n = .8632249760, p = -1.307713373, s = -2.615426746, t = 1.427148086, x = .5879938248, y = .8732201900}

"solve(solve(equalities) union inequalities"

"solve(solve(equalities) union inequalities"

"solve(solve(equalities) union inequalities"

"solve(solve(equalities) union inequalities"

 

NULL

Download problems_with_solve_15.10.24.mw

Hey guys, 

I'm working with Maple to solve sets of 8 equations and 14 inequalities. I use the command solve to get values for my 8 variables. Often there is no solution, sometimes we have one single solution or like a parametric solution. However sometimes this procedure fails to finish the calculation, that means I stop the calculation after a certain time (multiple houres). So now I am looking for some other ways to get the solution. For example I try a two-stage solve-attemp. In the first round I use the solve coammand only for the set of 8 equations. In the second round I take each of the solutions I found in the step before and combine them with the set of inequalities. Then I use solve again for this set. 

However I found out that the two ways I described above lead to diffrent solutions. In my opinion the solutions of solve(equations union inequalities) should be a subset of solve(equations), since all the solutions we find with equations union inequalities has to fullfill the 8 equations we want put into solve(equations). As you can see in the attached file that is not the case. The sets of solutions of solve(equalities union inequalites) and the set of solutions of solve(equalities) is disjoint, so no subset. 
Since I have disjoint sets in the step between, the solutions of solve(equations union inequalities) and the solutions of solve((solve equations) union inequalities) are disjoint as well, so I think the problem is already in the step before. 

I would be really glad if anyone can help me. Either explain me, where my argumentation above went wrong or why I find those solutions which dont fit together. 

Regards
Felix

When i want reploting with the parameter i make them shorter by hand, make a problem for me and give me the same graph how fixed this problem? there is any code write in begind and give me all number about 2 decimal?

restart

K := [alpha = .33101604, theta = -2.54098361, mu = 4.89071038, k = 5.0, A[1] = 2.70491803, a = 3.63387978]

[alpha = .33101604, theta = -2.54098361, mu = 4.89071038, k = 5.0, A[1] = 2.70491803, a = 3.63387978]

(1)

MapleTA:-Builtin:-decimal(2, 20.8571)

20.86

(2)

MapleTA:-Builtin:-decimal(2, K)

Error, (in MapleTA:-Builtin:-decimal) invalid input: round expects its 1st argument, a1, to be of type algebraic, but received [100*(alpha = .33101604), 100*(theta = -2.54098361), 100*(mu = 4.89071038), 100*(k = 5.0), 100*(A[1] = 2.70491803), 100*(a = 3.63387978)]

 
 

NULL

Download decimal.mw

Hello

I would like to replace the expression

"floor(root(n,3))"

by another, more efficient one. Maybe something with iroot?

n is a positive integer.

Thanks for an answer.

I have currently a Maple session running with only one open worksheet.

The worksheet only contains an input line with the name "a" and an output line with the name "a".

The fan of my laptop is running full throttle and the task manager displays 10% CPU usage and a very high power usage (3 mserver.exe running, the process with the cpu load is javaw.exe. Suspending this process shuts down the fan).

After about an hour I decided to ask. While typing this post (in Firefox, probably unrelated) the CPU usage went down and the fan went quite. The total system CPU usage is now down to 2%.

Has anybody seen the same? What could have cause it? It's not the first time I observe this. Anything that I could check before restarting Maple? All on Windows 10 after system restart.

Update:

The thread that consumes cpu is called ucrtbase.dll!configthreadlocate

Starting Maplesim in parallel almost immediately turns off the fan while the displayed cpu load is still high but now variing.

I was not expecting to see step-by-step for this ode, but why does it give internal error instead of saying not supported? 

Am I doing something wrong in the call? Unfortunately, this Maple internal error can't be trapped at user level. Which means the whole program terminates also.

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1820 and is the same as the version installed in this computer, created 2024, September 28, 18:14 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

ode:=3*diff(y(x),x$2)+x*diff(y(x),x)-4*y(x)=0;

3*(diff(diff(y(x), x), x))+x*(diff(y(x), x))-4*y(x) = 0

Student:-ODEs:-ODESteps(ode,y(x))

Error, (in anonymous procedure called from Student:-ODEs:-ODESteps) too many levels of recursion

try
   Student:-ODEs:-ODESteps(ode,y(x));
catch:
  print("cought the error ");
end try;

Error, (in anonymous procedure called from Student:-ODEs:-ODESteps) too many levels of recursion

 


 

Download too_many_Levels_odesteps_oct_14_2024.mw

 

How can I solve this function faster? solve the solution is more accurate, but the solution speed is too slow, the use of fsolve to solve the speed is faster, but the solution is not accurate, what is the solution fast and accurate?question11.mw

Hi everyone! I solve this NLP and I wanna get the solution in terms of the desired parameters h1, h2, Could you tell me how to correct the code? 
 

solve({v1^2 = 2*g*(h-h1), (1/2)*g*t^2 = h2, v1*t+(1/2)*g*t^2 = h1}, h, parametric = full, parameters = {h1, h2})

piecewise(g*t^2-2*h2 = 0, piecewise(g*t^2+2*t*v1-2*h1 = 0, [{h = (1/2)*(g^2*t^2+2*g*t*v1+v1^2)/g}], g*t^2+2*t*v1-2*h1 <> 0, []), g*t^2+2*t*v1-2*h1 = 0, piecewise(g*t^2-2*h2 = 0, [{h = (1/2)*(g^2*t^2+2*g*t*v1+v1^2)/g}], g*t^2-2*h2 <> 0, []), And(g*t^2-2*h2 <> 0, g*t^2+2*t*v1-2*h1 <> 0), [])

(1)

NULL


 

Download Expression_of_NLP_with_desired_parameters.mw


This is an answer to the last question ASHAN recently asked.
As this answer goes beyond the simple example supplied by ASHAN in that it extends the possibilities of Statistics:-ColumnGraph, I thought it would be appropriate to share it with the entire community of Maple users.

Possible improvements:

  • add controls for parameter types
  • add consistency controls (numer of colors = number of data rows for instance)
  • add some custom parameters
  • improve legend position
     

restart

CustomColumnGraph := proc(
                       data
                       , BarColors
                       , GroupTitles
                       , BarWidth         
                       , GroupOffset      
                       , LegendBarHeight
                       , VerticalShiftFactor
                       , BarFont
                       , GroupFont
                       , LegendFont
                       , BarTitleFormat
                     )



  local Ni, Nj, W, DX, LH, LW, SF, L, DL:

  local SingleBar := (w, h, c) -> rectangle([0, 0], [w, h], color=c):
  local BarGraph, Legends:

  uses plots, plottools:

  Ni := numelems(data[..,1]):
  Nj := numelems(data[1]):
  W  := BarWidth:
  DX := GroupOffset:
  LH := LegendBarHeight:
  SF := VerticalShiftFactor;
  L  := DX*(Ni-1) + W*(Nj-1) + DX/2 + DX/4:
  LW := L / Ni / Nj / 2;                          # LegendBarWidth  
  DL := solve(dl*(Nj+1) + Nj*(3*LW) = L, dl);



  BarGraph := display(
                seq(
                  seq(
                    translate(SingleBar(W, data[i, j], BarColors[j]), DX/4 + DX*(i-1) + W*(j-1), 0)
                    , i=1..Ni
                  )
                  , j=1..Nj
                )
                , axis[1] = [gridlines = [], tickmarks = []]
                , axis[2] = [gridlines = [11, linestyle = dot, thickness = 0, color = "LimeGreen"]]
              ):

  Legends := display(
               seq(
                 translate(SingleBar(LW, LH, BarColors[j]), DL/2 + LW + (3*LW+DL)*(j-1), min(data)*(2*SF-1))
                 , j=1..Nj
               )
               ,
               seq(
                 translate(
                   textplot([0, LH/2, GroupTitles[j]], align=right, font = LegendFont)
                   , DL/2 + 2*LW + (3*LW+DL)*(j-1), min(data)*1.4)
                   , j=1..Nj
               )
             ):

  display(
    BarGraph  
    , Legends

    #------------------------------- X base line
    , plot(0, x=0..DX*(Ni-1)+W*(Nj-1)+DX/2 + DX/4)
 
    #------------------------------- Left bar group boundaries
    ,
    seq(
      line(
        [DX/4 + DX*(i-1) - W/2, min(data)*SF],
        [DX/4 + DX*(i-1) - W/2, max(data)*SF]
        , color="LightGray"
      )
      , i=1..Ni
    )


    #------------------------------- Right bar group boundaries
    ,
    seq(
      line(
        [DX/4 + DX*(i-1) + W*Nj + W/2, min(data)*SF],
        [DX/4 + DX*(i-1) + W*Nj + W/2, max(data)*SF]
        , color="LightGray"
      )
      , i=1..Ni
    )
  
    #------------------------------- Top bar group boundaries
    ,
    seq(
      line(
        [DX/4 + DX*(i-1) - W/2, max(data)*SF],
        [DX/4 + DX*(i-1) + W*Nj + W/2, max(data)*SF]
        , color="LightGray"
      )
      , i=1..Ni
    )
 
    #------------------------------- Bar titles
    ,
    seq(
      seq(
        textplot(
          # [DX/4 + DX*(i-1) + W*(j-1) +W/2, data[i, j], evalf[3](data[i, j])]
          [DX/4 + DX*(i-1) + W*(j-1) +W/2, data[i, j], sprintf(BarTitleFormat, data[i, j])]
          , font=BarFont
          , align=`if`(data[i, j] > 0, above, below)
        )
        , i=1..Ni
      )
      , j=1..Nj
    )
  
    #------------------------------- Bar group titles
    ,
    seq(
      textplot(
        [DX/4 + DX*(i-1) + W*(Nj/2), max(data)*SF, cat("B", i)]
        , font=GroupFont
        , align=above
      )
      , i=1..Ni
    )
  
    , labels=["", ""]
    , size=[800, 400]
    , view=[0..DX*(Ni-1) + W*(Nj-1) + DX/2 + DX/4, default]
  );
end proc:

 

Data from  AHSAN

 

A := [0.1, 0.5, 0.9]:
B := [0.5, 2.5, 4.5]:


Nu_A := [-0.013697, 0.002005, 0.017707, -0.013697, 0.002005, 0.017707, -0.013697, 0.002005, 0.017707]:
Nu_B := [0.010827, 0.011741, 0.012655, 0.013967, 0.014881, 0.015795, 0.017107, 0.018021, 0.018935]:


i:=4:
data := Matrix([[Nu_A[i], Nu_B[i]], [Nu_A[i + 1], Nu_B[i + 1]], [Nu_A[i + 2], Nu_B[i + 2]]]):
 

 

Column Graph

 

Ni, Nj := LinearAlgebra:-Dimensions(data):

CustomColumnGraph(
                   data                                        # data
                   , ["Salmon", "LightGreen"]                  # BarColors
                   , ["Sensitivity to A", "Sensitivity to B"]  # GroupTitles
                   , 1/(numelems(data[1])+2)                   # BarWidth  
                   , 1                                         # GroupOffset  
                   , max(abs~(data))/10                        # LegendBarHeight
                   , 1.2                                       # VerticalShiftFactor
                   , [Tahoma, bold, 10]                        # BarFont
                   , [Tahoma, bold, 14]                        # GroupFont
                   , [Tahoma, bold, 12]                        # LegendFont
                   , "%1.5f"                                   # BarTitleFormat
                 )

 

 

Column Graph of an extended set of data

 

 

ExtentedData := < data | Statistics:-Mean(data^+)^+ >:
ExtentedData := < ExtentedData, Statistics:-Mean(ExtentedData) >:

interface(displayprecision=6):
data, ExtentedData;

Ni, Nj := LinearAlgebra:-Dimensions(ExtentedData):


CustomColumnGraph(
                   ExtentedData                                  
                   , ["Salmon", "LightGreen", "Moccasin"]                 
                   , ["Sensitivity to A", "Sensitivity to B", "Mean Sensitivity to A and B"]
                   , 1/(numelems(data[1])+2)                   # BarWidth  
                   , 1                                         # GroupOffset  
                   , max(abs~(data))/10                        # LegendBarHeight
                   , 1.2                                       # VerticalShiftFactor
                   , [Tahoma, 10]                              # BarFont
                   , [Tahoma, bold, 14]                        # GroupFont
                   , [Tahoma, 12]                              # LegendFont
                   , "%1.3f"                                   # BarTitleFormat
                 )

Matrix(3, 2, {(1, 1) = -0.13697e-1, (1, 2) = 0.13967e-1, (2, 1) = 0.2005e-2, (2, 2) = 0.14881e-1, (3, 1) = 0.17707e-1, (3, 2) = 0.15795e-1}), Matrix(4, 3, {(1, 1) = -0.13697e-1, (1, 2) = 0.13967e-1, (1, 3) = HFloat(1.349999999999997e-4), (2, 1) = 0.2005e-2, (2, 2) = 0.14881e-1, (2, 3) = HFloat(0.008442999999999999), (3, 1) = 0.17707e-1, (3, 2) = 0.15795e-1, (3, 3) = HFloat(0.016751000000000002), (4, 1) = HFloat(0.002005), (4, 2) = HFloat(0.014881), (4, 3) = HFloat(0.008443)})

 

 

 

 


 

Download CustomColumnGraph.mw

 

I can't understand why Maple interprets 1 .05  as 1 * 5 = 5 , and 2 .05  as 2 * 5 = 10 . Note the space between 1 and .05
In a different calculation I accidentally inserted a space between 1 and .05, and received a strange answer, and finally narrowed it down to a space.
But now I wonder why it is it is interpreting this way. Also I see that 2  0.05 produces an error. But  2 .05 is treated as 10. There is an implied multiplication? But the multiplication should be 2 * .05 , which is 1 and not 10.

Good day, all.

I would like to explore the structure of the discrete modified form of the logistic equation.

In particular, I wish to plot the logistic-map to investigate the bifurcations of the system.

Is there a routine available in Maple that I can use?

I would like to consider the standard logistic equation with the inclusion of a shape parameter, m, introduced as a power law.

That is:

f(x) = a*x*(1-x^m)

where a > 0 denotes the growth rate, and m > 0  is a shape parameter. I wish to fix the value of a and take m to be the bifurcation parameter (so the logistic map would show m versus x for any given a).

Please note: The standard logistic equation (in discrete form) is given by f(x) = a*x*(1-x)

I would be grateful for any advice and support you can provide and I thank you for taking the time to read this.

First 64 65 66 67 68 69 70 Last Page 66 of 2218