Anthrazit

840 Reputation

11 Badges

5 years, 127 days

MaplePrimes Activity


These are questions asked by Anthrazit

Is there any equivalent to Excel function arctan2?

This function takes x and y values, and returns values from -Pi to +Pi. In that way one can easily get the x and y values of an angle with correct signs.

Are there any examples showing how to plot multiple items in one plot?

  • What I have started with is to put a Plot component in my sheet, so that I can use that by its name.
  • Next thing on the list was to generate different plot objects, by assigning each of them to a variable.
  • To plot the whole bunch, I collected all the items I want to plot in a list
  • And plotted them by SetProperty("MyPlotcomponent", value, display(plotlist))

I wonder if this is the best way to do it. Especially when adding more stuff afterwards, would it be possible to just add something to the plot component?

Do I need plot components at all?

What's the correct way of copying the current contents of a mutable object to a variable.

Apparently eval doesn't do the job.

aVectorList := [Vector(2, [1, 2]), Vector(2, [3, 2])]

[Vector[column](%id = 36893489518525866940), Vector[column](%id = 36893489518525867060)]

(1)

results := []

[]

(2)

AddVector := Vector(4)NULL

Vector[column](%id = 36893489518525846460)

(3)

for x in aVectorList do AddVector[1] := x[1]; AddVector[2] := x[2]; results := [op(results), AddVector] end do

AddVector[1] := 1

 

AddVector[2] := 2

 

[Vector(4, {(1) = 1, (2) = 2, (3) = 0, (4) = 0})]

 

AddVector[1] := 3

 

AddVector[2] := 2

 

[Vector[column](%id = 36893489518525846460), Vector[column](%id = 36893489518525846460)]

(4)

NULL

results := []

[]

(5)

AddVector := Vector(4)NULL

Vector[column](%id = 36893489518525840668)

(6)

NULL

for x in aVectorList do AddVector[1] := eval(x[1]); AddVector[2] := eval(x[2]); results := [op(results), AddVector] end do

AddVector[1] := 1

 

AddVector[2] := 2

 

[Vector(4, {(1) = 1, (2) = 2, (3) = 0, (4) = 0})]

 

AddVector[1] := 3

 

AddVector[2] := 2

 

[Vector[column](%id = 36893489518525840668), Vector[column](%id = 36893489518525840668)]

(7)

NULL

Download Mutable.mw

When converting a list which includes lists to a set, duplicate entries are dropped.

However converting a list with vectors to a set, no duplicate entries are dropped.

Any explanation to that behaviour?

a := {Vector(2, [1, 0]), Vector(2, [2, 0])}

{Vector[column](%id = 36893490347685388884), Vector[column](%id = 36893490347685389004)}

(1)

b := [Vector(2, [1, 0]), Vector(2, [2, 0]), Vector(2, [1, 0])]

[Vector[column](%id = 36893490347747359308), Vector[column](%id = 36893490347747359428), Vector[column](%id = 36893490347747359548)]

(2)

c := convert(b, set)

{Vector[column](%id = 36893490347747359308), Vector[column](%id = 36893490347747359428), Vector[column](%id = 36893490347747359548)}

(3)

d := [[1, 0], [2, 0], [1, 0]]``

[[1, 0], [2, 0], [1, 0]]

(4)

e := convert(d, set)

{[1, 0], [2, 0]}

(5)

``

Download DuplicateEntries.mw

I'm getting a strange error today when trying to save a file on the network. Rebootet machine, no change.

Any hints?

First 10 11 12 13 14 15 16 Last Page 12 of 25