Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@Carl Love Yes, in the alternate version that I provided, the spacing between the symbols is not exactly right as I am relying on implied multiplication to separate them.  That's why I said that the code works if one does not mind a little bit of cheating.

@Carl Love If one doesn't mind a little bit of "cheating", this one produces an okay output:

for i from 0 to 3 do
    e := cat(`<`,i,`>`);
    print(A^e*``((x^e)*``(0))=Mat(i));
end do:

@vv Yes, I should have included that line in the worksheet. Thanks for pointing it out.

I have that line in my Maple's initialization file so that it's always executed when I start up Maple. It's for that reason that it was absent in the worksheet.

@nm You wrote:

Since Mapleprimes does not  provide notification telling one they had reply or a comment, how is one supposed to know?

I would have expected that you, an active user of this forum, would have figured out the answer to that question by now.

When you ask a question or reply the someone else's, there is a Subscribe checkbox right underneath the editing window.  Check that box.  Then you will be notified by email whenever there are new replies/answers in that thread.

@C_R Producing animations in Maple is a matter of creating individual frames and then showing them in sequence through
    plots:-display(frame_1, frame_2, ... frame_n, insequence);
The frames are displayed at equal time intervals. It's possible to produce faster or slower animations by adjusting the fps (frames per second) through Maple's interactive menu. Maple does not allow, however, varying the speed from frame to frame.

But we do need variable frame speed for an effective animation.  Observe that in the animation in my original post there are pauses in several places, mostly when words appear, in order to permit the viewer to read the text. Otherwise, the text will flash in and out in a very small fraction of a second.

Here is how I inserted the pauses there.

1. Exported Maple's animation (with a fixed frame rate) as a GIF file.
2. Exploded the GIF file into individual files, one file per frame.
3. Reassembled the frames back into a GIF file by inserting delays where needed.

Steps 2 and 3 were performed with the help of the free and open source ImageMagick image manipulation command-line utilities.

I didn't post the Maple code for that animation because without that post-processing what you would see within the Maple worksheet would not be quite the same.

That said, here is the Maple code to satisfy your curiosity. This code is slightly different from what produced the original animation because the original was done some years ago and I have edited it a few times in the interim.

Here is the animation produced by that code, without post-processing. The lack of pauses is very noticeable and disconcerting.

Source code: cones2.mw 

@The function You wrote

Nothing more to explain there. Im not going to wright a scripture about one question.

I am sorry to hear that. You could have learned a thing or two by putting your efforts in the right direction.

Maggie, this and the other question that you have posted require some good thinking from you. Maple will not do the thinking for you.

Once you formulate the mathematical problem and reduce it to an equestion or something like that, then you can ask Maple to solve that equation for you.

Do you have any thoughts on how to formulate your problems mathematically?

@The function I asked for an explanation of your method. You wrote:

For the formula of the first answer a. I used the ratio that is 2/0.5=4, so for ever part x it goes down, the radius increases with x/4, and that gives the formula.

I had hoped for a more thorough explanation. To show what I mean, I have attached my explanation of the solution to part (a) in my previous answer.  That's the kind of explanation that you need to communicate your idea to others.  Can you do something like that for parts (b) and (c)?

draining-a-cone.pdf

@erik10 I have attached a modified version of the previous proc that accepts extra options to_upper and to_lower. These cause everything to change to uppercase or lowercase.  The default (when no options are specified) is to leave the cases unchanged.

The uppercase conversion may be turned on by specifying the option to_upper = true or simply to_upper. The to_lower option works in the same way. 

Download mw.mw

@tomleslie You are reiterating the obvious, and if you are happy with that answer, that's fine too.

But I am more interested in understanding why Maple treats a worksheet with Array(0..2) in it differently from those containing Array(1..3).

The answer to your question very much depends on how that curve was generated.  Is it the graph of a known function? Is it a solution of a differential eqation?  Is the graph of a market data? Does it represent a random walk?  Or perhaps something else?

Apparently the point of nm's original observation has been lost on the responders to this thread. So let me expand on his note.

Maple has no qualms about silently saving a worksheet containing the following huge amount of data:

restart;
Matrix(10,10, (i,j)->(a+b)^(i+j)):
expand~(%);

but it unnecessarily queries the user when asked to save the tiny worksheet

restart;
Array(0..2, [1,2,3]);

Curiously, the issue goes away when when we change the array bounds to 1..3:

restart;
Array(1..3, [1,2,3]);

What is the Iterative Projection Theorem? I haven't heard of it, and from the lack of responses here, it appears that no one else has heard of it either. Perhaps it's known by some other name?

Suggestion: Explain to us what you mean by the Iterative Projection Theorem.

In fact, by forcing yourself to explain what that theorem says, you may find the solution yourself without help from anyone. But, if you still need help with this homework problem, show what you have done so far, and point out where you need help.

@erik10 Maple's string handling is not kind to non-ASCII characters. Fortunately, Maple offers an interface to Python which handles non-ASCII with ease. The do_Danish() proc defined below selects only characters a-z and the three extra Danish characters from the given string.

restart;

Removes all characters other than a-z and å, æ, ø from the string str.

do_Danish := proc(str)
        uses Python;
        ImportModule("re");
        sprintf("re.split(\"[^a-zåæø]*\", %a)", str);
        Python:-EvalString(%);
        remove(has, %, "");
        convert~(%, symbol);
        Matrix(5,5, %);
end proc:

S0 := "This is a Dånish tæxtø";

"This is a Dånish tæxtø"

do_Danish(S0);

Matrix(5, 5, {(1, 1) = h, (1, 2) = i, (1, 3) = s, (1, 4) = i, (1, 5) = s, (2, 1) = a, (2, 2) = å, (2, 3) = n, (2, 4) = i, (2, 5) = s, (3, 1) = h, (3, 2) = t, (3, 3) = æ, (3, 4) = x, (3, 5) = t, (4, 1) = ø, (4, 2) = 0, (4, 3) = 0, (4, 4) = 0, (4, 5) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 0, (5, 5) = 0})

Download mw.mw

@Kitonum That's excellent. Thanks. I didn't know about phaseamp. That can be quite useful in other occasions as well.

First 24 25 26 27 28 29 30 Last Page 26 of 99