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

@tomleslie Thanks, Tom. This one is interesting enough, regardless of whether it's exactly the same as your original.

So, if you take this very same worksheet (no copying) and re-execute it (by Ctrl-Shift-Enter or by Edit->Execute->Worksheet), does the error still occur?

@tsunamiBTP Yes, you may edit the original Question, including changing the atached file. Click on the More arrow at the bottom of the Question, then Edit.

@tomleslie Tom, Would you please post an executed copy of the worksheet showing the error occuring in 1D input? I have a feeling that the NULL-valued N[i] is not being transferred when you copy-and-paste to 1D. I think that this is a bug introduced into the 2D input in Maple 2017. Previously, the 2D input has had trouble with the statement

N[i]:= ();

which is a fine statement in 1D input.

I think that the problem is the number of variables, not the number of parentheses. There are 46 variables. If you were to construct a truth table for this expression, it would have 2^46 = 70 trillion rows.

If you delete the parentheses, some trivial simplifications come up, but you've completely altered the meaning of the expression, so any simplification is worthless.

 

@Ramakrishnan Your worksheet works for me without error. I suspect that your problem has something to do with the input format. I strongly disdain the 2D Input that you're using (It's not your fault, because it's the default.), especially for multi-line blocks of code like for loops. Try copying you loops to a 1D Input (aka Maple Input) field.

  1. Why do you want the result specifically to be a Matrix? You have the rows indexed by time and the columns indexed by frequency. Using a Matrix forces the number of entries to be (1 + number of times) x (1 + number of frequencies). By using a table instead of a Matrix, you wouldn't be restricted to the rectangular format; you could have separate times for each frequency.
  2. The way that you defined S3, it is an expression, not a procedure. Yet in the Matrix command you invoke S3(k) as if it were a procedure. Consequently, the current Matrix is filled with garbage, as you'll see if you inspect a few random entries.
  3. How would you do it in Matlab? It may be worthwhile us to directly translate some Matlab code.
  4. All you're doing is numerically evaluating S3 and different values of t of k. So why isn't having a procedure S3 of parameters t and k good enough? Why do you need a huge file of numeric evaluations of that procedure? It's not as if the procedure would take any significant amount of time to evaluate---it's quite a simple procedure.

@tsunamiBTP I might give a thumbs up to a Question that I recognize deserves further attention from someone else and that has sufficient richness and complexity, but for which I currently don't have an Answer.

I can't run your code because I don't have the module action1.

@tomleslie Your Answer doesn't take into account that the final product is supposed to be an animation of two frames.

@Jason Lee For the new problem, you should have

b:= A[.., 7];
C:= A[.., [1..6, 8..11]];

Is that what you have? The indexing for C can also be abbreviated to A[.., [..6, 8..]].

@qyyj

faultcom={};

should be changed to

faultcom:= {};

and likewise for the following line.

 

@juju1234 After you change a cell value, try pressing Ctrl-Shift-Enter. This'll re-execute everything. Changing something on the screen, such as a cell value in B, doesn't change what's stored in Maple's computational memory (aka the kernel). That B stored in memory won't change until you press Enter on the line (or execution group) with the updated cell. Ctrl-Shift-Enter is like pressing Enter on every line (or execution group) that contains code.

@Volker Lehner I thought that it'd be important to re-emphasize this for a new user: To enter a new line in a block of code (a procedure or whatever), you must use Shift-Enter, not Enter. Using Enter makes the cursor "jump out" as you say. It also causes the code to be syntax checked and evaluated.

@Rouben Rostamian  In order to use arguments that are passed in square brackets immediately to the right of the procedure's name, the procedure must access those arguments via the construct op(procname). If this isn't done, then those arguments are completely ignored, which is what's happening in your g[12](5) example.

By tracing the execution by using high settings of printlevel, I see that is(ex, rational) and is(ex, irrational) (for symbolic constant expressions ex) uses a lot of decimal approximations. This suggests that the setting of Digits might affect the outcome.

First 352 353 354 355 356 357 358 Last Page 354 of 709