Mercurial > web-octave
annotate pages/NEWS-3.md @ 292:bc36619e9e10 default tip
* governance.md: improve text
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Tue, 31 May 2022 01:45:26 +0900 |
parents | e69093ab4992 |
children |
rev | line source |
---|---|
215 | 1 --- |
2 layout: page | |
3 title: GNU Octave Version 3 | |
4 permalink: NEWS-3.html | |
5 --- | |
6 | |
7 ## Summary of important user-visible changes | |
8 | |
9 December 21, 2007 | |
10 | |
11 {% include release_news_select.md %} | |
12 | |
224
e69093ab4992
Improve Release Notes display.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
216
diff
changeset
|
13 {::options parse_block_html="true" /} |
e69093ab4992
Improve Release Notes display.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
216
diff
changeset
|
14 <div class="panel callout"> |
e69093ab4992
Improve Release Notes display.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
216
diff
changeset
|
15 * TOC |
e69093ab4992
Improve Release Notes display.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
216
diff
changeset
|
16 {:toc} |
e69093ab4992
Improve Release Notes display.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
216
diff
changeset
|
17 </div> |
e69093ab4992
Improve Release Notes display.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
216
diff
changeset
|
18 {::options parse_block_html="false" /} |
e69093ab4992
Improve Release Notes display.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
216
diff
changeset
|
19 |
e69093ab4992
Improve Release Notes display.
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
216
diff
changeset
|
20 |
215 | 21 <ul> |
22 <li>Compatibility with Matlab graphics is much better. We now | |
23 have some graphics features that work like Matlab's Handle | |
24 Graphics (tm): | |
25 <ul> | |
26 <li> You can make a subplot and then use the print function to | |
27 generate file with the plot.</li> | |
28 | |
29 <li> RGB line colors are supported if you use gnuplot 4.2. Octave | |
30 can still use gnuplot 4.0, but there is no way to set arbitrary | |
31 line colors with it when using the Matlab-style plot functions. | |
32 There never was any way to do this reliably with older versions | |
33 of gnuplot (whether run from Octave or not) since it only | |
34 provided a limited set to choose from, and they were terminal | |
35 dependent, so choosing color 1 with the X11 terminal would be | |
36 different from color 1 with the PostScript terminal. Valid RGB | |
37 colors for gnuplot 4.0 are the eight possible combinations of 0 | |
38 and 1 for the R, G and B values. Invalid values are all mapped | |
39 to the same color. | |
40 <p> | |
41 This also affects patch objects used in the bar, countour, meshc | |
42 and surfc functions, where the bars and contours will be | |
43 monochrome. A workaround for this is to type "colormap gmap40" | |
44 that loads a colormap that in many cases will be adequate for | |
45 simple bar and contour plots.</li> | |
46 | |
47 <li> You can control the width of lines using (for example): | |
48 <pre> | |
49 line (x, y, "linewidth", 4, "color", [1, 0, 0.5]); | |
50 </pre> | |
51 (this also shows the color feature).</li> | |
52 | |
53 <li> With gnuplot 4.2, image data is plotted with gnuplot and may be | |
54 combined with other 2-d plot data.</li> | |
55 | |
56 <li> Lines for contour plots are generated with an Octave function, so | |
57 contour plots are now 2-d plots instead of special 3-d plots, and | |
58 this allows you to plot additional 2-d data on top of a contour | |
59 plot.</li> | |
60 | |
61 <li> With the gnuplot "extended" terminals the TeX interpreter is | |
62 emulated. However, this means that the TeX interpreter is only | |
63 supported on the postscript terminals with gnuplot 4.0. Under | |
64 gnuplot 4.2 the terminals aqua, dumb, png, jpeg, gif, pm, windows, | |
65 wxt, svg and x11 are supported as well.</li> | |
66 | |
67 <li> The following plot commands are now considered obsolete and will | |
68 be removed from a future version of Octave: | |
69 <pre> | |
70 __gnuplot_set__ | |
71 __gnuplot_show__ | |
72 __gnuplot_plot__ | |
73 __gnuplot_splot__ | |
74 __gnuplot_replot__ | |
75 </pre> | |
76 Additionally, these functions no longer have any effect on plots | |
77 created with the Matlab-style plot commands | |
78 (<tt>plot</tt>, <tt>line</tt>, <tt>mesh</tt>, <tt>semilogx</tt>, | |
79 etc.). | |
80 | |
81 <li> Plot property values are not extensively checked. Specifying | |
82 invalid property values may produce unpredictible results.</li> | |
83 | |
84 <li> Octave now sends data over the same pipe that is used to send | |
85 commands to gnuplot. While this avoids the problem of | |
86 cluttering /tmp with data files, it is no longer possible to use | |
87 the mouse to zoom in on plots. This is a limitation of gnuplot, | |
88 which is unable to zoom when the data it plots is not stored in | |
89 a file. Some work has been done to fix this problem in newer | |
90 versions of gnuplot (> 4.2.2). See for example, | |
91 <a href="http://www.nabble.com/zooming-of-inline-data-tf4357017.html#a12416496">this thread</a> on the gnuplot development list. | |
92 </ul></li> | |
93 | |
94 | |
95 <li>The way Octave handles search paths has changed. Instead of | |
96 setting the built-in variable <tt>LOADPATH</tt>, you must | |
97 use <tt>addpath</tt>, <tt>rmpath</tt>, or <tt>path</tt> to | |
98 manipulate the function search path. These functions will | |
99 maintain <tt>"."</tt> at the head of the path, for compatibility | |
100 with Matlab. | |
101 <p> | |
102 Leading, trailing or doubled colons are no longer special. | |
103 Now, all elements of the search path are explicitly included in | |
104 the path when Octave starts. To display the path, use | |
105 the <tt>path</tt> function. | |
106 <p> | |
107 Path elements that end in <tt>//</tt> are no longer searched recursively. | |
108 Instead, you may use addpath and the genpath function to add an | |
109 entire directory tree to the path. For example, | |
110 <pre> | |
111 addpath (genpath ("~/octave")); | |
112 </pre> | |
113 will add ~/octave and all directories below it to the head of the | |
114 path.</li> | |
115 | |
116 | |
117 <li>Previous versions of Octave had a number of built-in variables to | |
118 control warnings (for example, <tt>warn_divide_by_zero</tt>). These | |
119 variables have been replaced by warning identifiers that are used | |
120 with the warning function to control the state of warnings. | |
121 <p> | |
122 For example, instead of writing | |
123 <pre> | |
124 warn_divide_by_zero = false; | |
125 </pre> | |
126 to disable divide-by-zero warnings, you should write | |
127 <pre> | |
128 warning ("off", "Octave:divide-by-zero"); | |
129 </pre> | |
130 You may use the same technique in your own code to control | |
131 warnings. For example, you can use | |
132 <pre> | |
133 warning ("My-package:phase-of-the-moon", | |
134 "the phase of the moon could cause trouble today"); | |
135 </pre> | |
136 to allow users to control this warning using the | |
137 <tt>"My-package:phase-of-the-moon"</tt> warning identifier. | |
138 <p> | |
139 You may also enable or disable all warnings, or turn them into | |
140 errors: | |
141 <pre> | |
142 warning ("on", "all"); | |
143 warning ("off", "all"); | |
144 warning ("error", "Octave:divide-by-zero"); | |
145 warning ("error", "all"); | |
146 </pre> | |
147 You can query the state of current warnings using | |
148 <pre> | |
149 warning ("query", ID) | |
150 warning ("query") | |
151 </pre> | |
152 (only those warning IDs which have been explicitly set are | |
153 returned). | |
154 <p> | |
155 A partial list and description of warning identifiers is available | |
156 using | |
157 <pre> | |
158 help warning_ids | |
159 </pre></li> | |
160 | |
161 | |
162 <li>All built-in variables have been converted to functions. This | |
163 change simplifies the interpreter and allows a consistent | |
164 interface to internal variables for user-defined packages and the | |
165 core functions distributed with Octave. In most cases, code that | |
166 simply accesses internal variables does not need to change. Code | |
167 that sets internal variables will change. For example, instead of | |
168 writing | |
169 <pre> | |
170 PS1 = ">> "; | |
171 </pre> | |
172 you will need to write | |
173 <pre> | |
174 PS1 (">> "); | |
175 </pre> | |
176 If you need write code that will run in both old and new versions | |
177 of Octave, you can use something like | |
178 <pre> | |
179 if (exist ("OCTAVE_VERSION") == 5) | |
180 ## New: | |
181 PS1 (">> "); | |
182 else | |
183 ## Old: | |
184 PS1 = ">> "; | |
185 endif | |
186 </pre></li> | |
187 | |
188 | |
189 <li>For compatibility with Matlab, the output order of Octave's | |
190 <tt>"system"</tt> function has changed from | |
191 <pre> | |
192 [output, status] = system (cmd); | |
193 </pre> | |
194 to | |
195 <pre> | |
196 [status, output] = system (cmd); | |
197 </pre></li> | |
198 | |
199 | |
200 <li>For compatibility with Matlab, <tt>normcdf</tt>, <tt>norminv</tt>, | |
201 <tt>normpdf</tt>, and <tt>normrnd</tt> have been modified to | |
202 compute distributions using the standard deviation instead of the | |
203 variance.</li> | |
204 | |
205 | |
206 <li>For compatibility with Matlab, the output of Octave's fsolve | |
207 function has been changed from | |
208 <pre> | |
209 [x, info, msg] = fsolve (...); | |
210 </pre> | |
211 to | |
212 <pre> | |
213 [x, fval, info] = fsolve (...); | |
214 </pre></li> | |
215 | |
216 | |
217 <li>For compatibility with Matlab, <tt>normcdf</tt>, <tt>norminv</tt>, | |
218 <tt>normpdf</tt>, and <tt>normrnd</tt> have been modified to | |
219 compute distributions using the standard deviation instead of the | |
220 variance.</li> | |
221 | |
222 | |
223 <li>For compatibility with | |
224 Matlab, <tt>gamcdf</tt>, <tt>gaminv</tt>, <tt>gampdf</tt>, | |
225 <tt>gamrnd</tt>, <tt>expcdf</tt>, <tt>expinv</tt>, <tt>exppdf</tt> | |
226 and <tt>exprnd</tt> have been modified to compute the | |
227 distributions using the standard scale factor rather than one over | |
228 the scale factor. | |
229 </ul> |