Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Muhammad Ali Whether an Array or a table is faster depends on the operation. Let n be the size of the structure: table, Array, set, list. Searching the structure for a particular item takes

  • table: O(1)  (when you're searching the indices, not the entries)
  • Array: O(n)
  • list: O(n)
  • set: O(log(n))  (because sets are stored sorted)

Constructing the structure takes

  • table: O(n) ??? (Not sure about this one; might be O(n*log(log(n))).)
  • Array: O(n)
  • list: O(n)
  • set: O(n*log(n))

 

 

 

@Alejandro Jakubi Yes, that worked. Thanks.

@mehran1520 You need to download the module package DirectSearch from the Maple Applications Center.

Can you give ranges or sample values for the parameters C1, C2, M, Q, lambda, and tau? Obviously you have some if you intended to plot it.

The most likely scenario is that numeric evaluation of the expression over the region of interest yields imaginary parts very close to zero. These imaginary parts are due to round-off error in the floating-point evaluation. They would be zero in exact arithmetic. These can be safely removed by applying Re to the expression. But you must first check that the imaginary parts are close to zero.

@Markiyan Hirnyk 

I edited it. Try again. I am sure that it is attached now.

@Markiyan Hirnyk 

The last Reply had formatting problems, and unfortunately it cannot be edited. So this time I'll attach the executed worksheet without including it inline.

dsolve_value.mw

@Markiyan Hirnyk 

I executed the following in Maple 16.

 

 

Download dsolve_value.mw

@Preben Alsholm I get dsolve results with unevaluated integrals, and hence _z1, in Maple 16 but not Maple 17 or 18. I don't have Maple 15 to check.

How about showing us what you have so far?

I don't know the solution. I just wanted to confirm for you that something is indeed wrong with your installation. The Greek letters when spelled out should all display in their Greek form. Your Greek palette shows them mostly displaying as Roman letters.

@henrylyl 

If you define pG:= Array(1..3) followed by pG:= foo, then pG is no longer an Array; it becomes whatever type of object foo is. In your code foo was a list. If you use an index, as in pG[1]:= foo, then pG is still an Array.

In your example above, your Array declaration is wrong. It should be expr1:= Array(1..2, [x^2, x]), which can be abbreviated to Array([x^2, x]). Effectively the same is expr1:= < x^2, x >.

@henrylyl My experimenting shows that the option useunits= [Unit(A), Unit(B)] only affects how the axes are labelled. It does not convert the units, like you said. You can wrap the expression being plotted with a convert command.

@henrylyl 

A^%T means the transpose of A. I used it to convert a column vector to a row vector.

The shortcut to create a row vector is < x | y | z >. In prefix form that would be `<|>`(x,y,z).

If you had made pG in the same manner as G, then the code to display the Array of plots would be simply

display(< display~(G), display~(pG) >);

But the way that your code was, pG was a list, not an Array.

You could guess at the general form of the curve and then apply regression through Statistics:-Fit. Can you post a worksheet with the plot so that I can extract the data from it?

@henrylyl I don't know about the units conversion in plots. The answer may be on the help page ?plot,units . There is a lot of information there, and I don't fully understand it yet. I need to do some experiments.

Regarding your other question about displaying the array of plots, it can be done like this:

display(< display~(G), display~(< pG[] >)^%T >);

First 556 557 558 559 560 561 562 Last Page 558 of 709