Christopher2222

5785 Reputation

24 Badges

16 years, 349 days

MaplePrimes Activity


These are answers submitted by Christopher2222

Fine for me here in Maple 12.02 no freezing.  Initially consumed 6.12M and 4.51s

I agree that there is probably lots of memory being used up, if not by Maple from some other apps.

Search for all ini files.  Maybe also there is a library you created which Maple loads on startup which has the alteration in it?

I think I have found the reason for the error component Button0 errors

First I removed WMT stock symbol , no error.  replaced with BCE and got 2 component Button errors.  So I also noticed the stock name for walmart stores occupies an extra line than the rest and BCE occupies 2 extra lines than the rest.  ...  but errors do not occur if the longer stock names are entered in the last column.

The code doesn't compensate for the extra line length in the stock names hence the reason for the component Button0 error.

So now the source of the error is found we need to fix the code.

Loading a maple worksheet from any directory causes Maple to set the directory it came from into currentdir().  Using currentdir() in writedata should get you to save the file where it was loaded from.

Sending a variable from terminal to Maple ... not sure, what you mean.  Someone else may better understand what you mean.

Maybe StringTools[SearchAll]  ?

chunk:=readdata("g:/test1.txt",string)  #test1 is just an example test file of the two seperate lines you gave

also is it possible you want QXp+zr6km  and not  Qxp+zr6km ? 

None-the-less, StringTools[SearchAll] I think is what you are after.

StringTools[SearchAll]("QXp+zr6km", a)
                                                          [ [ ] , [ 34 ] ]

 

 

 

 

I may have found my answer.  It seems Cross Correlation is the name I was looking for. 

In Maple 15 a CrossCorrelation command was introduced (why not earlier? i don't know).  But I was on the right track with my proc.

 

Regarding overwritting a previous file you could include a time stamp in the file title to avoid overwritting a previously written file.  Such as when a procedure is initiated to say grab data from the internet or something and store it in some file somewhere. 

Just as an example, here is something I plucked out of one of my own procedures that does something similar to what you ask.  Here I let e represent your filename followed by a string of numbers representing the current date and time or however you wish to format it, this is just an example

e:=cat("myfilename",StringTools:-FormatTime("%Y%m%d%H%M"),".txt"): 
currentdir("f:/mynewfiles"):  # sets the directory to write the file to
writedata(e,yourdata,string): #yourdata represents the variable where your data is stored

 

 

 

In a similar topic and extension to this interesting subject.  Not intending to take away from the original question at hand but yet again the latest discover magazine comes through with another cool idea, radio vorticies.

The idea to twist radio waves and create multiple subfrequencies, identified by their degree of "twistedness".  Each subchannel carries discrete data sets.  Tuning frequencies as before except for the added fingerprint of the twist.  Here is the paper  http://arxiv.org/abs/1107.2348

The challenge is to show visualize this in Maple. 

Okay just happened to figure it out after taking a break.  Using the forward slash quotes inside the quotes works nicely. 

process[launch](cat("sndrec32.exe ","/play ","\"g:Bflat3.wav\" ","/close"))

I still can't view your solution (the red x is still there) I am guessing you came to the same conclusion I did?

I can't see your graphic, it appears as a red X.

I used " /CLOSE" in the cat command in your proc in Maple and I get error message from sound recorder

Cannot open 'c:\Bflat3.wav \CLOSE'

How did you do it? 

Use allvalues() to ween out the values of a RootOf_ expression.

For me, using mainly Maple 12, I almost always use Document mode. 

Document mode, because of it's graphical nature of 2-d math mode, sometimes requires certain tricks to make it work the way you want.  Usually if a bug exists seperate from worksheet mode it is relatively minor and associated with the 2d display that worksheet mode isn't concerned with, but workarounds are possible. 

The main problem I'm experiencing now is that it doesn't complete the launch until the while value is true

st:=time[real]:
process[launch](cat("sndrec32.exe ","/play ",SoundFile)):
while time[real]()-stsystem("tskill sndrec32");

Nothing plays.  And everything happens at once as soon as 5 seconds has been reached which seems counterintuitive.  Doesn't it?  What am doing wrong?

Take this for example

st:=time[real]():
while time[real]() - st < 5 do print(5); end do;

The 5's are not displayed until after 5 seconds.  mmm okay I guess that makes sense but in my little program above I have the process[launch] before the while loop so it should get executed before it enters into the while loop but it does not.  Maple executes the complete set and waits 5 seconds then starts the launch but immediately kills the program because Maple wants to wait to display it until the loop has finished. 

Where am I going wrong in my logic?  Or how do I get Maple to loop while sndrec32 is executed?

Also How do I get Maple to determine when sndrec32.exe has finished executing (playing) the soundfile?

Does anyone know how to close sndrec32 using tskill in a loop?  It appears Maple cannot close it after initiating the play command with the launch process.

It seems windows (oh yes, I'm using XP with Maple standard GUI not that it matters much) after initiating Maple to play the wav file in sndrec32 latches onto that application waiting for it's response or an input from there. 

I added the following in the above proc so that it is supposed to close after 2 seconds but that doesn't happen

st:=time[real]()
process[launch](cat("sndrec32.exe ","/play ",SoundFile)) 
if (time[real]() - st) > 2 then ssystem("tskill sndrec32") end if:

Any ideas?

You could then use ... ssystem("tskill sndrec32") ... somewhere to close sndrec32.exe after it was finished playing

Regarding my question to translate the ~ for Maple 12, was just a simple map transformation

sound1:=map(t->sin((2*evalf(Pi)*440)*t),t);

And your 8000Hz doesn't really sound like 8000Hz, it sounds closer to 400Hz

I forgot the translation of ~ for Maple 12 ( would someone be so kind to translate ? )

Luckily I recently just had access to Maple 15 and your pathname SoundFile:="Bflat3.wav"; seems to be the problem, changing it to include the full pathname works but not automatically. 

Changing to
SoundFile:="c:/Bflat3.wav" will allow the wav file to be loaded into sndrec32 but still requires manual play button to be pressed.  Curiously does anyone know how to get it to play automatiically?

4 days have elapsed so you have probably already found the problem.

First 26 27 28 29 30 31 32 Last Page 28 of 47