Carl Love

Carl Love

28035 Reputation

25 Badges

12 years, 321 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@annasophie 

You do call rand with (1..6), but rand is a procedure that returns a procedure (when it's called with a range), i.e., a procedure-valued procedure. Then that returned procedure needs to be called with ().

@torabi 

Can you please say which equation numbers in the paper specify an ODE BVP? 

@vv 
Vote up. Probably more robust than evalb(simplify(A = B)) is evalb(simplify(A - B) = 0) when and B are type algebraic.

Please don't leave! I've worked extensively over the past several days on the Sheikholeslami, et al, paper that you asked about last week. In particular, I've generated all 12 3-D plots from the paper, and I've written extensively on how to do that. I simply haven't posted it yet because I've been camping in a remote mountain location without Internet access (I'm posting this from my phone with a very tenuous 1-bar 4G LTE connection). So, you'd be very stupid to leave.

@Kitonum 

It's not a bug: evalb(A = B) returns true iff and are identical under automatic simplification. That's the way it was designed, and that's the way that it's always been. Maple has a plethora of other simplifiers and comparators. Perhaps because of this evalb should be considered for moderate-to-advanced-level users, with is being the default comparator for beginners. See also command verify.

@seppe 

I can anticipate your next question: 

Question: If I have a cascade of evaluations, such as L:= [x[1,1]] where x is subsequently assigned an Array, how can I access the intermediate levels, i.e., the [x[1,1]]?

Answer: You pass to eval a level number as its second argument, as in eval(L,1)eval(L,2), etc.

My next Answer, which I'm posting forthwith, has several elaborate examples of this.

The same thing happens to me, very often. In particular, I get the same sans serif K and C that you show. Sorry, but I don't know how to correct it. If it's any consolation, it only affects the prettyprinted display of expressions, not their internally stored values, which you can see with command lprint.

It seems to go away if I completely shut down Maple and restart it. Since I very often have about 10 worksheets open simultaneously, I hate needing to shut down Maple.

@seppe I still think that you're missing it. Inside a procedure, the way to access the assigned value of a parameter t declared as ::evaln or ::uneval is eval(t), not evaln(t).

And here is the line from my previous answer where I said that:

  • In all these cases, the assigned value of the expression or name can be obtained inside the procedure as eval(t).

@waseem Waseem,

Is the Galerkin FEM the same thing as the variational FEM discussed in the papers by Gupta, et al, that we were discussing in another recent thread? And, if so, was the Matlab code being discussed here provided by them?

To begin with, you have too many initial and boundary conditions. There should be 8, and you have 12. There are several other issues, but I can't even begin to address them until you correct that.

@sand15 So, I suppose that you consider that my painstakingly crafted answers to the very long series of questions that you posed in your worksheet deserves no acknowledgement, let alone thanks or a vote up.

@seppe Please carefully reread my previous answer, because I had already anticipated your most-recent question, and I explicitly answered it.

Please let me know when you find the answer. And if you can't find it, I'll give more details.

@seppe It is true that in the vast majority of cases, "only the value is passed to the procedure", and the procedure never sees the associated name. To change this, you need to do it in the parameter declarations, like this:

NameOf:= proc(t::evaln) convert(t, string) end proc:
or, simpler,
NameOf:= (t::evaln)-> convert(t, 'string'):

If you want to require that t be assigned a particular type of object, such as an Array, you could make that

NameOf:= (t::evaln(Array))-> convert(t, string):

Analogous to the unevaluation quotes, if you don't even care whether there's an associated name, you could do

AsPassed:= (t::uneval)-> convert(t, string):

(It won't always be 100% exactly as passed because things called automatic simplifications will always be done: 1+1 will always be 2{2,1} will always become {1,2}, etc.)

In all these cases, the assigned value of the expression or name can be obtained inside the procedure as eval(t).

What you said about Diff is completely wrong. You can verify that by

x:= 3:
Diff(f(x,y), x);

You need to show me an example that made you believe what you said so that I can explain to you what's actually happening.

@tomleslie The variable x in the Matlab code is declared as type syms, i.e., symbolic. As far as I see, it's the only such variable. The one diff and the several ints are wrt x.

@Rohith This is yet another bug in Maple's 2D Input. I never use it (I use Maple Input (aka 1D input)), so I didn't know, but it's not surprising. I'm glad that you figured out a workaround. 

I just made a very small change to the most-recent code, so you should download it again. The change will not make any difference with the examples that we've worked on already; it's just in anticipation of the future.

First 303 304 305 306 307 308 309 Last Page 305 of 708