## 276 Reputation

17 years, 256 days

## Thank you...

for the explanation.

## Thank you...

for the clarification. It answers my question completely.

## Thank you...

for the clarification. It answers my question completely.

## yes but......

Thank you. It is good to know that it is an expression sequence.

Can I enetr or access entires by name or can I just type into the boxes. That is, is the Insert Table command just  for formatting? Usually, if one has an expressseq z one can refer to z[3]. I don't see how to even name my table.

## yes but......

Thank you. It is good to know that it is an expression sequence.

Can I enetr or access entires by name or can I just type into the boxes. That is, is the Insert Table command just  for formatting? Usually, if one has an expressseq z one can refer to z[3]. I don't see how to even name my table.

## perhaps I was not clear...

I am working on a problem that involves 3 parameters a,b,c.

For each choice of those parameters I have a rather long program to calculate 3 other numbers x,y,z.

Using x,y,z I can start my investigation.

The calculation of x,y,z involves constructing several polynomials of degree 10 and solving for the coefficients along the way.

I have over many years studied simpler problems of lower degree and just gone through the calculations a step at a time without any problems.

Now that the calculations are more complex I thought I would create a procedure to automate the process. Therein lies the problem.

The lack of complete evaluation within a procedure is a new twist for me. It would require that I use eval commands many times. The simple illustrative example I posted was only the simplest example I could find of the phenomenon.

I certainly did not want to ask anyone to wade though my long program which is largely irrelevant. I was hoping that there was an option in a procedure like Full Evaluation that might help. Apparently not.

Perhaps solve will work on the whole system of equations; I will try it. I used many solves in a row because invoking solve in the specific order I present makes the process trivial. Perhaps, Maple will be able to solve 20 equations quickly without my “hint”.

When I try to understand why a procedure is not working I (temporarily)  insert print commands to return information about what is going on. Thus, I might want to return a clear statement in English like "The error occurs when the density is x and the critical pressure is y. " The use of  "is" in that context had nothing to do with Maple command   is(   ,  ) .

Finally, your comments about cat and || are not correct. Both x||2.3 and cat (x,23) return x||2.3. To do what I want to do I must enter xs:=convert(x,string) and then x||xs or cat(x,xs). Thanks to Robert Israel for pointing out that cat only works with integers.

You say "Generally I would suggest, that you step through some pages of a Maple introduction, as it seems you have some basic problems handling it, just do it and that will avoid frustrating and false learning."
I have been using Maple from Version 1 and have read the programming guides many times. I believe my questions are legitimate and not those of a newbie.   After I resolve the above issues I will try and find a simple example of another problem I am having with procedures–leakage. I have a procedure with the line  local q; After executing the procedure issuing the command q; returns the value of that variable. (q is an equation created within the procedure.) How can that be consistent with local? But obviously, a local variable is leaking form the procedure.

## ah ha!...

Thanks for your suggestion. The use of eval got me thinking.
I understand the problem now. If I enter the command to solve the equaition and assign to the x the value of the solution thus:

x:=solve(eq,x):

and I am not in a procedure Maple will then fully evaluate all further occurences of x fully, that is, put x = -5/3.
However, inside a procedure Maple does not evaluate fully and thus the problem For example:

>x:='y': y:=3;  x:    yields the answer 3. However, inside a procedure
"f:=proc()   x:='y': y:=3;  x end proc: f() yields the answer y.

Since my real problem involves about 20 equations I do want want to enter 20 times
eval( eq20,[x=x1,y=t1,z=z1,.....]);

I guess I could put the commands in a file and then read the file rather use a procedure.

Is there any way to get Maple to do full evaluation inside a procedure? an option perhaps?

Also, I hope someone will answer my question about the printing of the || when there is a non-integer following.

Tahnks,

## re parameters...

Thank you for the explanation. The timings make your point nicely.

## I get same message...

I get that message on 3 different era Mac's all running Maple 12.02. However, solve(-3.75+x^1.333333333); does not give that error messahe; Maple just evaluates forever until I Force Quit. And changing your example to fractions gives the correct answer!

solve(-15/16+x^(4/3));

Thanks for confirming the problem. I wonder why Vista has no problem.

## Thanks. I did go to...

Thanks. I did go to WIKIpedia and there was a discussion of various algorithms.

In pratice it seems best to issue the randomize() command once per session before invoking rand().

I am surprised that the default setting is not using the clock for the initial seed.

Thanks for the info.

## that works!...

Thank you for your reply. inserting the randomize() command after restart; does in fact, yield random strings each time it is executed. When you say "Maple's random number generator is reset as well" what is it reset to? I have not investigated how the random numbers are generated. thanks again,

## Thank you...

That does seem to be a workable solution and I will try it. (I guess I should also inform myself about  the advantages of the data structure you used– rtables.)

It seems to me that you had to really get under the hood to solve my problem.

I am curious why the events actions don't allow normal maple instructions. That would make it so much easier.

Do you find the help pages on events domewhat opaque?

Thanks again,

rick

## Thank you...

That does seem to be a workable solution and I will try it. (I guess I should also inform myself about  the advantages of the data structure you used– rtables.)

It seems to me that you had to really get under the hood to solve my problem.

I am curious why the events actions don't allow normal maple instructions. That would make it so much easier.

Do you find the help pages on events domewhat opaque?

Thanks again,

rick

## what is maple doing? I see.....

Thank you for the fix. It is pretty subtle. It is wonderful that knowledgeable people are here to help. Thanks, again

## what is maple doing? I see.....

Thank you for the fix. It is pretty subtle. It is wonderful that knowledgeable people are here to help. Thanks, again
 First 6 7 8 9 Page 8 of 9
﻿