function [ x, w ] = rule23 ( n )

%*****************************************************************************80
%
%% rule23() returns the rule of degree 23.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 July 2014
%
%  Author:
%
%    Original FORTRAN77 version by Hong Xiao, Zydrunas Gimbutas.
%    This MATLAB version by John Burkardt.
%
%  Reference:
%
%    Hong Xiao, Zydrunas Gimbutas,
%    A numerical algorithm for the construction of efficient quadrature
%    rules in two and higher dimensions,
%    Computers and Mathematics with Applications,
%    Volume 59, 2010, pages 663-676.
%
%  Input:
%
%    integer N, the number of nodes.
%
%  Output:
%
%    real X(2,N), the coordinates of the nodes.
%
%    real W(N), the weights.
%
  xs = [ ...
    0.1922689542773817,-.1922689542773816, ...
    -.9880860844879094,0.9880860844879096, ...
    0.4588599108929147,-.4588599108929146, ...
    0.2847661416086631,-.2847661416086630, ...
    0.8023730521007825,-.8023730521007822, ...
    -.4008300617025742,0.4008300617025743, ...
    0.9128169992246806,-.9128169992246804, ...
    0.6402796135160949,-.6402796135160946, ...
    0.6316970739891037,-.6316970739891037, ...
    -.5737921022421535,0.5737921022421535, ...
    0.4346256934364524,-.4346256934364522, ...
    0.7764676048715878,-.7764676048715878, ...
    0.7244917270725689,-.7244917270725689, ...
    -.1888739484686455,0.1888739484686456, ...
    0.9943536134460622,-.9943536134460622, ...
    -.7313948142734760,0.7313948142734760, ...
    0.8943097577057932,-.8943097577057932, ...
    0.8436479267198643,-.8436479267198643, ...
    0.7791831851449014,-.7791831851449014, ...
    0.8641774713700604,-.8641774713700604, ...
    0.9617690298704565,-.9617690298704563, ...
    -.4195385320317492,0.4195385320317493, ...
    0.2226040785176633,-.2226040785176632, ...
    0.9898168214058006,-.9898168214058006, ...
    -.7489474270848241,0.7489474270848243, ...
    0.1917103338448669E-01,-.1917103338448658E-01, ...
    0.9493597561722253,-.9493597561722253, ...
    0.9904394141829281,-.9904394141829279, ...
    -.5829692270288439,0.5829692270288439, ...
    -.6147395289066456,0.6147395289066458, ...
    0.9535616627723794,-.9535616627723796, ...
    -.2159492946526814,0.2159492946526815, ...
    0.6262127585905694,-.6262127585905694, ...
    0.9907200353310519,-.9907200353310519, ...
    0.9843113976598121,-.9843113976598121, ...
    -.8786718625785459,0.8786718625785461, ...
    0.9324996820585237,-.9324996820585237, ...
    0.8556365285580105,-.8556365285580105, ...
    0.6098296498831587,-.6098296498831587, ...
    0.2401978383668566E-02,-.2401978383668536E-02, ...
    -.2160362298752296,0.2160362298752297, ...
    0.9419047852611938,-.9419047852611938, ...
    0.9784325270256451,-.9784325270256451, ...
    0.4245835794119392,-.4245835794119392, ...
    0.2180806198402934,-.2180806198402933, ...
    0.4211715480246619,-.4211715480246619, ...
    0.2159184187190165,-.2159184187190165, ...
    0.9145012870119151,-.9145012870119151, ...
    -.6659715296954374E-02,0.6659715296954456E-02 ];
  ys = [ ...
    -.8413204499428454,0.8413204499428454, ...
    -.9814588472800125,0.9814588472800123, ...
    -.6684346870698402,0.6684346870698402, ...
    -.7992729842209235,0.7992729842209235, ...
    -.9416742417176776,0.9416742417176776, ...
    -.6678440121187212,0.6678440121187212, ...
    -.9891421484914774,0.9891421484914776, ...
    -.9915720334011255,0.9915720334011255, ...
    -.4898989236348730,0.4898989236348731, ...
    -.4662751769077947,0.4662751769077946, ...
    -.9416451658784137,0.9416451658784137, ...
    -.2882717499568009,0.2882717499568010, ...
    0.2486649083667506,-.2486649083667505, ...
    -.9882692965051619,0.9882692965051619, ...
    0.7885280263196212,-.7885280263196209, ...
    -.6589298745979582,0.6589298745979582, ...
    -.5251907426680982,0.5251907426680982, ...
    0.2698952252390472E-01,-.2698952252390462E-01, ...
    -.7058148204376444,0.7058148204376444, ...
    0.8039684450793269,-.8039684450793269, ...
    -.9795669903911515,0.9795669903911517, ...
    -.9436139885736695,0.9436139885736695, ...
    -.9897986315498021,0.9897986315498021, ...
    -.1515697280553813E-02,0.1515697280553934E-02, ...
    -.9288927030420643,0.9288927030420643, ...
    -.9319407769628315,0.9319407769628315, ...
    0.6363710989431733,-.6363710989431731, ...
    -.9179467622904829,0.9179467622904831, ...
    -.8263113277740309,0.8263113277740309, ...
    -.9928811295871781,0.9928811295871781, ...
    0.9091589955140115,-.9091589955140112, ...
    -.4548720285260120,0.4548720285260120, ...
    -.8475542857772346,0.8475542857772346, ...
    0.4247422802343108,-.4247422802343107, ...
    -.3947150748420805,0.3947150748420806, ...
    -.9832744227413978,0.9832744227413978, ...
    -.1923063082978693,0.1923063082978694, ...
    0.4580266855460115,-.4580266855460114, ...
    -.4698541060861779E-01,0.4698541060861786E-01, ...
    -.2437626817883838,0.2437626817883838, ...
    -.8348003321715464,0.8348003321715464, ...
    0.2268917425003757,-.2268917425003756, ...
    -.6927513253690014,0.6927513253690016, ...
    -.2736597506928621,0.2736597506928621, ...
    -.4885665960318681,0.4885665960318681, ...
    0.2093478053463650,-.2093478053463650, ...
    -.1584479979856305E-01,0.1584479979856307E-01, ...
    -.8398490539050634,0.8398490539050636, ...
    -.6725993072235357,0.6725993072235357 ];
  ws = [ ...
    0.2087996398690324E-01,0.2087996398690324E-01, ...
    0.1454948755827531E-02,0.1454948755827531E-02, ...
    0.4748321475897626E-01,0.4748321475897626E-01, ...
    0.2581005409389433E-01,0.2581005409389433E-01, ...
    0.1501004260111713E-01,0.1501004260111713E-01, ...
    0.4842495146008856E-01,0.4842495146008856E-01, ...
    0.2506826413864942E-02,0.2506826413864942E-02, ...
    0.6535276655159778E-02,0.6535276655159778E-02, ...
    0.4894280385061923E-01,0.4894280385061923E-01, ...
    0.4975905503606815E-01,0.4975905503606815E-01, ...
    0.2214413184536724E-01,0.2214413184536724E-01, ...
    0.4313124475180520E-01,0.4313124475180520E-01, ...
    0.4433897643935200E-01,0.4433897643935200E-01, ...
    0.9046276329783944E-02,0.9046276329783944E-02, ...
    0.3911096929389304E-02,0.3911096929389304E-02, ...
    0.3599231426419872E-01,0.3599231426419872E-01, ...
    0.2838276711743061E-01,0.2838276711743061E-01, ...
    0.3373992192798946E-01,0.3373992192798946E-01, ...
    0.3336454855497337E-01,0.3336454855497337E-01, ...
    0.2095059245259030E-01,0.2095059245259030E-01, ...
    0.2046044703097752E-02,0.2046044703097752E-02, ...
    0.2164205919445887E-01,0.2164205919445887E-01, ...
    0.8285628342573098E-02,0.8285628342573098E-02, ...
    0.8397251850551729E-02,0.8397251850551729E-02, ...
    0.1731140501927820E-01,0.1731140501927820E-01, ...
    0.2467601783099452E-01,0.2467601783099452E-01, ...
    0.1682157937509966E-01,0.1682157937509966E-01, ...
    0.3331814718792869E-02,0.3331814718792869E-02, ...
    0.3259337068821334E-01,0.3259337068821334E-01, ...
    0.6005493842446140E-02,0.6005493842446140E-02, ...
    0.8210801440654199E-02,0.8210801440654199E-02, ...
    0.6548837153964436E-01,0.6548837153964436E-01, ...
    0.3088139176161778E-01,0.3088139176161778E-01, ...
    0.7183392776926659E-02,0.7183392776926659E-02, ...
    0.9748230121097153E-02,0.9748230121097153E-02, ...
    0.5383514720217621E-02,0.5383514720217621E-02, ...
    0.2224440941283463E-01,0.2224440941283463E-01, ...
    0.3213763319312607E-01,0.3213763319312607E-01, ...
    0.5959500864875663E-01,0.5959500864875663E-01, ...
    0.7353356562572214E-01,0.7353356562572214E-01, ...
    0.3920268743920687E-01,0.3920268743920687E-01, ...
    0.2191097090277860E-01,0.2191097090277860E-01, ...
    0.1035031173873475E-01,0.1035031173873475E-01, ...
    0.6659548623039759E-01,0.6659548623039759E-01, ...
    0.6553251667930458E-01,0.6553251667930458E-01, ...
    0.6644084983327379E-01,0.6644084983327379E-01, ...
    0.7384544963870446E-01,0.7384544963870446E-01, ...
    0.1649581640678158E-01,0.1649581640678158E-01, ...
    0.5651348047241081E-01,0.5651348047241081E-01 ];

  x(1,1:n) = xs(1:n);
  x(2,1:n) = ys(1:n);
  w(1:n) = ws(1:n);

  return
end
