Christopher2222

5785 Reputation

24 Badges

16 years, 349 days

MaplePrimes Activity


These are questions asked by Christopher2222

In Maple12 and 2017 we can load a .wav file and Preview no problems. 

The problem occurs when we apply a moving average from the Statistics package and then attempt to Preview the result. Warning - if you don't limit the size of the number of elements when executing the Preview you will freeze and lock up your computer as it attempts to output to the display the errors on each element.

For example.

Using the windows Ding.wav

with(AudioTools):
a:=Read("c:/test/Ding.wav"): #just a random test location I have the Ding.wav file in.
b:=ToMono(a): #changing to Mono.
c:=b^2: #squaring the signal.

with(Statistics):

d:=MovingAverage(c,30):

Preview(d[1..5]) #selecting a small number of values so I don't lock up my system.

Now Preview(d) works in M12 (ie there were no errors and a plot was presented). 

Why doesn't this work in 2017? 

In Maple 2017 using print in a variable produces the line b:=().  d:="hello" is as it should

In Maple 2016 using the print in a variable produces a blank line where b:=() appears in 2017

I have a small data sample of some occurrence in time.  For an example lets take the time it takes kids to finish their lunch to determine wether a school has given them enough time for recess.

The times are (20,15,12,18,15,13,13,10,14,14,15,17,8,22,16) in minutes.

What distribution should I use? 

Should I just calculate the mean and std. dev. from the data and generate a normal distribution, like below?
with(Statistics):
a:=[20,15,12,18,15,13,13,10,14,14,15,17,8,22,16]:
m:=Mean(a):
d:=StandardDeviation(a):
X:=RandomVariable(Normal(m,d)):

Sample(X,3) # generate a few samples


I could also randomly choose from the observed 15 data points. 

combinat[randcomb](a,3) # randomly pick 3 of data points

Which method would be better?  Is randcomb following any kind of distribution? 

Here's something neat to be done in Maple. 
This anaglyph or stereo image uses the red green glasses to make the model appear more 3 dimensional.  The static-non-stereo image of the animated plot below is done in maple by plot3d(sin(x*y)^2,x=-2..2,y=-2..2,scaling=constrained)

Anyone?

 

It seems if for some reason Maple runs a command that returns an error but the error is outputing to the display, and it is very very large, javaw.exe will consume enormous amounts of memory and pretty much freeze your system.  It took me forever to get into task manager on Windows to try to kill the processes slowing my system down to a crawl. 

For example if you run say listplot on a 60,000 set data element which is not in the correct form for listplot, Maple will error each element and attempt to output it to the screen which on my system quickly ran javaw.exe up to 2.5 Gb of memory usage. But then it went to zero again (probably due to garbage collection or something) and quickly ramped back up into 2 Gb.  Momentarily I was given enough system control to kill some processes to Maple and Firefox which eventually allowed me to take back control of my system.  When this first occurred, I did a hard reset, the second time I wanted to see if I could have any luck otherwise, but it took 5 minutes of frustration to get my system back to normal operating condition.

Hopefully Maple developers can use this information to prevent system hangs like this in the future.  Additionally pushing the interupt the current operation did little to stop the process already underway. 

First 18 19 20 21 22 23 24 Last Page 20 of 94