Axel Vogt

5936 Reputation

20 Badges

20 years, 251 days
Munich, Bavaria, Germany

MaplePrimes Activity


These are replies submitted by Axel Vogt

nice word, but its great to learn :-) actually i thought one of the guys might want to drop a word or more: it may not be the only point where switches have been made. and the help does not tell such details, would be nice to hear ...
nice word, but its great to learn :-) actually i thought one of the guys might want to drop a word or more: it may not be the only point where switches have been made. and the help does not tell such details, would be nice to hear ...
I once learned that an indexed variable is a map (from the index
set to the range, where the values 'live'). So I prefer to write
t(0) or t(i) for a variable t (say indexed by IN) and usually use
t[i] for a nice display only.

Additionally it works to assign single values like t(1):=2 etc
(a bit astonishing).

Writing in 'array' notation is a bit false for infinite series
(say Laurent series) or does Maple know infinite arrays (with
negative indices).

An 'array' I learned to be an element in an (ordered) product
space (thus hate C-style notations) and write a lower subscript
for its according element (that can be made fit together).

But certainly this abstract nonsense does not quite fit into
Maple's handling: for example the Sum in Maple assumes some
ordering on the indices while in Math it is not the case.
In think it is a mixture: a bit confusing, a 'false' formula and some
odd use of Maple :-) 

Fred sent me a mail, I will try, my first attempt was false, it is as
Joe Riel tries to read it.

The task: given values b(n) for n in IN one defines the function t by
the sum - which is a function of n and S and as Joe Riel shows it is
a Gamma distribution.

What Fredl wants: solve t(n,S) LE 0.85 for each given n and he wants S
to be the smallest integer which does that (Fredl: correct?).

One can see, that the problem is monotonous in S, so one solves t()= 0.85
(either symbolic or using fsolve) and then takes floor(solution) + 1.

The formula is either false or your usage: note the sum starts with some
b(0), while you only give b(1) and b(2). May be that is the problem when
you want to verify the results - to be consistent you may use b(0), b(1).

Note that your 'array' notation is not quite what Maple wants: the first
index is 1, not 0 (not as in C, where the index is a offset, in Maple it
is the position).

Let us know, whether that leads you to your solution (and if not and if
it is not homework you will get more - but you will learn more about M
if you try it yourself first, especially if you really *want* to have it),
certainly you will get comments on posting your solution.
The original question was here (please do not multiple threads for the same question ...)
In Math and your case t with an lower index is thought to be a constant.

The fact that t[0] is displayed as t with an lower index by Maple does
not say that Maple understands it this way (as already explained).

When starting with Maple it is a bit confusing. But more or less you
want M to display as you are used to in usual mathematical notations,
i e you 'abuse' it for typesetting at the same time.

Simply do not do that, it is not a good idea and if you want it then
use the 'standard' interface (which dislike).

As I am almost always working with classical interface to really see the
input and to avoid ambiguities (like the multiplication sign). 

And here you can do something similar by introducing a variable which is
displayed as you want it to have (at least almost):

myConstant:=` t`[0];

                         myConstant :=  t[0]

Note the *backward* quotes and the *blank* before the t (one needs it,
as soon as t gets a value).

Then you can write:

'(1/m)*(int(b*t*(myConstant-t), t = 0 .. T))': '%'= value(%);

                                              3
             T                             b T                 2
            /                            - ---- + 1/2 b  t[0] T
           |                                3
      1/m  |   b t (myConstant - t) dt = -----------------------
           |                                        m
          /
            0


(1/m)*(Int(b*t*(myConstant-t), t = 0 .. T)): '%'= value(%);

                                           3
               T                        b T                 2
              /                       - ---- + 1/2 b  t[0] T
             |                           3
        1/m  |   b t ( t[0] - t) dt = -----------------------
             |                                   m
            /
              0

Both the right hand sides will be displayed as you intended in the interface.


However personally I would just use t0 and avoid indexing for typesetting
reasons only (the above has some traps and side effects if you modify it
a bit).
In Math and your case t with an lower index is thought to be a constant.

The fact that t[0] is displayed as t with an lower index by Maple does
not say that Maple understands it this way (as already explained).

When starting with Maple it is a bit confusing. But more or less you
want M to display as you are used to in usual mathematical notations,
i e you 'abuse' it for typesetting at the same time.

Simply do not do that, it is not a good idea and if you want it then
use the 'standard' interface (which dislike).

As I am almost always working with classical interface to really see the
input and to avoid ambiguities (like the multiplication sign). 

And here you can do something similar by introducing a variable which is
displayed as you want it to have (at least almost):

myConstant:=` t`[0];

                         myConstant :=  t[0]

Note the *backward* quotes and the *blank* before the t (one needs it,
as soon as t gets a value).

Then you can write:

'(1/m)*(int(b*t*(myConstant-t), t = 0 .. T))': '%'= value(%);

                                              3
             T                             b T                 2
            /                            - ---- + 1/2 b  t[0] T
           |                                3
      1/m  |   b t (myConstant - t) dt = -----------------------
           |                                        m
          /
            0


(1/m)*(Int(b*t*(myConstant-t), t = 0 .. T)): '%'= value(%);

                                           3
               T                        b T                 2
              /                       - ---- + 1/2 b  t[0] T
             |                           3
        1/m  |   b t ( t[0] - t) dt = -----------------------
             |                                   m
            /
              0

Both the right hand sides will be displayed as you intended in the interface.


However personally I would just use t0 and avoid indexing for typesetting
reasons only (the above has some traps and side effects if you modify it
a bit).
not sure, what you want (may be post your *task* as well) but I get 0.9824769037 The first approach violates several 'rules' in Maple and generally is not a good idea to work with indexed variables except if you are sure what you are doing. So I use basepipemin:=[0,0]; basepipemin[1] := 0.2; basepipemin[2] := 1.8; and set tfr := 0.85; Your 2nd approach has *no* initial value for tfrbase. Other than C or any coding language Maple does not set a variable to some zero, but I guess you want that, so do it by tfrbase:=0.0; Then the loop is executed (personally I prefer to write it more explicitely 'for n from lower to upper' to see what is done, that short hand notation is terrible ... even find the the 'od' to be odd ... weeks later it costs more time to understand what is meant than time was saved by typing a little bit more). To display the result write the statement "tfrbase;" after the loop.
Uploaded a new version for the source code (correcting a bug and now the zip contains an Excel sheet as well, I forgot that). The herd ... not aware that it is visible in public but the sheppard is quite open minded and friendly. Download 102_hyp2f1_simple(16 Apr 2007).zip
View file details
i never had problems having old versions in parallel (sometimes it is usefull, but needs space) also if you ever had a version installed and install it again you need not register again (same machine & hard disk) so for the deleted watcom: just do it again
seems ok now ... but still keep to the analog monitor connection (but do not see, what could have happened to the graphical system). anyway strange, never has such thing before ... or was it Friday 13th?
I got *serious* problems after installing, with Visual C++ 2005 the PC crashed and all the compiled DLLs where deleted. Plus some more and one (as I now know) was a DLL for my firewall. It was not clear what else was gone ... at least an ideal situation to find out how complete is ones backup + patches + passwords etc. This afternoon it worked again. For 2 hours. Are there know troubles in having vc2005 (with .NET Framework 2.0)? Does M11 make changes to graphical drivers? It seems that after de-installing M11 the only way to bring it to live again (without building up everything from fresh) was not to use digital connection to the monitor - with the analogous connection it seems to work (now). Any idea?
BTW: I *did* say yes to associate (doing it a 2nd time), but it does not work.
thx, it had some other effects, for which i will contact the supplier (in mad mood)
yes, Temme sketches the problem of evaluating through power series and linear transformations in a (public available) lecture "Numerics of Special Functions" (2005) on pages 55 ff.
First 192 193 194 195 196 197 198 Last Page 194 of 209