octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #10022] [octave forge] (mapping) Auxillary


From: Philip Nienhuis
Subject: [Octave-patch-tracker] [patch #10022] [octave forge] (mapping) Auxillary Latitudes
Date: Sun, 17 Oct 2021 14:52:45 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #10, patch #10022 (project octave):

I pushed rect2geo here:
http://hg.code.sf.net/p/octave/mapping//rev/5d625af9eea8

I edited style (Texinfo & code) a bit.
Note that your rect2geo.m only processed scalars or row vectors properly,
other shapes resulted in scalar (and incorrect) output. Where you had this:

    A = [mu;
        ((3 / 2) * n - (27 / 32) * n3) * sin(2 * mu);
        ((21 / 16) * n2 - (55 / 32) * n4) * sin(4 * mu);
        ((151 / 48) * n3) * sin(6 * mu);
        ((1097 / 512) * n4) * sin(8 * mu)];
    phi = sum (A); 


... I changed it into:

  phi = mu .+ ...
        (((3 / 2) * n - (27 / 32) * n3) * sin (2 * mu)) .+ ...
        (((21 / 16) * n2 - (55 / 32) * n4) * sin (4 * mu)) .+ ...
        (((151 / 48) * n3) * sin (6 * mu)) .+ ...
        (((1097 / 512) * n4) * sin (8 * mu));


... that way rect2geo will accept about any shape of input.

Thanks so far.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?10022>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]