r38_0550.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697
  1. <a name=r38_0550>
  2. <title>Axes_names</title></a>
  3. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  4. E"></p>
  5. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  6. <b>AXES NAMES</b><P>
  7. <P>
  8. Inside REDUCE the choice of variable names for a graph is completely
  9. free. For referring to the GNUPLOT axes the names
  10. X and Y for 2 dimensions, X,Y and Z for 3 dimensions are used
  11. in the usual schoolbook sense independent from the variables of
  12. the REDUCE expression.
  13. <P>
  14. <P>
  15. <P> <H3>
  16. examples: </H3>
  17. <p><pre><tt></tt></pre><p>
  18. <a name=r38_0551>
  19. <title>Pointset</title></a>
  20. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  21. E"></p>
  22. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  23. <b>POINTSET</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>type</b><P>
  24. <P>
  25. <P>
  26. <P>
  27. A curve can be give as a set of precomputed points (a polygon)
  28. in 2 or 3 dimensions. Such a point set is a
  29. <a href=r38_0050.html#r38_0053>list</a>
  30. of points, where each point is a
  31. <a href=r38_0050.html#r38_0053>list</a> 2 (or 3)
  32. numbers. These numbers are interpreted as <em>(x,y)</em>
  33. (or <em>x,y,z</em>) coordinates. All points of one set must have
  34. the same dimension.
  35. <P>
  36. <P>
  37. <P> <H3>
  38. examples: </H3>
  39. <p><pre><tt></tt></pre><p>Also a surface in 3d can be given by precomputed point
  40. s,
  41. but only on a logically orthogonal mesh: the surface is defined
  42. by a list of curves (in 3d) which must have a uniform length.
  43. GNUPLOT then will draw an orthogonal mesh by first drawing the
  44. given lines, and second connecting the 1st point of the 1st curve
  45. with the 1st point of the 2nd curve, that one with the 1st point
  46. of the 3rd curve and so on for all curves and for all indexes.
  47. <P>
  48. <P>
  49. <a name=r38_0552>
  50. <title>PLOT</title></a>
  51. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  52. E"></p>
  53. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  54. <b>PLOT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  55. <P>
  56. <P>
  57. <P>
  58. The command <em>plot</em> is the main entry for drawing a
  59. picture from inside REDUCE.
  60. <P>
  61. <P>
  62. <P> <H3>
  63. syntax: </H3>
  64. <em>plot</em>(&lt;spec&gt;,&lt;spec&gt;,...)
  65. <P>
  66. <P>
  67. <P>
  68. where &lt;spec&gt; is a &lt;function&gt;, a &lt;range&gt; or an &lt;option&gt;.
  69. <P>
  70. <P>
  71. &lt;function&gt;:
  72. <P>
  73. <P>
  74. - an expression depending
  75. on one unknown (e.g. <em>sin(x)</em> or two unknowns (e.g.
  76. <em>sin(x+y)</em>,
  77. <P>
  78. <P>
  79. - an equation with a function on its right-hand
  80. side and a single name on its left-hand side (e.g.
  81. <em>z=sin(x+y)</em> where the name on the left-hand side specifies
  82. the dependent variable.
  83. <P>
  84. <P>
  85. - a list of functions:
  86. if in 2 dimensions the picture should have more than one
  87. curve the expressions can be given as list (e.g. <em>{sin(x),cos(x)}</em>).
  88. <P>
  89. <P>
  90. - an equation with zero left or right hand side describing
  91. an implicit curve in two dimensions (e.g. <em>x**3+x*y**3-9x=0</em>).
  92. <P>
  93. <P>
  94. - a point set: the graph can be given
  95. as point set in 2 dimensions or a
  96. <a href=r38_0550.html#r38_0551>pointset</a> or pointset list
  97. in 3 dimensions.
  98. <P>
  99. <P>
  100. &lt;range&gt;:
  101. <P>
  102. <P>
  103. Each dependent and independent variable can be limited
  104. to an interval by an equation where the left-hand side specifies
  105. the variable and the right-hand side defines the
  106. <a href=r38_0400.html#r38_0423>interval</a>,
  107. e.g. <em>x=( -3 .. 5)</em>.
  108. <P>
  109. <P>
  110. If omitted the independent variables
  111. range from -10 to 10 and the dependent variable is limited only
  112. by the precision of the IEEE floating point arithmetic.
  113. <P>
  114. <P>
  115. &lt;option&gt;:
  116. <P>
  117. <P>
  118. An option can be an equation equating a variable
  119. and a value (in general a string), or a keyword(GNUPLOT switch).
  120. These have to be included in the gnuplot command arguments directly.
  121. Strings have to be enclosed in
  122. string quotes (see
  123. <a href=r38_0001.html#r38_0003>string</a>). Available options are:
  124. <P>
  125. <P>
  126. <a href=r38_0550.html#r38_0554>title</a>: assign a heading (default: empty)
  127. <P>
  128. <P>
  129. <a href=r38_0550.html#r38_0555>xlabel</a>: set label for the x axis
  130. <P>
  131. <P>
  132. <a href=r38_0550.html#r38_0556>ylabel</a>: set label for the y axis
  133. <P>
  134. <P>
  135. <a href=r38_0550.html#r38_0557>zlabel</a>: set label for the z axis
  136. <P>
  137. <P>
  138. <a href=r38_0550.html#r38_0558>terminal</a>: select an output device
  139. <P>
  140. <P>
  141. <a href=r38_0550.html#r38_0559>size</a>: rescale the picture
  142. <P>
  143. <P>
  144. <a href=r38_0550.html#r38_0560>view</a>: set a viewpoint
  145. <P>
  146. <P>
  147. <em>(no)</em>
  148. <a href=r38_0550.html#r38_0561>contour</a>: 3d: add contour lines
  149. <P>
  150. <P>
  151. <em>(no)</em>
  152. <a href=r38_0550.html#r38_0562>surface</a>: 3d: draw surface (default: yes)
  153. <P>
  154. <P>
  155. <em>(no)</em>
  156. <a href=r38_0550.html#r38_0563>hidden3d</a>: 3d: remove hidden lines (default: n
  157. o)
  158. <P>
  159. <P>
  160. <P> <H3>
  161. examples: </H3>
  162. <p><pre><tt>
  163. plot(cos x);
  164. plot(s=sin phi,phi=(-3 .. 3));
  165. plot(sin phi,cos phi,phi=(-3 .. 3));
  166. plot (cos sqrt(x**2 + y**2),x=(-3 .. 3),y=(-3 .. 3),hidden3d);
  167. plot {{0,0},{0,1},{1,1},{0,0},{1,0},{0,1},{0.5,1.5},{1,1},{1,0}};
  168. on rounded;
  169. w:=for j:=1:200 collect {1/j*sin j,1/j*cos j,j/200}$
  170. plot w;
  171. </tt></pre><p>Additional control of the <em>plot</em> operation:
  172. <a href=r38_0550.html#r38_0565>plotrefine</a>,
  173. <a href=r38_0550.html#r38_0566>plot_xmesh</a>,
  174. <a href=r38_0550.html#r38_0567>plot_ymesh</a>,
  175. <a href=r38_0550.html#r38_0569>trplot</a>,
  176. <a href=r38_0550.html#r38_0564>plotkeep</a>,
  177. <a href=r38_0550.html#r38_0568>show_grid</a>.
  178. <P>
  179. <P>
  180. <a name=r38_0553>
  181. <title>PLOTRESET</title></a>
  182. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  183. E"></p>
  184. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  185. <b>PLOTRESET</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>command</b><P>
  186. <P>
  187. The command <em>plotreset</em> closes the current GNUPLOT windows.
  188. The next call to
  189. <a href=r38_0550.html#r38_0552>plot</a> will create a new one. <em>plotreset
  190. </em>
  191. can also be used to reset the system status after technical problems.
  192. <P>
  193. <P>
  194. <P> <H3>
  195. syntax: </H3>
  196. <em>plotreset</em>;
  197. <P>
  198. <P>
  199. <P>
  200. <a name=r38_0554>
  201. <title>title</title></a>
  202. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  203. E"></p>
  204. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  205. <b>TITLE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  206. <P>
  207. <P>
  208. <P>
  209. <a href=r38_0550.html#r38_0552>plot</a>option:
  210. Assign a title to the GNUPLOT graph.
  211. <P>
  212. <P>
  213. <P> <H3>
  214. syntax: </H3>
  215. <em>title</em>= &lt;string&gt;
  216. <P>
  217. <P>
  218. <P>
  219. <P> <H3>
  220. examples: </H3>
  221. <p><pre><tt>
  222. title=&quot;annual revenue in 1993&quot;
  223. </tt></pre><p>
  224. <a name=r38_0555>
  225. <title>xlabel</title></a>
  226. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  227. E"></p>
  228. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  229. <b>XLABEL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  230. <P>
  231. <P>
  232. <P>
  233. <a href=r38_0550.html#r38_0552>plot</a>option:
  234. Assign a name to to the x axis (see
  235. <a href=r38_0550.html#r38_0550>axes names</a>).
  236. <P>
  237. <P>
  238. <P> <H3>
  239. syntax: </H3>
  240. <em>xlabel</em>= &lt;string&gt;
  241. <P>
  242. <P>
  243. <P>
  244. <P> <H3>
  245. examples: </H3>
  246. <p><pre><tt>
  247. xlabel=&quot;month&quot;
  248. </tt></pre><p>
  249. <a name=r38_0556>
  250. <title>ylabel</title></a>
  251. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  252. E"></p>
  253. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  254. <b>YLABEL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  255. <P>
  256. <P>
  257. <P>
  258. <a href=r38_0550.html#r38_0552>plot</a>option:
  259. Assign a name to to the x axis (see
  260. <a href=r38_0550.html#r38_0550>axes names</a>).
  261. <P>
  262. <P>
  263. <P> <H3>
  264. syntax: </H3>
  265. <em>ylabel</em>= &lt;string&gt;
  266. <P>
  267. <P>
  268. <P>
  269. <P> <H3>
  270. examples: </H3>
  271. <p><pre><tt>
  272. ylabel=&quot;million forint&quot;
  273. </tt></pre><p>
  274. <a name=r38_0557>
  275. <title>zlabel</title></a>
  276. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  277. E"></p>
  278. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  279. <b>ZLABEL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  280. <P>
  281. <P>
  282. <P>
  283. <a href=r38_0550.html#r38_0552>plot</a>option:
  284. Assign a name to to the z axis (see
  285. <a href=r38_0550.html#r38_0550>axes names</a>).
  286. <P>
  287. <P>
  288. <P> <H3>
  289. syntax: </H3>
  290. <em>zlabel</em>= &lt;string&gt;
  291. <P>
  292. <P>
  293. <P>
  294. <P> <H3>
  295. examples: </H3>
  296. <p><pre><tt>
  297. zlabel=&quot;local weight&quot;
  298. </tt></pre><p>
  299. <a name=r38_0558>
  300. <title>terminal</title></a>
  301. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  302. E"></p>
  303. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  304. <b>TERMINAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  305. <P>
  306. <P>
  307. <P>
  308. <a href=r38_0550.html#r38_0552>plot</a>option:
  309. Select a different output device. The possible values here
  310. depend highly on the facilities installed for your GNUPLOT
  311. software.
  312. <P>
  313. <P>
  314. <P> <H3>
  315. syntax: </H3>
  316. <em>terminal</em>= &lt;string&gt;
  317. <P>
  318. <P>
  319. <P>
  320. <P> <H3>
  321. examples: </H3>
  322. <p><pre><tt>
  323. terminal=&quot;x11&quot;
  324. </tt></pre><p>
  325. <a name=r38_0559>
  326. <title>size</title></a>
  327. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  328. E"></p>
  329. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  330. <b>SIZE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  331. <P>
  332. <P>
  333. <P>
  334. <a href=r38_0550.html#r38_0552>plot</a>option:
  335. Rescale the graph (not the window!) in x and y direction.
  336. Default is 1.0 (no rescaling).
  337. <P>
  338. <P>
  339. <P> <H3>
  340. syntax: </H3>
  341. <em>size</em>= &quot;&lt;sx&gt;,&lt;sy&gt;&quot;
  342. <P>
  343. <P>
  344. <P>
  345. where &lt;sx&gt;,&lt;sy&gt; are floating point number not too
  346. far from 1.0.
  347. <P> <H3>
  348. examples: </H3>
  349. <p><pre><tt>
  350. size=&quot;0.7,1&quot;
  351. </tt></pre><p><P>
  352. <P>
  353. <a name=r38_0560>
  354. <title>view</title></a>
  355. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  356. E"></p>
  357. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  358. <b>VIEW</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  359. <P>
  360. <P>
  361. <P>
  362. <a href=r38_0550.html#r38_0552>plot</a>option:
  363. Set a new viewpoint by turning the object around the x and then
  364. around the z axis (see
  365. <a href=r38_0550.html#r38_0550>axes names</a>).
  366. <P>
  367. <P>
  368. <P> <H3>
  369. syntax: </H3>
  370. <em>view</em>= &quot;&lt;sx&gt;,&lt;sz&gt;&quot;
  371. <P>
  372. <P>
  373. <P>
  374. where &lt;sx&gt;,&lt;sz&gt; are floating point number representing
  375. angles in degrees.
  376. <P> <H3>
  377. examples: </H3>
  378. <p><pre><tt>
  379. view=&quot;30,130&quot;
  380. </tt></pre><p><P>
  381. <P>
  382. <a name=r38_0561>
  383. <title>contour</title></a>
  384. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  385. E"></p>
  386. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  387. <b>CONTOUR</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  388. <P>
  389. <P>
  390. <P>
  391. <a href=r38_0550.html#r38_0552>plot</a>option:
  392. If <em>contour</em> is member of the options for a 3d
  393. <a href=r38_0550.html#r38_0552>plot</a>
  394. contour lines are projected to the z=0 plane
  395. (see
  396. <a href=r38_0550.html#r38_0550>axes names</a>). The absence of contour lines
  397. can be selected explicitly by including <em>nocontour</em>. Default
  398. is <em>nocontour</em>.
  399. <P>
  400. <P>
  401. <a name=r38_0562>
  402. <title>surface</title></a>
  403. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  404. E"></p>
  405. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  406. <b>SURFACE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  407. <P>
  408. <P>
  409. <P>
  410. <a href=r38_0550.html#r38_0552>plot</a>option:
  411. If <em>surface</em> is member of the options for a 3d
  412. <a href=r38_0550.html#r38_0552>plot</a>
  413. the surface is drawn. The absence of the surface plotting
  414. can be selected by including <em>nosurface</em>, e.g. if
  415. only the
  416. <a href=r38_0550.html#r38_0561>contour</a> should be visualized. Default is <em>
  417. surface</em>.
  418. <P>
  419. <P>
  420. <a name=r38_0563>
  421. <title>hidden3d</title></a>
  422. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  423. E"></p>
  424. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  425. <b>HIDDEN3D</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  426. <P>
  427. <P>
  428. <P>
  429. <a href=r38_0550.html#r38_0552>plot</a>option:
  430. If <em>hidden3d</em> is member of the options for a 3d
  431. <a href=r38_0550.html#r38_0552>plot</a>
  432. hidden lines are removed from the picture. Otherwise a
  433. surface is drawn as transparent object. Default is
  434. <em>nohidden3d</em>. Selecting <em>hidden3d</em> increases the
  435. computing time substantially.
  436. <P>
  437. <P>
  438. <a name=r38_0564>
  439. <title>PLOTKEEP</title></a>
  440. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  441. E"></p>
  442. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  443. <b>PLOTKEEP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  444. <P>
  445. <P>
  446. <P>
  447. Normally all intermediate data sets are deleted after terminating
  448. a plot session. If the switch <em>plotkeep</em> is set
  449. <a href=r38_0200.html#r38_0210>on</a>,
  450. the data sets are kept for eventual post processing independent
  451. of REDUCE.
  452. <P>
  453. <P>
  454. <a name=r38_0565>
  455. <title>PLOTREFINE</title></a>
  456. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  457. E"></p>
  458. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  459. <b>PLOTREFINE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  460. <P>
  461. <P>
  462. <P>
  463. In general
  464. <a href=r38_0550.html#r38_0552>plot</a> tries to generate smooth pictures by eva
  465. luating
  466. the functions at interior points until the distances are fine
  467. enough. This can require a lot of computing time if the
  468. single function evaluation is expensive. The refinement is
  469. controlled by the switch <em>plotrefine</em> which is
  470. <a href=r38_0200.html#r38_0210>on</a>
  471. by default. When you turn it
  472. <a href=r38_0200.html#r38_0209>off</a> the functions will
  473. be evaluated only at the basic points (see
  474. <a href=r38_0550.html#r38_0566>plot_xmesh</a>,
  475. <a href=r38_0550.html#r38_0567>plot_ymesh</a>).
  476. <P>
  477. <P>
  478. <a name=r38_0566>
  479. <title>plot_xmesh</title></a>
  480. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  481. E"></p>
  482. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  483. <b>PLOT_XMESH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  484. <P>
  485. <P>
  486. <P>
  487. The integer value of the global variable <em>plot_xmesh</em>
  488. defines the number of initial function evaluations in x
  489. direction (see
  490. <a href=r38_0550.html#r38_0550>axes names</a>) for
  491. <a href=r38_0550.html#r38_0552>plot</a>. For 2d graphs additional
  492. points will be used as long as
  493. <a href=r38_0550.html#r38_0565>plotrefine</a> is <em>on</em>.
  494. For 3d graphs this number defines also the number of mesh lines
  495. orthogonal to the x axis.
  496. <P>
  497. <P>
  498. <a name=r38_0567>
  499. <title>plot_ymesh</title></a>
  500. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  501. E"></p>
  502. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  503. <b>PLOT_YMESH</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>variable</b><P>
  504. <P>
  505. <P>
  506. <P>
  507. The integer value of the global variable <em>plot_ymesh</em>
  508. defines for 3d
  509. <a href=r38_0550.html#r38_0552>plot</a> calls the number of function evaluations
  510. in y
  511. direction (see
  512. <a href=r38_0550.html#r38_0550>axes names</a>) and the number of mesh lines
  513. orthogonal to the y axis.
  514. <P>
  515. <P>
  516. <a name=r38_0568>
  517. <title>SHOW_GRID</title></a>
  518. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  519. E"></p>
  520. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  521. <b>SHOW_GRID</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  522. <P>
  523. <P>
  524. <P>
  525. The grid for localizing an implicitly defined curve in
  526. <a href=r38_0550.html#r38_0552>plot</a>
  527. consists of triangles. These are computed initially equally distributed
  528. over the x-y plane controlled by
  529. <a href=r38_0550.html#r38_0566>plot_xmesh</a>. The grid is
  530. refined adaptively in several levels. The final grid can be visualized
  531. by setting on the switch <em>show_grid</em>.
  532. <P>
  533. <P>
  534. <a name=r38_0569>
  535. <title>TRPLOT</title></a>
  536. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  537. E"></p>
  538. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  539. <b>TRPLOT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  540. <P>
  541. <P>
  542. <P>
  543. In general the interaction between REDUCE and GNUPLOT is performed
  544. as silently as possible. However, sometimes it might be useful
  545. to see the GNUPLOT commands generated by REDUCE, e.g. for a
  546. postprocessing of generated data sets independent of REDUCE.
  547. When the switch <em>trplot</em> is set on all GNUPLOT commands will
  548. be printed to the standard output additionally.
  549. <P>
  550. <P>
  551. <a name=r38_0570>
  552. <title>Gnuplot package</title></a>
  553. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  554. E"></p>
  555. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  556. <b>Gnuplot package</b><menu>
  557. <li><a href=r38_0500.html#r38_0549>GNUPLOT and REDUCE introduction</a><P>
  558. <li><a href=r38_0550.html#r38_0550>Axes names concept</a><P>
  559. <li><a href=r38_0550.html#r38_0551>Pointset type</a><P>
  560. <li><a href=r38_0550.html#r38_0552>PLOT command</a><P>
  561. <li><a href=r38_0550.html#r38_0553>PLOTRESET command</a><P>
  562. <li><a href=r38_0550.html#r38_0554>title variable</a><P>
  563. <li><a href=r38_0550.html#r38_0555>xlabel variable</a><P>
  564. <li><a href=r38_0550.html#r38_0556>ylabel variable</a><P>
  565. <li><a href=r38_0550.html#r38_0557>zlabel variable</a><P>
  566. <li><a href=r38_0550.html#r38_0558>terminal variable</a><P>
  567. <li><a href=r38_0550.html#r38_0559>size variable</a><P>
  568. <li><a href=r38_0550.html#r38_0560>view variable</a><P>
  569. <li><a href=r38_0550.html#r38_0561>contour switch</a><P>
  570. <li><a href=r38_0550.html#r38_0562>surface switch</a><P>
  571. <li><a href=r38_0550.html#r38_0563>hidden3d switch</a><P>
  572. <li><a href=r38_0550.html#r38_0564>PLOTKEEP switch</a><P>
  573. <li><a href=r38_0550.html#r38_0565>PLOTREFINE switch</a><P>
  574. <li><a href=r38_0550.html#r38_0566>plot_xmesh variable</a><P>
  575. <li><a href=r38_0550.html#r38_0567>plot_ymesh variable</a><P>
  576. <li><a href=r38_0550.html#r38_0568>SHOW_GRID switch</a><P>
  577. <li><a href=r38_0550.html#r38_0569>TRPLOT switch</a><P>
  578. </menu>
  579. <a name=r38_0571>
  580. <title>Linear_Algebra_package</title></a>
  581. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  582. E"></p>
  583. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  584. <b>LINEAR ALGEBRA PACKAGE</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>introduction</b><P>
  585. <P>
  586. <P>
  587. <P>
  588. This section briefly describes what's available in the Linear Algebra
  589. package.
  590. <P>
  591. <P>
  592. Note on examples: In the examples throughout this
  593. document, the matrix A will be
  594. <p><pre><tt>
  595. [1 2 3]
  596. [4 5 6]
  597. [7 8 9].
  598. </tt></pre><p><P>
  599. <P>
  600. The functions can be divided into four categories:
  601. <P>
  602. <P>
  603. Basic matrix handling
  604. <P>
  605. <P>
  606. <a href=r38_0550.html#r38_0573>add_columns</a>,
  607. <P>
  608. <P>
  609. <a href=r38_0550.html#r38_0574>add_rows</a>,
  610. <P>
  611. <P>
  612. <a href=r38_0550.html#r38_0575>add_to_columns</a>,
  613. <P>
  614. <P>
  615. <a href=r38_0550.html#r38_0576>add_to_rows</a>,
  616. <P>
  617. <P>
  618. <a href=r38_0550.html#r38_0577>augment_columns</a>,
  619. <P>
  620. <P>
  621. <a href=r38_0550.html#r38_0581>char_poly</a>,
  622. <P>
  623. <P>
  624. <a href=r38_0550.html#r38_0584>column_dim</a>,
  625. <P>
  626. <P>
  627. <a href=r38_0550.html#r38_0586>copy_into</a>,
  628. <P>
  629. <P>
  630. <a href=r38_0550.html#r38_0587>diagonal</a>,
  631. <P>
  632. <P>
  633. <a href=r38_0550.html#r38_0588>extend</a>,
  634. <P>
  635. <P>
  636. <a href=r38_0550.html#r38_0589>find_companion</a>,
  637. <P>
  638. <P>
  639. <a href=r38_0550.html#r38_0590>get_columns</a>,
  640. <P>
  641. <P>
  642. <a href=r38_0550.html#r38_0591>get_rows</a>,
  643. <P>
  644. <P>
  645. <a href=r38_0550.html#r38_0593>hermitian_tp</a>,
  646. <P>
  647. <P>
  648. <a href=r38_0600.html#r38_0600>matrix_augment</a>,
  649. <P>
  650. <P>
  651. <a href=r38_0600.html#r38_0602>matrix_stack</a>,
  652. <P>
  653. <P>
  654. <a href=r38_0600.html#r38_0603>minor</a>,
  655. <P>
  656. <P>
  657. <a href=r38_0600.html#r38_0604>mult_columns</a>,
  658. <P>
  659. <P>
  660. <a href=r38_0600.html#r38_0605>mult_rows</a>,
  661. <P>
  662. <P>
  663. <a href=r38_0600.html#r38_0606>pivot</a>,
  664. <P>
  665. <P>
  666. <a href=r38_0600.html#r38_0609>remove_columns</a>,
  667. <P>
  668. <P>
  669. <a href=r38_0600.html#r38_0610>remove_rows</a>,
  670. <P>
  671. <P>
  672. <a href=r38_0600.html#r38_0611>row_dim</a>,
  673. <P>
  674. <P>
  675. <a href=r38_0600.html#r38_0612>rows_pivot</a>,
  676. <P>
  677. <P>
  678. <a href=r38_0600.html#r38_0615>stack_rows</a>,
  679. <P>
  680. <P>
  681. <a href=r38_0600.html#r38_0616>sub_matrix</a>,
  682. <P>
  683. <P>
  684. <a href=r38_0600.html#r38_0618>swap_columns</a>,
  685. <P>
  686. <P>
  687. <a href=r38_0600.html#r38_0619>swap_entries</a>,
  688. <P>
  689. <P>
  690. <a href=r38_0600.html#r38_0620>swap_rows</a>.
  691. <P>
  692. <P>
  693. Constructors -- functions that create matrices
  694. <P>
  695. <P>
  696. <a href=r38_0550.html#r38_0578>band_matrix</a>,
  697. <P>
  698. <P>
  699. <a href=r38_0550.html#r38_0579>block_matrix</a>,
  700. <P>
  701. <P>
  702. <a href=r38_0550.html#r38_0580>char_matrix</a>,
  703. <P>
  704. <P>
  705. <a href=r38_0550.html#r38_0583>coeff_matrix</a>,
  706. <P>
  707. <P>
  708. <a href=r38_0550.html#r38_0585>companion</a>,
  709. <P>
  710. <P>
  711. <a href=r38_0550.html#r38_0594>hessian</a>,
  712. <P>
  713. <P>
  714. <a href=r38_0550.html#r38_0595>hilbert</a>,
  715. <P>
  716. <P>
  717. <a href=r38_0550.html#r38_0596>jacobian</a>,
  718. <P>
  719. <P>
  720. <a href=r38_0550.html#r38_0597>jordan_block</a>,
  721. <P>
  722. <P>
  723. <a href=r38_0550.html#r38_0599>make_identity</a>,
  724. <P>
  725. <P>
  726. <a href=r38_0600.html#r38_0608>random_matrix</a>,
  727. <P>
  728. <P>
  729. <a href=r38_0600.html#r38_0622>toeplitz</a>,
  730. <P>
  731. <P>
  732. <a href=r38_0600.html#r38_0623>vandermonde</a>.
  733. <P>
  734. <P>
  735. High level algorithms
  736. <P>
  737. <P>
  738. <a href=r38_0550.html#r38_0581>char_poly</a>,
  739. <P>
  740. <P>
  741. <a href=r38_0550.html#r38_0582>cholesky</a>,
  742. <P>
  743. <P>
  744. <a href=r38_0550.html#r38_0592>gram_schmidt</a>,
  745. <P>
  746. <P>
  747. <a href=r38_0550.html#r38_0598>lu_decom</a>,
  748. <P>
  749. <P>
  750. <a href=r38_0600.html#r38_0607>pseudo_inverse</a>,
  751. <P>
  752. <P>
  753. <a href=r38_0600.html#r38_0613>simplex</a>,
  754. <P>
  755. <P>
  756. <a href=r38_0600.html#r38_0617>svd</a>.
  757. <P>
  758. <P>
  759. Normal Forms
  760. <P>
  761. <P>
  762. There is a separate package, NORMFORM, for computing
  763. the following matrix normal forms in REDUCE:
  764. <P>
  765. <P>
  766. <a href=r38_0600.html#r38_0625>smithex</a>,
  767. <P>
  768. <P>
  769. <a href=r38_0600.html#r38_0626>smithex_int</a>,
  770. <P>
  771. <P>
  772. <a href=r38_0600.html#r38_0627>frobenius</a>,
  773. <P>
  774. <P>
  775. <a href=r38_0600.html#r38_0628>ratjordan</a>,
  776. <P>
  777. <P>
  778. <a href=r38_0600.html#r38_0629>jordansymbolic</a>,
  779. <P>
  780. <P>
  781. <a href=r38_0600.html#r38_0630>jordan</a>.
  782. <P>
  783. <P>
  784. Predicates
  785. <P>
  786. <P>
  787. <a href=r38_0600.html#r38_0601>matrixp</a>,
  788. <P>
  789. <P>
  790. <a href=r38_0600.html#r38_0614>squarep</a>,
  791. <P>
  792. <P>
  793. <a href=r38_0600.html#r38_0621>symmetricp</a>.
  794. <P>
  795. <P>
  796. <a name=r38_0572>
  797. <title>fast_la</title></a>
  798. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  799. E"></p>
  800. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  801. <b>FAST_LA</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>switch</b><P>
  802. <P>
  803. <P>
  804. <P>
  805. By turning the <em>fast_la</em> switch on, the speed of the following
  806. functions will be increased:
  807. <P>
  808. <P>
  809. <a href=r38_0550.html#r38_0573>add_columns</a>,
  810. <P>
  811. <P>
  812. <a href=r38_0550.html#r38_0574>add_rows</a>,
  813. <P>
  814. <P>
  815. <a href=r38_0550.html#r38_0577>augment_columns</a>,
  816. <P>
  817. <P>
  818. <a href=r38_0550.html#r38_0584>column_dim</a>,
  819. <P>
  820. <P>
  821. <a href=r38_0550.html#r38_0586>copy_into</a>,
  822. <P>
  823. <P>
  824. <a href=r38_0550.html#r38_0599>make_identity</a>,
  825. <P>
  826. <P>
  827. <a href=r38_0600.html#r38_0600>matrix_augment</a>,
  828. <P>
  829. <P>
  830. <a href=r38_0600.html#r38_0602>matrix_stack</a>,
  831. <P>
  832. <P>
  833. <a href=r38_0600.html#r38_0603>minor</a>,
  834. <P>
  835. <P>
  836. <a href=r38_0600.html#r38_0604>mult_columns</a>,
  837. <P>
  838. <P>
  839. <a href=r38_0600.html#r38_0605>mult_rows</a>,
  840. <P>
  841. <P>
  842. <a href=r38_0600.html#r38_0606>pivot</a>,
  843. <P>
  844. <P>
  845. <a href=r38_0600.html#r38_0609>remove_columns</a>,
  846. <P>
  847. <P>
  848. <a href=r38_0600.html#r38_0610>remove_rows</a>,
  849. <P>
  850. <P>
  851. <a href=r38_0600.html#r38_0612>rows_pivot</a>,
  852. <P>
  853. <P>
  854. <a href=r38_0600.html#r38_0614>squarep</a>,
  855. <P>
  856. <P>
  857. <a href=r38_0600.html#r38_0615>stack_rows</a>,
  858. <P>
  859. <P>
  860. <a href=r38_0600.html#r38_0616>sub_matrix</a>,
  861. <P>
  862. <P>
  863. <a href=r38_0600.html#r38_0618>swap_columns</a>,
  864. <P>
  865. <P>
  866. <a href=r38_0600.html#r38_0619>swap_entries</a>,
  867. <P>
  868. <P>
  869. <a href=r38_0600.html#r38_0620>swap_rows</a>,
  870. <P>
  871. <P>
  872. <a href=r38_0600.html#r38_0621>symmetricp</a>.
  873. <P>
  874. <P>
  875. The increase in speed will be negligible unless you are making a
  876. significant number (i.e. thousands) of calls. When using this switch,
  877. error checking is minimized. This means that illegal input may give
  878. strange error messages. Beware.
  879. <P>
  880. <P>
  881. <a name=r38_0573>
  882. <title>add_columns</title></a>
  883. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  884. E"></p>
  885. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  886. <b>ADD_COLUMNS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  887. <P>
  888. Add columns, add rows:
  889. <P> <H3>
  890. syntax: </H3>
  891. <P>
  892. <P>
  893. <em>add_columns</em>(&lt;matrix&gt;,&lt;c1&gt;,&lt;c2&gt;,&lt;expr&gt;)
  894. <P>
  895. <P>
  896. <P>
  897. &lt;matrix&gt; :- a
  898. <a href=r38_0300.html#r38_0345>matrix</a>.
  899. <P>
  900. <P>
  901. &lt;c1&gt;,&lt;c2&gt; :- positive integers.
  902. <P>
  903. <P>
  904. &lt;expr&gt; :- a scalar expression.
  905. <P>
  906. <P>
  907. The Operator <em>add_columns</em> replaces column &lt;\meta{c2&gt;} of
  908. &lt;matrix&gt; by &lt;expr&gt; * column(&lt;matrix&gt;,&lt;c1&gt;) +
  909. column(&lt;matrix&gt;,&lt;c2&gt;).
  910. <P>
  911. <P>
  912. <em>add_rows</em>performs the equivalent task on the rows of
  913. &lt;matrix&gt;.
  914. <P>
  915. <P>
  916. <P> <H3>
  917. examples: </H3>
  918. <p><pre><tt>
  919. add_columns(A,1,2,x);
  920. [1 x + 2 3]
  921. [ ]
  922. [4 4*x + 5 6]
  923. [ ]
  924. [7 7*x + 8 9]
  925. add_rows(A,2,3,5);
  926. [1 2 3 ]
  927. [ ]
  928. [4 5 6 ]
  929. [ ]
  930. [27 33 39]
  931. </tt></pre><p>Related functions:
  932. <a href=r38_0550.html#r38_0575>add_to_columns</a>,
  933. <a href=r38_0550.html#r38_0576>add_to_rows</a>,
  934. <a href=r38_0600.html#r38_0604>mult_columns</a>,
  935. <a href=r38_0600.html#r38_0605>mult_rows</a>.
  936. <P>
  937. <P>
  938. <a name=r38_0574>
  939. <title>add_rows</title></a>
  940. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  941. E"></p>
  942. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  943. <b>ADD_ROWS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  944. <P>
  945. see:
  946. <a href=r38_0550.html#r38_0573>add_columns</a>.
  947. <P>
  948. <P>
  949. <a name=r38_0575>
  950. <title>add_to_columns</title></a>
  951. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  952. E"></p>
  953. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  954. <b>ADD_TO_COLUMNS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  955. <P>
  956. Add to columns, add to rows:
  957. <P>
  958. <P>
  959. <P> <H3>
  960. syntax: </H3>
  961. <em>add_to_columns</em>(&lt;matrix&gt;,&lt;column\_list&gt;,&lt;expr&gt;)
  962. <P>
  963. <P>
  964. <P>
  965. &lt;matrix&gt; :- a matrix.
  966. <P>
  967. <P>
  968. &lt;column\_list&gt; :- a positive integer or a list of positive
  969. integers.
  970. <P>
  971. <P>
  972. &lt;expr&gt; :- a scalar expression.
  973. <P>
  974. <P>
  975. <em>add_to_columns</em>adds &lt;expr&gt; to each column specified in
  976. &lt;column\_list&gt; of &lt;matrix&gt;.
  977. <P>
  978. <P>
  979. <em>add_to_rows</em>performs the equivalent task on the rows of
  980. &lt;matrix&gt;.
  981. <P>
  982. <P>
  983. <P> <H3>
  984. examples: </H3>
  985. <p><pre><tt>
  986. add_to_columns(A,{1,2},10);
  987. [11 12 3]
  988. [ ]
  989. [14 15 6]
  990. [ ]
  991. [17 18 9]
  992. add_to_rows(A,2,-x)
  993. [ 1 2 3 ]
  994. [ ]
  995. [ - x + 4 - x + 5 - x + 6]
  996. [ ]
  997. [ 7 8 9 ]
  998. </tt></pre><p>Related functions:
  999. <a href=r38_0550.html#r38_0573>add_columns</a>,
  1000. <a href=r38_0550.html#r38_0574>add_rows</a>,
  1001. <a href=r38_0600.html#r38_0605>mult_rows</a>,
  1002. <a href=r38_0600.html#r38_0604>mult_columns</a>.
  1003. <P>
  1004. <P>
  1005. <a name=r38_0576>
  1006. <title>add_to_rows</title></a>
  1007. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1008. E"></p>
  1009. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1010. <b>ADD_TO_ROWS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1011. <P>
  1012. see:
  1013. <a href=r38_0550.html#r38_0575>add_to_columns</a>.
  1014. <P>
  1015. <P>
  1016. <a name=r38_0577>
  1017. <title>augment_columns</title></a>
  1018. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1019. E"></p>
  1020. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1021. <b>AUGMENT_COLUMNS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1022. <P>
  1023. Augment columns, stack rows:
  1024. <P>
  1025. <P>
  1026. <P> <H3>
  1027. syntax: </H3>
  1028. <em>augment_columns</em>(&lt;matrix&gt;,&lt;column\_list&gt;)
  1029. <P>
  1030. <P>
  1031. <P>
  1032. &lt;matrix&gt; :- a matrix.
  1033. <P>
  1034. <P>
  1035. &lt;column\_list&gt; :- either a positive integer or a list of positive
  1036. integers.
  1037. <P>
  1038. <P>
  1039. <em>augment_columns</em>gets hold of the columns of &lt;matrix&gt;
  1040. specified in <em>column_list</em> and sticks them together.
  1041. <P>
  1042. <P>
  1043. <em>stack_rows</em>performs the same task on rows of &lt;matrix&gt;.
  1044. <P>
  1045. <P>
  1046. <P> <H3>
  1047. examples: </H3>
  1048. <p><pre><tt>
  1049. augment_columns(A,{1,2})
  1050. [1 2]
  1051. [ ]
  1052. [4 5]
  1053. [ ]
  1054. [7 8]
  1055. stack_rows(A,{1,3})
  1056. [1 2 3]
  1057. [ ]
  1058. [7 8 9]
  1059. </tt></pre><p>Related functions:
  1060. <a href=r38_0550.html#r38_0590>get_columns</a>,
  1061. <a href=r38_0550.html#r38_0591>get_rows</a>,
  1062. <a href=r38_0600.html#r38_0616>sub_matrix</a>.
  1063. <P>
  1064. <P>
  1065. <a name=r38_0578>
  1066. <title>band_matrix</title></a>
  1067. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1068. E"></p>
  1069. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1070. <b>BAND_MATRIX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1071. <P>
  1072. <P>
  1073. <P>
  1074. <P> <H3>
  1075. syntax: </H3>
  1076. <em>band_matrix</em>(&lt;expr\_list&gt;,&lt;square\_size&gt;)
  1077. <P>
  1078. <P>
  1079. <P>
  1080. &lt;expr\_list&gt; :- either a single scalar expression or a list of
  1081. an odd number of scalar expressions.
  1082. <P>
  1083. <P>
  1084. &lt;square\_size&gt; :- a positive integer.
  1085. <P>
  1086. <P>
  1087. <em>band_matrix</em>creates a square matrix of dimension
  1088. &lt;square\_size&gt;. The diagonal consists of the middle expression
  1089. of the &lt;expr\_list&gt;. The expressions to the left of this fill
  1090. the required number of sub_diagonals and the expressions to the right
  1091. the super_diagonals.
  1092. <P>
  1093. <P>
  1094. <P> <H3>
  1095. examples: </H3>
  1096. <p><pre><tt>
  1097. band_matrix({x,y,z},6)
  1098. [y z 0 0 0 0]
  1099. [ ]
  1100. [x y z 0 0 0]
  1101. [ ]
  1102. [0 x y z 0 0]
  1103. [ ]
  1104. [0 0 x y z 0]
  1105. [ ]
  1106. [0 0 0 x y z]
  1107. [ ]
  1108. [0 0 0 0 x y]
  1109. </tt></pre><p>Related functions:
  1110. <a href=r38_0550.html#r38_0587>diagonal</a>.
  1111. <P>
  1112. <P>
  1113. <a name=r38_0579>
  1114. <title>block_matrix</title></a>
  1115. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1116. E"></p>
  1117. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1118. <b>BLOCK_MATRIX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1119. <P>
  1120. <P>
  1121. <P>
  1122. <P> <H3>
  1123. syntax: </H3>
  1124. <em>block_matrix</em>(&lt;r&gt;,&lt;c&gt;,&lt;matrix\_list&gt;)
  1125. <P>
  1126. <P>
  1127. <P>
  1128. &lt;r&gt;,&lt;c&gt; :- positive integers.
  1129. <P>
  1130. <P>
  1131. &lt;matrix\_list&gt; :- a list of matrices.
  1132. <P>
  1133. <P>
  1134. <em>block_matrix</em>creates a matrix that consists of &lt;r&gt; by
  1135. &lt;c&gt; matrices filled from the &lt;matrix\_list&gt; row wise.
  1136. <P>
  1137. <P>
  1138. <P> <H3>
  1139. examples: </H3>
  1140. <p><pre><tt>
  1141. B := make_identity(2);
  1142. [1 0]
  1143. b := [ ]
  1144. [0 1]
  1145. C := mat((5),(5));
  1146. [5]
  1147. c := [ ]
  1148. [5]
  1149. D := mat((22,33),(44,55));
  1150. [22 33]
  1151. d := [ ]
  1152. [44 55]
  1153. block_matrix(2,3,{B,C,D,D,C,B});
  1154. [1 0 5 22 33]
  1155. [ ]
  1156. [0 1 5 44 55]
  1157. [ ]
  1158. [22 33 5 1 0 ]
  1159. [ ]
  1160. [44 55 5 0 1 ]
  1161. </tt></pre><p>
  1162. <a name=r38_0580>
  1163. <title>char_matrix</title></a>
  1164. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1165. E"></p>
  1166. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1167. <b>CHAR_MATRIX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1168. <P>
  1169. <P>
  1170. <P>
  1171. <P> <H3>
  1172. syntax: </H3>
  1173. <em>char_matrix</em>(&lt;matrix&gt;,&lt;lambda&gt;)
  1174. <P>
  1175. <P>
  1176. <P>
  1177. &lt;matrix&gt; :- a square matrix.
  1178. &lt;lambda&gt; :- a symbol or algebraic expression.
  1179. <P>
  1180. <P>
  1181. &lt;char\_matrix&gt; creates the characteristic matrix C of
  1182. &lt;matrix&gt;.
  1183. <P>
  1184. <P>
  1185. This is C = &lt;lambda&gt; * Id - A.
  1186. Id is the identity matrix.
  1187. <P>
  1188. <P>
  1189. <P> <H3>
  1190. examples: </H3>
  1191. <p><pre><tt>
  1192. char_matrix(A,x);
  1193. [x - 1 -2 -3 ]
  1194. [ ]
  1195. [ -4 x - 5 -6 ]
  1196. [ ]
  1197. [ -7 -8 x - 9]
  1198. </tt></pre><p>Related functions:
  1199. <a href=r38_0550.html#r38_0581>char_poly</a>.
  1200. <P>
  1201. <P>
  1202. <a name=r38_0581>
  1203. <title>char_poly</title></a>
  1204. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1205. E"></p>
  1206. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1207. <b>CHAR_POLY</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1208. <P>
  1209. <P>
  1210. <P>
  1211. <P> <H3>
  1212. syntax: </H3>
  1213. <em>char_poly</em>(&lt;matrix&gt;,&lt;lambda&gt;)
  1214. <P>
  1215. <P>
  1216. <P>
  1217. &lt;matrix&gt; :- a square matrix.
  1218. <P>
  1219. <P>
  1220. &lt;lambda&gt; :- a symbol or algebraic expression.
  1221. <P>
  1222. <P>
  1223. <em>char_poly</em>finds the characteristic polynomial of &lt;matrix&gt;.
  1224. This is the determinant of &lt;lambda&gt; * Id - A.
  1225. Id is the identity matrix.
  1226. <P>
  1227. <P>
  1228. <P> <H3>
  1229. examples: </H3>
  1230. <p><pre><tt>
  1231. char_poly(A,x);
  1232. 3 2
  1233. x -15*x -18*x
  1234. </tt></pre><p>Related functions:
  1235. <a href=r38_0550.html#r38_0580>char_matrix</a>.
  1236. <P>
  1237. <P>
  1238. <a name=r38_0582>
  1239. <title>cholesky</title></a>
  1240. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1241. E"></p>
  1242. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1243. <b>CHOLESKY</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1244. <P>
  1245. <P>
  1246. <P>
  1247. <P> <H3>
  1248. syntax: </H3>
  1249. <em>cholesky</em>(&lt;matrix&gt;)
  1250. <P>
  1251. <P>
  1252. <P>
  1253. &lt;matrix&gt; :- a positive definite matrix containing numeric entries.
  1254. <P>
  1255. <P>
  1256. <em>cholesky</em>computes the cholesky decomposition of &lt;matrix&gt;.
  1257. <P>
  1258. <P>
  1259. It returns {L,U} where L is a lower matrix, U is an upper matrix,
  1260. A = LU, and U = L^T.
  1261. <P>
  1262. <P>
  1263. <P> <H3>
  1264. examples: </H3>
  1265. <p><pre><tt>
  1266. F := mat((1,1,0),(1,3,1),(0,1,1));
  1267. [1 1 0]
  1268. [ ]
  1269. f := [1 3 1]
  1270. [ ]
  1271. [0 1 1]
  1272. on rounded;
  1273. cholesky(F);
  1274. {
  1275. [1 0 0 ]
  1276. [ ]
  1277. [1 1.41421356237 0 ]
  1278. [ ]
  1279. [0 0.707106781187 0.707106781187]
  1280. ,
  1281. [1 1 0 ]
  1282. [ ]
  1283. [0 1.41421356237 0.707106781187]
  1284. [ ]
  1285. [0 0 0.707106781187]
  1286. }
  1287. </tt></pre><p>Related functions:
  1288. <a href=r38_0550.html#r38_0598>lu_decom</a>.
  1289. <P>
  1290. <P>
  1291. <a name=r38_0583>
  1292. <title>coeff_matrix</title></a>
  1293. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1294. E"></p>
  1295. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1296. <b>COEFF_MATRIX</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1297. <P>
  1298. <P>
  1299. <P>
  1300. <P> <H3>
  1301. syntax: </H3>
  1302. <em>coeff_matrix</em>({&lt;lineq\_list&gt;})
  1303. <P>
  1304. <P>
  1305. <P>
  1306. (If you are feeling lazy then the braces can be omitted.)
  1307. <P>
  1308. <P>
  1309. &lt;lineq\_list&gt; :- linear equations. Can be of the form equation = number
  1310. or just equation.
  1311. <P>
  1312. <P>
  1313. <em>coeff_matrix</em>creates the coefficient matrix C of the linear
  1314. equations.
  1315. <P>
  1316. <P>
  1317. It returns {C,X,B} such that CX = B.
  1318. <P>
  1319. <P>
  1320. <P> <H3>
  1321. examples: </H3>
  1322. <p><pre><tt>
  1323. coeff_matrix({x+y+4*z=10,y+x-z=20,x+y+4});
  1324. {
  1325. [4 1 1]
  1326. [ ]
  1327. [-1 1 1]
  1328. [ ]
  1329. [0 1 1]
  1330. ,
  1331. [z]
  1332. [ ]
  1333. [y]
  1334. [ ]
  1335. [x]
  1336. ,
  1337. [10]
  1338. [ ]
  1339. [20]
  1340. [ ]
  1341. [-4]
  1342. }
  1343. </tt></pre><p>
  1344. <a name=r38_0584>
  1345. <title>column_dim</title></a>
  1346. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1347. E"></p>
  1348. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1349. <b>COLUMN_DIM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1350. <P>
  1351. Column dimension, row dimension:
  1352. <P>
  1353. <P>
  1354. <P> <H3>
  1355. syntax: </H3>
  1356. <em>column_dim</em>(&lt;matrix&gt;)
  1357. <P>
  1358. <P>
  1359. <P>
  1360. &lt;matrix&gt; :- a matrix.
  1361. <P>
  1362. <P>
  1363. <em>column_dim</em>finds the column dimension of &lt;matrix&gt;.
  1364. <P>
  1365. <P>
  1366. <em>row_dim</em>finds the row dimension of &lt;matrix&gt;.
  1367. <P>
  1368. <P>
  1369. <P> <H3>
  1370. examples: </H3>
  1371. <p><pre><tt>
  1372. column_dim(A);
  1373. 3
  1374. row_dim(A);
  1375. 3
  1376. </tt></pre><p>
  1377. <a name=r38_0585>
  1378. <title>companion</title></a>
  1379. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1380. E"></p>
  1381. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1382. <b>COMPANION</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1383. <P>
  1384. <P>
  1385. <P>
  1386. <P> <H3>
  1387. syntax: </H3>
  1388. <em>companion</em>(&lt;poly&gt;,&lt;x&gt;)
  1389. <P>
  1390. <P>
  1391. <P>
  1392. &lt;poly&gt; :- a monic univariate polynomial in &lt;x&gt;.
  1393. <P>
  1394. <P>
  1395. &lt;x&gt; :- the variable.
  1396. <P>
  1397. <P>
  1398. <em>companion</em>creates the companion matrix C of &lt;poly&gt;.
  1399. <P>
  1400. <P>
  1401. This is the square matrix of dimension n, where n is the degree of
  1402. &lt;poly&gt; w.r.t. &lt;x&gt;.
  1403. <P>
  1404. <P>
  1405. The entries of C are:
  1406. <P>
  1407. <P>
  1408. C(i,n) = -coeffn(&lt;poly&gt;,&lt;x&gt;,i-1) for i = 1
  1409. ... n, C(i,i-1) = 1 for i = 2 ... n and
  1410. the rest are 0.
  1411. <P>
  1412. <P>
  1413. <P> <H3>
  1414. examples: </H3>
  1415. <p><pre><tt>
  1416. companion(x^4+17*x^3-9*x^2+11,x);
  1417. [0 0 0 -11]
  1418. [ ]
  1419. [1 0 0 0 ]
  1420. [ ]
  1421. [0 1 0 9 ]
  1422. [ ]
  1423. [0 0 1 -17]
  1424. </tt></pre><p>Related functions:
  1425. <a href=r38_0550.html#r38_0589>find_companion</a>.
  1426. <P>
  1427. <P>
  1428. <a name=r38_0586>
  1429. <title>copy_into</title></a>
  1430. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1431. E"></p>
  1432. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1433. <b>COPY_INTO</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1434. <P>
  1435. <P>
  1436. <P>
  1437. <P> <H3>
  1438. syntax: </H3>
  1439. <em>copy_into</em>(&lt;A&gt;,&lt;B&gt;,&lt;r&gt;,&lt;c&gt;)
  1440. <P>
  1441. <P>
  1442. <P>
  1443. &lt;A&gt;,&lt;B&gt; :- matrices.
  1444. <P>
  1445. <P>
  1446. &lt;r&gt;,&lt;c&gt; :- positive integers.
  1447. <P>
  1448. <P>
  1449. <em>copy_into</em>copies matrix &lt;matrix&gt; into &lt;B&gt; with
  1450. &lt;matrix&gt;(1,1) at &lt;B&gt;(&lt;r&gt;,&lt;c&gt;).
  1451. <P>
  1452. <P>
  1453. <P> <H3>
  1454. examples: </H3>
  1455. <p><pre><tt>
  1456. G := mat((0,0,0,0,0),(0,0,0,0,0),(0,0,0,0,0),(0,0,0,0,0),(0,0,0,0,0));
  1457. [0 0 0 0 0]
  1458. [ ]
  1459. [0 0 0 0 0]
  1460. [ ]
  1461. g := [0 0 0 0 0]
  1462. [ ]
  1463. [0 0 0 0 0]
  1464. [ ]
  1465. [0 0 0 0 0]
  1466. copy_into(A,G,1,2);
  1467. [0 1 2 3 0]
  1468. [ ]
  1469. [0 4 5 6 0]
  1470. [ ]
  1471. [0 7 8 9 0]
  1472. [ ]
  1473. [0 0 0 0 0]
  1474. [ ]
  1475. [0 0 0 0 0]
  1476. </tt></pre><p>Related functions:
  1477. <a href=r38_0550.html#r38_0577>augment_columns</a>,
  1478. <a href=r38_0550.html#r38_0588>extend</a>,
  1479. <a href=r38_0600.html#r38_0600>matrix_augment</a>,
  1480. <a href=r38_0600.html#r38_0602>matrix_stack</a>,
  1481. <a href=r38_0600.html#r38_0615>stack_rows</a>,
  1482. <a href=r38_0600.html#r38_0616>sub_matrix</a>.
  1483. <P>
  1484. <P>
  1485. <a name=r38_0587>
  1486. <title>diagonal</title></a>
  1487. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1488. E"></p>
  1489. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1490. <b>DIAGONAL</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1491. <P>
  1492. <P>
  1493. <P>
  1494. <P> <H3>
  1495. syntax: </H3>
  1496. <em>diagonal</em>({&lt;mat\_list&gt;})
  1497. <P>
  1498. <P>
  1499. <P>
  1500. (If you are feeling lazy then the braces can be omitted.)
  1501. <P>
  1502. <P>
  1503. &lt;mat\_list&gt; :- each can be either a scalar expression or a
  1504. square
  1505. <a href=r38_0300.html#r38_0345>matrix</a>.
  1506. <P>
  1507. <P>
  1508. <em>diagonal</em>creates a matrix that contains the input on the
  1509. diagonal.
  1510. <P>
  1511. <P>
  1512. <P> <H3>
  1513. examples: </H3>
  1514. <p><pre><tt>
  1515. H := mat((66,77),(88,99));
  1516. [66 77]
  1517. h := [ ]
  1518. [88 99]
  1519. diagonal({A,x,H});
  1520. [1 2 3 0 0 0 ]
  1521. [ ]
  1522. [4 5 6 0 0 0 ]
  1523. [ ]
  1524. [7 8 9 0 0 0 ]
  1525. [ ]
  1526. [0 0 0 x 0 0 ]
  1527. [ ]
  1528. [0 0 0 0 66 77]
  1529. [ ]
  1530. [0 0 0 0 88 99]
  1531. </tt></pre><p>Related functions:
  1532. <a href=r38_0550.html#r38_0597>jordan_block</a>.
  1533. <P>
  1534. <P>
  1535. <a name=r38_0588>
  1536. <title>extend</title></a>
  1537. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1538. E"></p>
  1539. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1540. <b>EXTEND</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1541. <P>
  1542. <P>
  1543. <P>
  1544. <P> <H3>
  1545. syntax: </H3>
  1546. <em>extend</em>(&lt;matrix&gt;,&lt;r&gt;,&lt;c&gt;,&lt;expr&gt;)
  1547. <P>
  1548. <P>
  1549. <P>
  1550. &lt;matrix&gt; :- a
  1551. <a href=r38_0300.html#r38_0345>matrix</a>.
  1552. <P>
  1553. <P>
  1554. &lt;r&gt;,&lt;c&gt; :- positive integers.
  1555. <P>
  1556. <P>
  1557. &lt;expr&gt; :- algebraic expression or symbol.
  1558. <P>
  1559. <P>
  1560. <em>extend</em>returns a copy of &lt;matrix&gt; that has been extended by
  1561. &lt;r&gt; rows and &lt;c&gt; columns. The new entries are made equal to
  1562. &lt;expr&gt;.
  1563. <P>
  1564. <P>
  1565. <P> <H3>
  1566. examples: </H3>
  1567. <p><pre><tt>
  1568. extend(A,1,2,x);
  1569. [1 2 3 x x]
  1570. [ ]
  1571. [4 5 6 x x]
  1572. [ ]
  1573. [7 8 9 x x]
  1574. [ ]
  1575. [x x x x x]
  1576. </tt></pre><p>Related functions:
  1577. <a href=r38_0550.html#r38_0586>copy_into</a>,
  1578. <a href=r38_0600.html#r38_0600>matrix_augment</a>,
  1579. <a href=r38_0600.html#r38_0602>matrix_stack</a>,
  1580. <a href=r38_0600.html#r38_0609>remove_columns</a>,
  1581. <a href=r38_0600.html#r38_0610>remove_rows</a>.
  1582. <P>
  1583. <P>
  1584. <a name=r38_0589>
  1585. <title>find_companion</title></a>
  1586. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1587. E"></p>
  1588. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1589. <b>FIND_COMPANION</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1590. <P>
  1591. <P>
  1592. <P>
  1593. <P> <H3>
  1594. syntax: </H3>
  1595. <em>find_companion</em>(&lt;matrix&gt;,&lt;x&gt;)
  1596. <P>
  1597. <P>
  1598. <P>
  1599. &lt;matrix&gt; :- a
  1600. <a href=r38_0300.html#r38_0345>matrix</a>.
  1601. <P>
  1602. <P>
  1603. &lt;x&gt; :- the variable.
  1604. <P>
  1605. <P>
  1606. Given a companion matrix, <em>find_companion</em> finds the polynomial
  1607. from which it was made.
  1608. <P>
  1609. <P>
  1610. <P> <H3>
  1611. examples: </H3>
  1612. <p><pre><tt>
  1613. C := companion(x^4+17*x^3-9*x^2+11,x);
  1614. [0 0 0 -11]
  1615. [ ]
  1616. [1 0 0 0 ]
  1617. c := [ ]
  1618. [0 1 0 9 ]
  1619. [ ]
  1620. [0 0 1 -17]
  1621. find_companion(C,x);
  1622. 4 3 2
  1623. x +17*x -9*x +11
  1624. </tt></pre><p>Related functions:
  1625. <a href=r38_0550.html#r38_0585>companion</a>.
  1626. <P>
  1627. <P>
  1628. <a name=r38_0590>
  1629. <title>get_columns</title></a>
  1630. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1631. E"></p>
  1632. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1633. <b>GET_COLUMNS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1634. <P>
  1635. Get columns, get rows:
  1636. <P>
  1637. <P>
  1638. <P> <H3>
  1639. syntax: </H3>
  1640. <em>get_columns</em>(&lt;matrix&gt;,&lt;column\_list&gt;)
  1641. <P>
  1642. <P>
  1643. <P>
  1644. &lt;matrix&gt; :- a
  1645. <a href=r38_0300.html#r38_0345>matrix</a>.
  1646. <P>
  1647. <P>
  1648. &lt;c&gt; :- either a positive integer or a list of positive
  1649. integers.
  1650. <P>
  1651. <P>
  1652. <em>get_columns</em>removes the columns of &lt;matrix&gt; specified in
  1653. &lt;column\_list&gt; and returns them as a list of column matrices.
  1654. <P>
  1655. <P>
  1656. <em>get_rows</em>performs the same task on the rows of &lt;matrix&gt;.
  1657. <P>
  1658. <P>
  1659. <P> <H3>
  1660. examples: </H3>
  1661. <p><pre><tt>
  1662. get_columns(A,{1,3});
  1663. {
  1664. [1]
  1665. [ ]
  1666. [4]
  1667. [ ]
  1668. [7]
  1669. ,
  1670. [3]
  1671. [ ]
  1672. [6]
  1673. [ ]
  1674. [9]
  1675. }
  1676. get_rows(A,2);
  1677. {
  1678. [4 5 6]
  1679. }
  1680. </tt></pre><p>Related functions:
  1681. <a href=r38_0550.html#r38_0577>augment_columns</a>,
  1682. <a href=r38_0600.html#r38_0615>stack_rows</a>,
  1683. <a href=r38_0600.html#r38_0616>sub_matrix</a>.
  1684. <P>
  1685. <P>
  1686. <a name=r38_0591>
  1687. <title>get_rows</title></a>
  1688. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1689. E"></p>
  1690. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1691. <b>GET_ROWS</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1692. <P>
  1693. see:
  1694. <a href=r38_0550.html#r38_0590>get_columns</a>.
  1695. <P>
  1696. <P>
  1697. <a name=r38_0592>
  1698. <title>gram_schmidt</title></a>
  1699. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1700. E"></p>
  1701. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1702. <b>GRAM_SCHMIDT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1703. <P>
  1704. <P>
  1705. <P>
  1706. <P> <H3>
  1707. syntax: </H3>
  1708. <em>gram_schmidt</em>({&lt;vec\_list&gt;})
  1709. <P>
  1710. <P>
  1711. <P>
  1712. (If you are feeling lazy then the braces can be omitted.)
  1713. <P>
  1714. <P>
  1715. &lt;vec\_list&gt; :- linearly independent vectors. Each vector must be
  1716. written as a list, eg:{1,0,0}.
  1717. <P>
  1718. <P>
  1719. <em>gram_schmidt</em>performs the gram_schmidt orthonormalization on
  1720. the input vectors.
  1721. <P>
  1722. <P>
  1723. It returns a list of orthogonal normalized vectors.
  1724. <P>
  1725. <P>
  1726. <P> <H3>
  1727. examples: </H3>
  1728. <p><pre><tt>
  1729. gram_schmidt({{1,0,0},{1,1,0},{1,1,1}});
  1730. {{1,0,0},{0,1,0},{0,0,1}}
  1731. gram_schmidt({{1,2},{3,4}});
  1732. 1 2 2*sqrt(5) -sqrt(5)
  1733. {{ ------- , ------- },{ --------- , -------- }}
  1734. sqrt(5) sqrt(5) 5 5
  1735. </tt></pre><p>
  1736. <a name=r38_0593>
  1737. <title>hermitian_tp</title></a>
  1738. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1739. E"></p>
  1740. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1741. <b>HERMITIAN_TP</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1742. <P>
  1743. <P>
  1744. <P>
  1745. <P> <H3>
  1746. syntax: </H3>
  1747. <em> hermitian_tp</em>(&lt;matrix&gt;)
  1748. <P>
  1749. <P>
  1750. <P>
  1751. &lt;matrix&gt; :- a
  1752. <a href=r38_0300.html#r38_0345>matrix</a>.
  1753. <P>
  1754. <P>
  1755. <em>hermitian_tp</em>computes the hermitian transpose of &lt;matrix&gt;.
  1756. <P>
  1757. <P>
  1758. This is a
  1759. <a href=r38_0300.html#r38_0345>matrix</a> in which the (i,j)'th entry is the con
  1760. jugate
  1761. of the (j,i)'th entry of &lt;matrix&gt;.
  1762. <P>
  1763. <P>
  1764. <P> <H3>
  1765. examples: </H3>
  1766. <p><pre><tt>
  1767. J := mat((i+1,i+2,i+3),(4,5,2),(1,i,0));
  1768. [i + 1 i + 2 i + 3]
  1769. [ ]
  1770. j := [ 4 5 2 ]
  1771. [ ]
  1772. [ 1 i 0 ]
  1773. hermitian_tp(j);
  1774. [ - i + 1 4 1 ]
  1775. [ ]
  1776. [ - i + 2 5 - i]
  1777. [ ]
  1778. [ - i + 3 2 0 ]
  1779. </tt></pre><p>Related functions:
  1780. <a href=r38_0300.html#r38_0348>tp</a>.
  1781. <P>
  1782. <P>
  1783. <a name=r38_0594>
  1784. <title>hessian</title></a>
  1785. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1786. E"></p>
  1787. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1788. <b>HESSIAN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1789. <P>
  1790. <P>
  1791. <P>
  1792. <P> <H3>
  1793. syntax: </H3>
  1794. <em>hessian</em>(&lt;expr&gt;,&lt;variable\_list&gt;)
  1795. <P>
  1796. <P>
  1797. <P>
  1798. &lt;expr&gt; :- a scalar expression.
  1799. <P>
  1800. <P>
  1801. &lt;variable\_list&gt; :- either a single variable or a list of
  1802. variables.
  1803. <P>
  1804. <P>
  1805. <em>hessian</em>computes the hessian matrix of &lt;expr&gt; w.r.t. the
  1806. variables in &lt;variable\_list&gt;.
  1807. <P>
  1808. <P>
  1809. This is an n by n matrix where n is the number of variables and the
  1810. (i,j)'th entry is
  1811. <a href=r38_0100.html#r38_0148>df</a>(&lt;expr&gt;,&lt;variable\_list&gt;(i),
  1812. &lt;variable\_list&gt;(j)).
  1813. <P>
  1814. <P>
  1815. <P> <H3>
  1816. examples: </H3>
  1817. <p><pre><tt>
  1818. hessian(x*y*z+x^2,{w,x,y,z});
  1819. [0 0 0 0]
  1820. [ ]
  1821. [0 2 z y]
  1822. [ ]
  1823. [0 z 0 x]
  1824. [ ]
  1825. [0 y x 0]
  1826. </tt></pre><p>Related functions:
  1827. <a href=r38_0100.html#r38_0148>df</a>.
  1828. <P>
  1829. <P>
  1830. <a name=r38_0595>
  1831. <title>hilbert</title></a>
  1832. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1833. E"></p>
  1834. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1835. <b>HILBERT</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1836. <P>
  1837. <P>
  1838. <P>
  1839. <P> <H3>
  1840. syntax: </H3>
  1841. <em>hilbert</em>(&lt;square\_size&gt;,&lt;expr&gt;)
  1842. <P>
  1843. <P>
  1844. <P>
  1845. &lt;square\_size&gt; :- a positive integer.
  1846. <P>
  1847. <P>
  1848. &lt;expr&gt; :- an algebraic expression.
  1849. <P>
  1850. <P>
  1851. <em>hilbert</em>computes the square hilbert matrix of dimension
  1852. &lt;square\_size&gt;.
  1853. <P>
  1854. <P>
  1855. This is the symmetric matrix in which the (i,j)'th entry is
  1856. 1/(i+j-&lt;expr&gt;).
  1857. <P>
  1858. <P>
  1859. <P> <H3>
  1860. examples: </H3>
  1861. <p><pre><tt>
  1862. hilbert(3,y+x);
  1863. [ - 1 - 1 - 1 ]
  1864. [----------- ----------- -----------]
  1865. [ x + y - 2 x + y - 3 x + y - 4 ]
  1866. [ ]
  1867. [ - 1 - 1 - 1 ]
  1868. [----------- ----------- -----------]
  1869. [ x + y - 3 x + y - 4 x + y - 5 ]
  1870. [ ]
  1871. [ - 1 - 1 - 1 ]
  1872. [----------- ----------- -----------]
  1873. [ x + y - 4 x + y - 5 x + y - 6 ]
  1874. </tt></pre><p>
  1875. <a name=r38_0596>
  1876. <title>jacobian</title></a>
  1877. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1878. E"></p>
  1879. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1880. <b>JACOBIAN</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1881. <P>
  1882. <P>
  1883. <P>
  1884. <P> <H3>
  1885. syntax: </H3>
  1886. <em>jacobian</em>(&lt;expr\_list&gt;,&lt;variable\_list&gt;)
  1887. <P>
  1888. <P>
  1889. <P>
  1890. &lt;expr\_list&gt; :- either a single algebraic expression or a list
  1891. of algebraic expressions.
  1892. <P>
  1893. <P>
  1894. &lt;variable\_list&gt; :- either a single variable or a list of
  1895. variables.
  1896. <P>
  1897. <P>
  1898. <em>jacobian</em>computes the jacobian matrix of &lt;expr\_list&gt;
  1899. w.r.t. &lt;variable\_list&gt;.
  1900. <P>
  1901. <P>
  1902. This is a matrix whose (i,j)'th entry is
  1903. <a href=r38_0100.html#r38_0148>df</a>(&lt;expr\_list&gt;
  1904. (i),&lt;variable\_list&gt;(j)).
  1905. <P>
  1906. <P>
  1907. The matrix is n by m where n is the number of variables and m the number
  1908. of expressions.
  1909. <P>
  1910. <P>
  1911. <P> <H3>
  1912. examples: </H3>
  1913. <p><pre><tt>
  1914. jacobian({x^4,x*y^2,x*y*z^3},{w,x,y,z});
  1915. [ 3 ]
  1916. [0 4*x 0 0 ]
  1917. [ ]
  1918. [ 2 ]
  1919. [0 y 2*x*y 0 ]
  1920. [ ]
  1921. [ 3 3 2]
  1922. [0 y*z x*z 3*x*y*z ]
  1923. </tt></pre><p>Related functions:
  1924. <a href=r38_0550.html#r38_0594>hessian</a>,
  1925. <a href=r38_0100.html#r38_0148>df</a>.
  1926. <P>
  1927. <P>
  1928. <a name=r38_0597>
  1929. <title>jordan_block</title></a>
  1930. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1931. E"></p>
  1932. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1933. <b>JORDAN_BLOCK</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1934. <P>
  1935. <P>
  1936. <P>
  1937. <P> <H3>
  1938. syntax: </H3>
  1939. <em>jordan_block</em>(&lt;expr&gt;,&lt;square\_size&gt;)
  1940. <P>
  1941. <P>
  1942. <P>
  1943. &lt;expr&gt; :- an algebraic expression or symbol.
  1944. <P>
  1945. <P>
  1946. &lt;square\_size&gt; :- a positive integer.
  1947. <P>
  1948. <P>
  1949. <em>jordan_block</em>computes the square jordan block matrix J of
  1950. dimension &lt;square\_size&gt;.
  1951. <P>
  1952. <P>
  1953. The entries of J are:
  1954. <P>
  1955. <P>
  1956. J(i,i) = &lt;expr&gt; for i=1
  1957. ... n, J(i,i+1) = 1 for i=1
  1958. ... n-1, and all other entries are 0.
  1959. <P>
  1960. <P>
  1961. <P> <H3>
  1962. examples: </H3>
  1963. <p><pre><tt>
  1964. jordan_block(x,5);
  1965. [x 1 0 0 0]
  1966. [ ]
  1967. [0 x 1 0 0]
  1968. [ ]
  1969. [0 0 x 1 0]
  1970. [ ]
  1971. [0 0 0 x 1]
  1972. [ ]
  1973. [0 0 0 0 x]
  1974. </tt></pre><p>Related functions:
  1975. <a href=r38_0550.html#r38_0587>diagonal</a>,
  1976. <a href=r38_0550.html#r38_0585>companion</a>.
  1977. <P>
  1978. <P>
  1979. <a name=r38_0598>
  1980. <title>lu_decom</title></a>
  1981. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  1982. E"></p>
  1983. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  1984. <b>LU_DECOM</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  1985. <P>
  1986. <P>
  1987. <P>
  1988. <P> <H3>
  1989. syntax: </H3>
  1990. <em>lu_decom</em>(&lt;matrix&gt;)
  1991. <P>
  1992. <P>
  1993. <P>
  1994. &lt;matrix&gt; :- a
  1995. <a href=r38_0300.html#r38_0345>matrix</a> containing either numeric entries
  1996. or imaginary entries with numeric coefficients.
  1997. <P>
  1998. <P>
  1999. <em>lu_decom</em>performs LU decomposition on &lt;matrix&gt;, ie: it
  2000. returns {L,U} where L is a lower diagonal
  2001. <a href=r38_0300.html#r38_0345>matrix</a>, U an
  2002. upper diagonal
  2003. <a href=r38_0300.html#r38_0345>matrix</a> and A = LU.
  2004. <P>
  2005. <P>
  2006. Caution:
  2007. <P>
  2008. <P>
  2009. The algorithm used can swap the rows of &lt;matrix&gt; during the
  2010. calculation. This means that LU does not equal &lt;matrix&gt; but a row
  2011. equivalent of it. Due to this, <em>lu_decom</em> returns {L,U,vec}.
  2012. The call <em>convert(meta{matrix</em>,vec)} will return the matrix that has
  2013. been decomposed, i.e: LU = convert(&lt;matrix&gt;,vec).
  2014. <P>
  2015. <P>
  2016. <P> <H3>
  2017. examples: </H3>
  2018. <p><pre><tt>
  2019. K := mat((1,3,5),(-4,3,7),(8,6,4));
  2020. [1 3 5]
  2021. [ ]
  2022. k := [-4 3 7]
  2023. [ ]
  2024. [8 6 4]
  2025. on rounded;
  2026. lu := lu_decom(K);
  2027. lu := {
  2028. [8 0 0 ]
  2029. [ ]
  2030. [-4 6.0 0 ]
  2031. [ ]
  2032. [1 2.25 1.125]
  2033. ,
  2034. [1 0.75 0.5]
  2035. [ ]
  2036. [0 1 1.5]
  2037. [ ]
  2038. [0 0 1 ]
  2039. ,
  2040. [3 2 3]}
  2041. first lu * second lu;
  2042. [8 6.0 4.0]
  2043. [ ]
  2044. [-4 3.0 7.0]
  2045. [ ]
  2046. [1 3.0 5.0]
  2047. convert(K,third lu);
  2048. P := mat((i+1,i+2,i+3),(4,5,2),(1,i,0)); _ _ _
  2049. [i + 1 i + 2 i + 3]
  2050. [ ]
  2051. p := [ 4 5 2 ]
  2052. [ ]
  2053. [ 1 i 0 ]
  2054. lu := lu_decom(P);
  2055. lu := {
  2056. [ 1 0 0 ]
  2057. [ ]
  2058. [ 4 - 4*i + 5 0 ]
  2059. [ ]
  2060. [i + 1 3 0.414634146341*i + 2.26829268293]
  2061. ,
  2062. [1 i 0 ]
  2063. [ ]
  2064. [0 1 0.19512195122*i + 0.243902439024]
  2065. [ ]
  2066. [0 0 1 ]
  2067. ,
  2068. [3 2 3]}
  2069. first lu * second lu;
  2070. [ 1 i 0 ]
  2071. [ ]
  2072. [ 4 5 2.0 ]
  2073. [ ]
  2074. [i + 1 i + 2 i + 3.0]
  2075. convert(P,third lu);
  2076. [ 1 i 0 ]
  2077. [ ]
  2078. [ 4 5 2 ]
  2079. [ ]
  2080. [i + 1 i + 2 i + 3]
  2081. </tt></pre><p>
  2082. <P>
  2083. <P>
  2084. Related functions:
  2085. <a href=r38_0550.html#r38_0582>cholesky</a>.
  2086. <P>
  2087. <P>
  2088. <a name=r38_0599>
  2089. <title>make_identity</title></a>
  2090. <p align="centre"><img src="redlogo.gif" width=621 height=60 border=0 alt="REDUC
  2091. E"></p>
  2092. <b><a href=r38_idx.html>INDEX</a></b><p><p>
  2093. <b>MAKE_IDENTITY</b> _ _ _ _ _ _ _ _ _ _ _ _ <b>operator</b><P>
  2094. <P>
  2095. <P>
  2096. <P>
  2097. <P> <H3>
  2098. syntax: </H3>
  2099. <em>make_identity</em>(&lt;square\_size&gt;)
  2100. <P>
  2101. <P>
  2102. <P>
  2103. &lt;square\_size&gt; :- a positive integer.
  2104. <P>
  2105. <P>
  2106. <em>make_identity</em>creates the identity matrix of dimension
  2107. &lt;square\_size&gt;.
  2108. <P>
  2109. <P>
  2110. <P> <H3>
  2111. examples: </H3>
  2112. <p><pre><tt>
  2113. make_identity(4);
  2114. [1 0 0 0]
  2115. [ ]
  2116. [0 1 0 0]
  2117. [ ]
  2118. [0 0 1 0]
  2119. [ ]
  2120. [0 0 0 1]
  2121. </tt></pre><p>Related functions:
  2122. <a href=r38_0550.html#r38_0587>diagonal</a>.
  2123. <P>
  2124. <P>