Carl Love

Carl Love

28110 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

How do you expect anyone to help given so little information? Can you provide a detailed specification of your original problem? I don't mean an upload of your C++ code.

@Hayno What is your ultimate goal here? Do you want a procedure which when given a line and a triangle decides whether the line intersects the triangle? Or do you want a procedure which when given a point and a triangle decides whether the point is inside the triangle?

@danlun You are asking me questions about how the GUI works, which I really don't know much about. Hopefully someone else can answer.

You can take any Maple output and see it with all the proper symbols by assigning that output to a variable, say Sol, and then giving the command lprint(Sol). If you intend to cut-and-paste the output in a form that is acceptable for later re-input, then you should use lprint.

What is the actual range of dates for your plot? That is, tell me the exact lowest date and the exact highest date. Whatever those dates are, they are being translated into the range 36907 - 36937. So I guess it's 31 days.

We can probably make the correction just by relabelling the tickmarks on your plot.

You have 16 equations with 11 unknowns. You are solving for only 8 of the unknowns. There are too many equations.

@adel-00 Of course it doesn't start at 1. You just divided a curve by its maximum. It should end at 1.

As for the speed, your function is very complicated. You may be able to speed it up some by changing sum to add.

@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.

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