Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 36 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

Extracting just the essence of Markiyan's Answer (because I find it hard to read with all the extra information), we have simply

plot(x^2);
ExcelTools:-Export(op([1,1], %), "plot.xls");

What is the point of using Grid:-Seq (or even seq) for a sequence of length 1?

Where do you get the error message? When you call dsolve or when you're filling the Array using Grid:-Seq?

You've been on MaplePrimes for a year and a half, and you've asked 24 previous questions, most of which have been answered, and most of which have been about differential equations. So, can't you even attempt to solve this problem? Your attached worksheet merely contains a statement of the problem.

@jan123 

The command add simply adds a finite and definite number of terms. There's no attempt made at any simplification more complicated than adding.

The command sum performs summation of a finite, indefinite, or infinite number of terms.

You give initial conditions for |x| < 1, but what about |x| >= 1? Since x goes from -4 to 4, you'll need to specify that.

@jbail Are you sure that you entered plot3d with all lowercase letters?

@tomleslie 

I note that the code that works in Maple 2015 has option style= pointline. That is not a valid style value in Maple 18. I don't have Maple 2015 immediately at hand to make a comparison, but I think that the style is the key to this.

@Spinosaurus You wrote:

[I]f I use Ctrl+C and Ctrl+V to insert code (plot(L0[.., 1], L0[.., 2])) from Maple in my comment, I will obtain this result: plot(L0[() .. (), 1], L0[() .. (), 2]).

When you cut and paste from 2D input to plaintext, it translates the code to an unabbreviated form. So .. becomes ()..()x-> becomes proc(x) option operator, arrowa and b becomes `and`(a,b), etc.

@brian bovril Tom's code uses the 1-argument form of add, which is new to Maple 2015. To retrofit the code, simply change add to `+`@op.

@ Hmm. I could convert the numeric evaluation of the Jacobian to compiled code. By using float[8] Matrices and Vectors in the call to LinearSolve, you could get it to use the compiled code.

@Konstantin@ 

I believe that database files are constructed with every line being equal in length. Certainly this has been true for every database system that I've ever worked with. So I don't think that there is a more-elegant solution.

@testht06 

You should know by now what I'm going to say: Ask it as a new Question/thread! Why are you so resistant to asking new Questions?

@ 

It is no surprise that you hadn't found it. The idea that one would need to load an environment, or that there would be more than one of them, seems counterintuitive to me, and poorly documented. Now that I understand the concept, it makes sense that there are multiple environments.

I don't see your attached worksheet. 

@tomleslie You wrote:

so I never did find out why $ was so much slower than seq - I just stopped using $

It's not as simple as that. Even if temporal efficiency were the only criterion by which to decide between and seq, one couldn't say that seq was always better. In the case under discussion in this thread---the repetition of a single term---is about twice as fast.


restart:

ulim:=10^8:

t1:=time():

ans:= x $ ulim:

t2:= time()-t1;

 

3.125

restart:

ulim:=10^8:

t1:= time():

ans:= seq(x, i= 1..ulim):       

t2:= time()-t1;

 

6.094


Download seq_vs_$.mw

 

First 489 490 491 492 493 494 495 Last Page 491 of 709