Carl Love

Carl Love

28100 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@brian bovril The opposite of NextTo(a, b, V) is Rel(NotNextTo, a, b, V)).

Update: There's a problem with using NotNextTo: I decided not to make it an export of the module. It's been a very long time, so I can't remember why. So the above is the internal form of the negation of a NextTo constraint. Internally, I also have a way to express the negation of almost any constraint. So here's a way to negate a NextTo using accessible exports:

The negation of NextTo(a, b, V) is Rel(Separated, a, b, V, [1]),

i.e., a and b are separated by a distance of at least 1 when measured wrt V. Since Separated is an export of the dynamic module, this constraint needs to be specified after the with is executed.

I added "physics package" to the tags, in the hope that Edgardo would see.

@boris_m I can't reproduce it in any version of Maple that I have. That includes Maple 17.02/32-bit on Windows 8.1/64-bit.

The nature of the problem is that it is acting as if zip is an unknown function. Check if a regular zip command works for you at the top level. If it does, then try this

m:= module()
option package;
export
     `*`:= proc(a::list, b::list)
     option overload;
     local i, L:= zip(:-`*`, a, b);
          if L::function then
               print(L);
               error "No zip."
          end if;        
          add(i, i in L);
     end proc
;    
end module;

If that doesn't work, we can do it without zip like this:

m:= module()
option package;
export
     `*`:= proc(a::list, b::list)
     option overload;
          `+`(:-`*`~(a,b)[])
     end proc
;    
end module;

Please post your exact code.

@Ratch You claim that solve in Maple 16 did not work for you. Using Maple 16.02, I got nine solutions with solve. Eight are nonreal, and there's the real solution given by fsolve.

@Markiyan Hirnyk Nevermind. I made a typo transcribing the equations from the OP.

@Markiyan Hirnyk Using the first answer from DirectSearch:-SolveEquations, I get much higher residuals than what it reports.

@maple_leeon You need to load the procedure JoggedLine before you can use it. You need to cut-and-paste it into your Maple session from the post that I linked to.

Before you ask, or waste time attempting, I see no way of solving this with my LogicProblem package.

@Markiyan Hirnyk He made a reply by private email that he otherwise would have made in MaplePrimes. He did this because of the disordering of Replies. It was a Reply that I was interested in reading. That is "starting to leave". I didn't say he that he had left. But, he hasn't participated since making that Reply three hours ago.

@Markiyan Hirnyk Two hours ago, in the Question thread "Maple 17 freezes", Alejandro Jakubi made the following Reply to a Reply by John Fredsted:

Changing location: I will answer to you by private mail as soon as possible. I prefer moving away, as this site is falling appart. In particular, the disorder on threads like this one is untolerable for me.

@Shanobadur Sure, it's just a minor modifcation.

Inverse:= proc(a,b,c,d)
local D;
    D:= a*d-b*c;
    if D=0 then
         error "Not invertible."
    else
        (d, -b, -c, a) /~ D
    end if
end proc:

Inverse(1,2,3,4);

@J4James Your solution treats a, b, and c as if they were scalars; and makes U = -6*a*i + b*j + c*k and likewise for V.

@YasH 

M:= Matrix(2, 2, [1,2,3,4], order= Fortran_order);

 

CodeGeneration:-Fortran(M);

      cg3(1,1) = 1
      cg3(1,2) = 2
      cg3(2,1) = 3
      cg3(2,2) = 4

The order in which the entries are filled in the Fortran program is not Fortran order. Fortran order would be cg3(1,1), cg3(2,1), cg3(1,2), cg3(2,2).

 

It looks fine to me. Can you show an example of it not working?

First 568 569 570 571 572 573 574 Last Page 570 of 709