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

@Alex Smith Indeed, this method is amazingly fast.

@Markiyan Hirnyk My comment was directed to the OP and I was referring to the code in the original question, not to your code.

@Preben Alsholm Note that the last procedure in an overload chain does not need option overload. So, your Unassign needs no subsop and can be simplified to

Unassign:= overload([
     proc(s::string) option overload; unassign(parse(s)) end proc,
     unassign
]):

Also, the versions that use parse will only work on top-level variables. Of course, that covers the vast majority of cases where one would use unassign. The regular unassign will work on local variables in procedures.

@nm Could you explain what made you consider sqrfree, especially considering that the input is not a polynomial?

@acer My results are quite different from yours. Are you sure that you do not have UseHardwareFloats set to false in an initialization file? I do not get an invocation of `evalf/constant/Pi` unless I have UseHardwareFloats set to false or I request more than 15 digits.

With the default settings of Digits and UseHardwareFloats, the following code causes a complete freeze of Maple---both the kernel and the GUI:

printlevel:= 1000:
evalf(3/Pi, 1);

@adel-00 I need to retrofit the code for Maple 15. Try this. The only thing different is the word Matrix in the second line.

P:= plot(Spec, -15..15, ...the rest of your plot options):

A:= Matrix(op([1,1], P)):  #The data matrix from the plot
Smax1:= max(A[..,2]):
A[..,2]:= A[..,2]/Smax1:
P:= subsop([1,1]= A, P):
print(P);

I don't have Maple 15 to test this. So please let me know how it goes.

Note that the tangent line is not the same as the derivative. Your code plots the curve and its derivative rather than the curve and its tangent line.

@Kitonum This is a classic problem of computer science. Indeed, there is a solution in the Maple help files at ?Threads,Task,Continue .

@Markiyan Hirnyk I only have a replica Answer if I am entering my Answer at the same time that the other person is entering theirs.

@adel-00 By "shorter form" I mean that it should be

P:= plot(Spec, -15..15, ...);

not

P:= plot(Spec(d), d= -15..15, ...);

The shorter form is also called the "procedure form" of the plot command.

Also note that this command will not actually show the plot. That will be done by the print command after the curve is normalized by the maximum.

@danlun So the question is to find the x that makes it true, if possible.

The factorization of a polynomial with rational coefficients into its irreducible (prime) factors is unique. Thus, just apply factor to the large polynomial, as yesterday, after correctly adding the multiplication signs. If your desired factors don't pop out, then it's not possible.

@adel-00 The commands above are meant to come after the plot command, which must be assigned to a variable. Like this:

P:= plot(Spec, -15..15, ...the rest of your plot options):

A:= op([1,1], P):  #The data matrix from the plot
Smax1:= max(A[..,2]):
A[..,2]:= A[..,2]/Smax1:
P:= subsop([1,1]= A, P):
print(P);

Note the form of the plot command! It is not plot(Spec(d), d= -15..15, ...). When I use the shorter form and the parameter values theta:= Pi/3; phi:= Pi; then it runs in 62 seconds---long, but not unreasonable.

Please let me know if you can make the above work.

@Bendesarts wrote:

The system is a ODE with 15 parameters and many trigonometric function for the coefficients. It's big but for a a mechanical system a bit complex is not huge.

One point which makes the system looks like very big comes from the fact that i have copy the matrix with copy/paste for my code where i have applied machanical theorem so as to obtain the equations. When you do like this, the copied matrix are good but they looks likes with a strange form which takes a lot of place.

My assessment of the size of the system is based purely on the length command and not on visual appearance of your matrices. The length of 2 Gig means that if your system were printed out, it would be more than 100,000 pages. I don't think that's what you meant by "big...but not huge". The huge size is the result of inverting 12x12 matrices with symbolic entries, and then multiplying those inverses by other symbolic matrices.

I have a feeling that you canuse numeric dsolve before doing the inverses and then invert numerically. But I don't know exactly how to do it.

@Deltafee Your commands are correct. Your final result is quite different than mine. However, it may fit the data just as well. Nonlinear fits can have many local minima, and yours just converged on a different point than mine.

@nm Very good. I vote up. You'll soon have enough points to edit your posts.

First 594 595 596 597 598 599 600 Last Page 596 of 709