pagan

5147 Reputation

23 Badges

17 years, 122 days

 

 

"A map that tried to pin down a sheep trail was just credible,

 but it was an optimistic map that tried to fix a the path made by the wind,

 or a path made across the grass by the shadow of flying birds."

                                                                 - _A Walk through H_, Peter Greenaway

 

MaplePrimes Activity


These are replies submitted by pagan

If the views of Posts/Questions by type ("Forums") could be re-ordered actively, on demand, then top voted items could be seen easily. I mean the kind of thing where there is a button or similar viewable at the top of each view of each forum, when on-the-fly re-orders your current view either ascending or descing by up-vote totals.

I mean just like in ny email client, or file manager, I can re-order by date, author, etc, on-the-fly.

As for old posts, I've tried to go back and up-vote posts (what used to be member's blog entries in Primes version 1), especially those of experts. It seems to me that it'd be just as much effort (at least for one person) of re-reading and searching in order for old posts to be identifiable for the purpose of "best of".

@hirnyk One example is wget.

I really like the idea of a dvd snapshot of Mapleprimes. I'd pay a tad over the nominal cost of the blank for that. I don't know what copyright issues there might be.

I don't see why it couldn't be scripted. And it needn't be an active image. The various Reply/Followup/Post links, and the latest-links in the right-side-panel needn't appear. Just the pages of posts, organized somewhat like they are on the active site, would be nice.

How to do a search on it might be harder. But it's a good enough idea that it's worth considering the technicalities.

@hirnyk One example is wget.

I really like the idea of a dvd snapshot of Mapleprimes. I'd pay a tad over the nominal cost of the blank for that. I don't know what copyright issues there might be.

I don't see why it couldn't be scripted. And it needn't be an active image. The various Reply/Followup/Post links, and the latest-links in the right-side-panel needn't appear. Just the pages of posts, organized somewhat like they are on the active site, would be nice.

How to do a search on it might be harder. But it's a good enough idea that it's worth considering the technicalities.

@Szekedar 

restart:

pointto(op([1,2],select(has,indets(ToInert(eval(Student:-Calculus1:-NewtonsMethodTutor)),
                                   specfunc(anything,_Inert_LOCALNAME)),
                        "NewtonsMethodMaplet")));

print(%);

@Szekedar 

restart:

pointto(op([1,2],select(has,indets(ToInert(eval(Student:-Calculus1:-NewtonsMethodTutor)),
                                   specfunc(anything,_Inert_LOCALNAME)),
                        "NewtonsMethodMaplet")));

print(%);

@epostma There is also Statistics:-MakeProcedure('Mean','sample') which would return a procedure that itself can be applied to a Matrix in order to compute the mean.

Also, if timing performance is a focus then ArrayTools:-Alias would be a good alternative to the earlier ArrayTools:-Reshape, to avoid unnecessary full copying.

@epostma There is also Statistics:-MakeProcedure('Mean','sample') which would return a procedure that itself can be applied to a Matrix in order to compute the mean.

Also, if timing performance is a focus then ArrayTools:-Alias would be a good alternative to the earlier ArrayTools:-Reshape, to avoid unnecessary full copying.

For black/blue instead of green/red you could use color=[0,0,signum@fexpr] in that code.

I could also have written procedures in that RGB list to only return value between 0 and 1. Eg, instead of signum@fexpr,

   proc(a,b) (signum(fexpr(a,b))+1)/2; end proc

But it turned out that negative values were taken the same as zero, so by luck it could be written more neatly.

What would be useful is a collection of 3D plot colorings, coded in near best-practice ways. Canonical examples for all to be able to learn from and re-use. Other possible examples include a gradual transition through the colorspace from one color to another. (There is even a wide choice of metrics/colorspaces for doing that.) And being able to easily use the z height in the color function should be considered as important. Other examples include color gradients in directions other than just the z-axis. And color gradients along a spacecurve.

Implementations of some such examples might (also) be done for pre-computed PLOT3D structures (well, for those whose data portions are supported by the coloring functionality).

And at some point the internal support for pointwise color data (currently only as lists, I think, sigh) should be provided more efficiently based on hardware datatype rtables.

For black/blue instead of green/red you could use color=[0,0,signum@fexpr] in that code.

I could also have written procedures in that RGB list to only return value between 0 and 1. Eg, instead of signum@fexpr,

   proc(a,b) (signum(fexpr(a,b))+1)/2; end proc

But it turned out that negative values were taken the same as zero, so by luck it could be written more neatly.

What would be useful is a collection of 3D plot colorings, coded in near best-practice ways. Canonical examples for all to be able to learn from and re-use. Other possible examples include a gradual transition through the colorspace from one color to another. (There is even a wide choice of metrics/colorspaces for doing that.) And being able to easily use the z height in the color function should be considered as important. Other examples include color gradients in directions other than just the z-axis. And color gradients along a spacecurve.

Implementations of some such examples might (also) be done for pre-computed PLOT3D structures (well, for those whose data portions are supported by the coloring functionality).

And at some point the internal support for pointwise color data (currently only as lists, I think, sigh) should be provided more efficiently based on hardware datatype rtables.

You are using the deprecated evalm command. And you have a whole mix of lowercase arrays, Matrices, and likely other stuff like lists and listlists too.

And it's harder than necessary to tell, as you've shown 2D code without the attachment. So all we see are gif images of 2D Math (without 1D code as metadata) and no code to run ourselves. This makes it harder to figure out what structures you're using so far.

Consider using just Vectors and Matrices, no evalm, `.` instead of &*, and so on. Or upload the actual worksheet with a link attached, so that it could be cleaned up.

Using the right structures and comamnds in a coherent way from the beginning seems better than using a mishmash and then converting all to Vector right near the end.

@sasomao So now one question is: why are you doing things this way? Might it not be a little more tightly integrated to do all this scripting in maple itself, alongside the computation?

You have a .mpl file, which presumably acts according to the `distance` string value. Cannot its current source be put into Maple procedures, and the whole business with the sequence of distances be iterated in the .mpl file itself? (You could fprintf the .out file results, or program it with `writeto`, etc.)

Do you have to run analogous computations from other math applications, and specifically want the controlling script in a neutral setup? I'm just curious.

@sasomao So now one question is: why are you doing things this way? Might it not be a little more tightly integrated to do all this scripting in maple itself, alongside the computation?

You have a .mpl file, which presumably acts according to the `distance` string value. Cannot its current source be put into Maple procedures, and the whole business with the sequence of distances be iterated in the .mpl file itself? (You could fprintf the .out file results, or program it with `writeto`, etc.)

Do you have to run analogous computations from other math applications, and specifically want the controlling script in a neutral setup? I'm just curious.

That claim about sub-Arrays is true for square-bracket indexing. But with round-bracket indexing the index renaming can be the same as for Vectors.

> A:= Array([a,b,c,d,e]);
> B:=A(2..4);
> B[1],B[2];

                              b, c

> V:= Vector([a,b,c,d,e]);
> W:= V(2..4); # or square brackets like V[2..4]
> W[1], W[2];

                              b, c

Naturally, this does not help if the goal is to get exactly the indices remapped from the original, starting not always from 1.

However the goal as originally stated was to alter code that used lists. And sub-list indexing matches that of sub-Vectors in the respect being discussed (and not that of Arrays with square bracket sub-Array creation). So this is quite likely a non-issue.

@simoncfr  Notice that the command in question is Vector (capitalized V) and not vector. There is an older `vector` command but its use is officially deprecated (and it cannot be grown, apart from other important differences).

That claim about sub-Arrays is true for square-bracket indexing. But with round-bracket indexing the index renaming can be the same as for Vectors.

> A:= Array([a,b,c,d,e]);
> B:=A(2..4);
> B[1],B[2];

                              b, c

> V:= Vector([a,b,c,d,e]);
> W:= V(2..4); # or square brackets like V[2..4]
> W[1], W[2];

                              b, c

Naturally, this does not help if the goal is to get exactly the indices remapped from the original, starting not always from 1.

However the goal as originally stated was to alter code that used lists. And sub-list indexing matches that of sub-Vectors in the respect being discussed (and not that of Arrays with square bracket sub-Array creation). So this is quite likely a non-issue.

@simoncfr  Notice that the command in question is Vector (capitalized V) and not vector. There is an older `vector` command but its use is officially deprecated (and it cannot be grown, apart from other important differences).

Could you please explain in finer detail what it is that you want? Perhaps you could provide an example, which we might try to translate.

The Maple programming language has a conditional statement that starts with if and ends with end if (or just end). Multiple statements can occur within that control structure's branches.

It's not clear whether you mean Maple's `if` operator (as your Question mentions, literally) or Maple's conditional statement, on the grounds that you give few details and appear to have have misspelled Pascal.

See ?if

It's not clear whether you want complicated (eg. multiple statements, etc) execution branches, or conditionals.

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