Christopher2222

MaplePrimes Activity


These are replies submitted by Christopher2222

You want to mathematically recreate it?  or embed it as an image in another plot?

Please present your drawing.

@erik10  Are you exporting the graph animation in GIF format? I get a 210 kB file with M12.  You could try just animate command using plot and you'll get a nice graph without having to specify numpoints. 

with(plots):
x:=t->t*cos(t):
y:=t->t*sin(t):
animate(plot,[[x(t),y(t),t=0..A]],A=0..30)

Due to the nature of higher level mathematical software, it isn't always straight forward.

Good point/post.  I had asked about doing on the fly animations here http://www.mapleprimes.com/questions/98771-How-To-Simulate-Or-Animate-On-The-Fly  It is possible in maplets.  I wonder if it is possible otherwise?

MPE is very interesting, you cannot edit your post because you do not have enough points to do so, I think you need to have 500 points in order to edit. 

I think the community enjoys to read what you have to offer but posting another post on the same topic I think put it over the edge for some.  You should have in fact just added on to your original post and everything related to your MPE would be grouped into one post - that would have probably been more favorable and acceptable.

Never-the-less nice work on a 3rd party add-on to maple. 

You ask what are the other entries in 'a' and 'b' ?   Probably just file information used by winzip.

@pagan What I mean is, because the compression algorithm in zlib (which Maple uses) is the same as gzip and zip then uncompress, if I was using it properly, should uncompress the file.  However I don't see why Maple returns corrupt input data.  Did I have the data in the wrong format? 

ConvertByteArray?  Can't seem to get that working either.  Did you succeed?

I don't have access to Maple16 now and Maple 12 doesn't have the Compress and Uncompress commands so I can't experiment with that part right now.

Okay yes Maple uses the zlib for compression which stated at it's home site ...

"Not surprisingly, the compression algorithm used in zlib is essentially the same as that in gzip and Zip, namely,the`deflate' method that originated in PKWARE's PKZIP 2.x. "

Which is I think the LZ77 compression method and huffman coding.

Also as a side note reading files zipped from different programs in this manner one can compare to see if the same encoding method was used (ie. identical bits).  Of course winrar uses a different compression method.  Converting to bytes one can see winrar attaches RAR! to the beginning of it's compressed files, I guess for easy identification, although the RAR algorithm is closed so there's no way of creating a decompression algorithm on our own for uncompressing rar files ... but anyways.

So essentially Uncompress should work on a zipped file.

with(FileTools[Binary]):
with(StringTools):
Open("c:/test1.zip"):  # file test1.txt is zipped in the file with the words : This is a test
                                            0
a:=Read("c:/test1.zip",integer[1]);

 [80, 75, 3, 4, 10, 0, 2, 0, 0, 0, -102, 109, 81, 65, 50, -97, 122, -64, 14, 0,

  0, 0, 14, 0, 0, 0, 9, 0, 0, 0, 116, 101, 115, 116, 49, 46, 116, 120, 116,

  84, 104, 105, 115, 32, 105, 115, 32, 97, 32, 116, 101, 115, 116, 80, 75, 1,

  2, 20, 0, 10, 0, 2, 0, 0, 0, -102, 109, 81, 65, 50, -97, 122, -64, 14, 0, 0,

  0, 14, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 1, 0, 32, 0, -74, -127, 0, 0, 0, 0,

  116, 101, 115, 116, 49, 46, 116, 120, 116, 80, 75, 5, 6, 0, 0, 0, 0, 1, 0,

  1, 0, 55, 0, 0, 0, 53, 0, 0, 0, 0, 0]

b:=convert(a,Array,datatype=integer[1])

Uncompress(b)

I get an Error corrupt input data message

No, I couldn't get it to work, I get a list of numbers for the compressed file but can't convert it.  I probably have to create a procedure to decipher the compression method. Any help doing that would be welcome.

I first opened then read the file which gave me a list of numbers.  The Uncompress command required it to be in string format so I removed the brackets [ ] using the op command and then convert( xx , string) but Maple threw an error. 

Next I converted the list straight to string then removed the brackets [ ] and Uncompressed from there but no luck.

 

 

No, I couldn't get it to work, I get a list of numbers for the compressed file but can't convert it.  I probably have to create a procedure to decipher the compression method. Any help doing that would be welcome.

I first opened then read the file which gave me a list of numbers.  The Uncompress command required it to be in string format so I removed the brackets [ ] using the op command and then convert( xx , string) but Maple threw an error. 

Next I converted the list straight to string then removed the brackets [ ] and Uncompressed from there but no luck.

 

 

Thanks.  So even though it evaluates to true it's not actually the value of true unless it's evaluated as a boolean expression.  So it wasn't really a bug in 12 just a minor technicality of the usage of it.  And for 16 it appears setting the first argument as a result has cleaned things up.   Thanks for the other option as well.

Thanks.  So even though it evaluates to true it's not actually the value of true unless it's evaluated as a boolean expression.  So it wasn't really a bug in 12 just a minor technicality of the usage of it.  And for 16 it appears setting the first argument as a result has cleaned things up.   Thanks for the other option as well.

Very helpful!  Thanks!

Very helpful!  Thanks!

My Primary DNS suffix is empty so I used the IP address instead, that could be why.

First 88 89 90 91 92 93 94 Last Page 90 of 155