Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

Please don't post duplicate Questions. I deleted your duplication of this Question from earlier today. If you have information to add to a Question, then either edit the original Question or post a Reply to it. Either action will put the Question back at the top of the Active Conversations stack, where it'll attract more attention.

In your duplicate, you put forth the idea that the trouble was caused by the appearence of erf in the integrals. This isn't quite true. The problem is that the integral can't be computed (to the requested precision) even numerically.

So what's the point of your solution technique? to obtain an approximate solution? There's not much point in an approximate solution if it's too complicated to use to get numeric values. On the other hand, standard numerical technique for IVPs (e.g., dsolve's rkf45) works fine on this equation.

@abbeykabir 

Matrix(n,m) makes an x m matrix of zeros; LinearAlgebra:-ZeroMatrix is superfluous.

If matrices and B have the same number of columns, then <A,B> joins them vertically; if they have the same number of rows, then <A|B> joins them horizontally.

@tkeith022

Yes, I want to help you. So, if I understand you correctly, you want the program to update a graph ONCE every minute. Is that correct? And the precise times that the program runs are not important; it's the interval of time between runs that matters. Is that correct? 

Can you do what you want from a Maple worksheet, or from the command-line interface, which will be left running, but in an essentially idle state while it waits for the timer? Do you need the timer to be relative (e.g., "one hour from now") or absolute (e.g., "at 11:53:00 pm")? Do you need the timer to reset itself after the code has executed (e.g., "execute this code every day at 11:53:00 pm")? 

@mapleq2013 Oops, I see that you're using Maple 12. There's two examples that need slight changing. I've already changed them in the Answer, but I wanted to warn you in case you'd already tried executing them. The issue is identical in both examples. I used

[x,y]=~ [X,Y]

In Maple 12, that needs to be changed to

[x= X, y= Y]

@mapleq2013 

In worksheet "not_changing", comment out the line that gives g a value. Then follow along and see which matrices depend on g and which don't. You'll see that, in the end, B and C don't depend on g, only Bm depends on g.

Update: I see that my answer is essentially the same as Acer's simultaneous answer. However, I'll leave this answer here because my point is that you can easily trace the variable dependencies yourself by commenting out one line.

@ Digits:= 15 was just a lucky guess and my first guess; it's my favorite value for Digits. It had nothing to do with the number of equations. I wish that there were a better way to choose the Digits for fsolve. This is a very common complaint about fsolve.

@Boby 

In the code that Markiyan referred to, notice the end of the second line of code:

A:= table([0= subs(u= u[0], G)])

This sets the value of A[0].

@Allan Wittkopf 

Great answer, but your interface(prettyprint= 1) style output turns into unreadable garbage when posted to MaplePrimes. I guess that you're using the Command-Line Interface? Using prettyprint=2, Classic worksheets and Standard worksheets with either 1D or 2D input transcribe well to MaplePrimes, and they'll also provide the reader with a downloadable link to the worksheet, so that they can easily continue the work.

(I also strongly discourage the use of 2D input in MaplePrimes Answers because the reader cannot be sure of what you typed, but that's another issue.)

Your line

RES:= res[(D@@4)(f)(0)];

makes no sense to me because (D@@4)(f)(0) isn't in the set extra_bcs.

@EverteQ As long as these results for L are acceptable to you, it's fine:

term:= 2*x^3*y + 5*x^2*y^2 - 6*x*y^3:
coeffs(term, [x,y,z], 'L');

     

L;

I thought that you wanted the symbolic names in term, which are {x, y}.

@mapleq2013 You asked:

what does .. mean here? Isn't .. supposed to be between two numbers as a range?

Yes, you are correct that the range operator .. always has exactly two operands, although they are not necessarily numbers. If you see it in some context where it's apparently missing one or both operands, those missing operands are NULL. This is also true of the binary infix operators =, <>, <, <=, >, >=, and ::, although, unlike .., the syntax doesn't allow those to be input "naked".

In Maple NULL isn't just a concept, it's an actual object. It can almost always be represented by the symbol NULL or by my personally preferred version, [][]. In many contexts, it can be represented by empty parentheses (). (When used to declare a procedure with a no parameters, (), not NULL, must be used.) In several contexts it can be represented by whitespace or by the absence of characters. Both NULL and [][] are expressions that require evaluation, so it's more efficient to use () or nothing at all in those contexts where the syntax allows it.

When used in the context of Array (or list or rtable) indexing, .. means the same as m..n, where m is the smallest legal index and n the largest. Likewise, a.. means a..n, and ..b means m..b.

@taro No! You've been led astray by the concept of single-level evaluation. It has nothing to do with the situation in your original Question, and, as I said, it's NOT what Preben was trying to explain. The only reason that I gave examples of it is that you asked about it in your followup. In the situation of your original Question and in each of Preben's examples, there are only two types of evaluation occurring: full evaluation or no evaluation at all. And in all those cases, there are no local variables.

@Markiyan Hirnyk It isn't reasonable to expect someone to figure this out from the help pages. Indeed, the help page that you cite is largely irrelevant because the OP isn't confused about what unapply does; they're confused about what -> does.

I find all of your "Have you read" Replies patronizing. MaplePrimes isn't meant to be a last resort to which one turns after having exhausted all other sources of help.

The internal details of the procedure should make no difference as long as it provides real-number output when given real-number input. The number of inputs to the procedure should be the number of independent variables plus the number of model parameters.

Please post a worksheet showing the procedure, the call to NonLinearFit, and the error message.

First 464 465 466 467 468 469 470 Last Page 466 of 709