Christopher2222

5785 Reputation

24 Badges

16 years, 349 days

MaplePrimes Activity


These are answers submitted by Christopher2222

Yes single backslashes are ignored because as Pagan says it is an escape character.  Cryptography perhaps?  Makes things a little bit more difficult. 

The bmp was the 1month graph from the Hamiltongasprices.com site.  After shutting down, taking a break, coming back and reloading the worksheet I am unable to reproduce my error.  The error must have come from something in the worksheet that was cleaned out when I shut down. 

For my 1st half second question, I don't want this thread to be a complete loss, again it is related to an ImageTools error. 

After using Threshold on an image to make it a black and white image as I did above
with(ImageTools):
a:=ToGrayscale(Read("f:/example.bmp")):
b:=Threshold(a,0.9):
Write("f:/test.bmp",b)

Okay, no problem, now when I view the image it isn't completely black and white when I zoom in.  The black squares have a slight shade of white ( I thought it was because the values in the Array were float8's) so I did this to my Array...

d:=map(round,b) # change the floats into definite integers
Write("f:/test2.bmp",d)
Error, invalid input:  ImageTools:-Write expects its 2nd argument, image to be of type Image, but received Array(1..    ...etc

I did this because I wanted to see if the written image was affected by the float datatype, unfortunately it didn't write.  How do I change my d Array into an Array that can be written into an image? 


The reverse engineering is the interesting part.  What I want to do here is use Maple to approximate the positions of the values where the average gas price is each day from the same site Hamiltongasprices.com or of something similar.  Of course we have to pay if we want the real data.  But I want to see how much we can pull out of graph given to us as only as a jpg or bmp.   If we save the graph image and with some crafty manipulation of Maple see if we can actually squeek out some real (well approximate) data.  I suppose this could be a challenge.  Be interesting to see how someone would go about this.  How would I start?  Any ideas? 

Strange,

If after I execute the Threshold line and I recieve the error message, if I execute the same line again the error dissappears.  (Maple 12 by the way, so probably doesn't happen in the newer versions) intermittant bug I guess.

Try showstat(Finance:-BrownianMotion)

If it is a procedure builtin to the kernel you will be unable to view the code.  Usually if the code is built in, it will say option builtin= "the name of procedure"

I do not have Maple 15 but since it does not show builtin from the print line the showstat should show the code.

Explore maybe your closest command in maple to mathematica's manipulate as pointed out by
Jakubi in the discussion here
http://www.mapleprimes.com/questions/36124-Maple-Analog-To-Mathematicas-Manipulate-

 Unfortunately the Explore option wasn't available until Maple12. 

My icon avatar was created with maple with a 3d matrix (array) in mind.  I think I made some suggestions for improving maple and about visualizing 3d arrays.  The interesting thing, or not, with maple is that it likes to display numbers in 3 space as always facing you.  No matter which way you rotate the array or plot, the numbers will not rotate with a fixed position in mind.  The good thing about this is you can tell what the numbers are no matter what the orientation of your plot is.

I believe just recently there was a comment about maple not being able to rotate text on the reproduction of an emblem. 

The flythrough option through my matrix would be neat, but really, no more than just a cool thing to do. 

After using remove as DuncanA shows you could also use zip.

M2:=remove(x->x=[],M):  # same as DunanA has shown above
zip((x,y)->(x,y),L,M2);

 

This thread provides a clue http://www.mapleprimes.com/questions/38826-Suppressing-Scientific-e-Notation

I do not think there is an option for maple to change the automatic display of scientific numbers, however with the use of printf you can convert it to decimal as you wish

printf("%.10f",1/e7);

0.0000001000

 

 

Yes!  Thank you both.

edit - add ** Except for shading which doesn't seem to transform radially, this works nicely.  Is there a way to shade radially outward to retain the original matrixplot histogram shading?

Here's one way to do it.

if your file is named c:\gpsdata.txt then ...

a:=readdata(`c:/gpsdata.txt`,4);

c:=[0,0]:  #Start at the origin
d:=[ ]:
for i from 1 to nops(a) do
d:=[op(d),c]:
  if a[i,1]=2 then c:=c+[0,1] fi:
  if a[i,2]=2 then c:=c+[1,0] fi:
  if a[i,3]=2 then c:=c+[0,-1] fi:
  if a[i,4]=2 then c:=c+[-1,0] fi:
end do:

plot(d)

I think I get what he means. 

So he says each line was produced every 0.1 seconds and the number 768 represents the car is not moving in that direction and the number 2 represents the car is moving that way, the dashes I'm guessing being his representation of seperators (spaces).  A 2 in two columns represents a direction move between unit direction values (we'll never see a two in a North and South column, or an East West column together) Also a 768 in all columns must represent a stopped position. 

We could very well substitute 0 for 768 and 1 for 2.  So for your example

Car movement:
N   E   S   W
-------------
0   0   0   1
0   0   0   1
0   1   0   0
0   1   0   0
0   1   0   0
0   1   1   0
0   1   1   0
...etc

This is similar to the walking randomly application, you could apply that to your situation and generate a direction change graph. 

 

That is how it works, there is nothing wrong with it. 

(p*q-1)^kpub mod n = (p*q-1) if n=p*q

If your coded value was equal to n or p*q then your coded and encoded value should be 0.

Okay I've found a partial solution,

Create a document c:\test\test1.mw and write the line
DocumentTools[SetDocumentProperty](`Author`,"Chris")  and you must return

Then create a new document file c:\test\test2.mw  and just save it blank

Then we Open a new document and type the following to copy the contents of test1.mw to test2.mw

fopen(`c:/test/test2.mw`,WRITE)
writebytes(`c:/test/test2.mw`,readbytes(`c:/test/test1.mw`,infinity))
fclose(`c:/test/test2.mw`)

and I'm guessing because we used a carriage return in test1.mw it copied the carriage return control character over as well so the line is actually executed in the new document.  When you open it, it has the new modified Author name in the document properties. 

Couple of questions, can I use writebytes without having to readbytes from another worksheet and instead just type the line in writebytes?  I keep getting an error with the data type.  Perhaps using the cat() command and the carriage return control character \r, but I can't get it to work.

After that how would I erase the lines I just wrote into the destination file?  also I can't get it to work with the APPEND mode after all I don't want to erase everything in my documents while I just add my Authors name to my worksheets, that would be disasterous. 

Can any one offer some more insight?

As suspected the number you phoned, if not legitimate, has either no one answering or a wrong number.  Besides had you even got a response they would deny it anyways.  If it were legitimate they wouldn't be doing such things to disrupt a forum.  Were it a legitimate company one message would be enough.

Besides accusing someone might just anger them and provoke them into more spamming. 

It's best just to set up some security rules on the site to avoid such problems.  Too bad they can't get a taste of their own medicine.

I believe he does mean to download the whole mapleprimes site so he can view all the questions/posts offline. 

There does exist some webcatching software, I used one a few years ago however I might add as soon as someone posts a new question/post, as the software is catching the pages, then questions and posts are shifted and the program may capture duplicate questions (ie while your just saving (for example) the question at the end of page 55 just as someone posts a new one you'll end up with the same question at the beginning of page 56, albeit a minor issue. 

It would be, perhaps, nice for a repository dvd library of all of the mapleprimes questions available.  Most of them if not all are quite useful.  As an idea it could be packaged up with the purchase of a new Maple version.  I'm not worried about the logistics of how it would be done, it's just an idea.

First 29 30 31 32 33 34 35 Last Page 31 of 47