You can subscribe to this list here.
2001 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}
(10) 
_{Aug}
(5) 
_{Sep}
(3) 
_{Oct}
(41) 
_{Nov}
(41) 
_{Dec}
(33) 

2002 
_{Jan}
(75) 
_{Feb}
(10) 
_{Mar}
(170) 
_{Apr}
(174) 
_{May}
(66) 
_{Jun}
(11) 
_{Jul}
(10) 
_{Aug}
(44) 
_{Sep}
(73) 
_{Oct}
(28) 
_{Nov}
(139) 
_{Dec}
(52) 
2003 
_{Jan}
(35) 
_{Feb}
(93) 
_{Mar}
(62) 
_{Apr}
(10) 
_{May}
(55) 
_{Jun}
(70) 
_{Jul}
(37) 
_{Aug}
(16) 
_{Sep}
(56) 
_{Oct}
(31) 
_{Nov}
(57) 
_{Dec}
(83) 
2004 
_{Jan}
(85) 
_{Feb}
(67) 
_{Mar}
(27) 
_{Apr}
(37) 
_{May}
(75) 
_{Jun}
(85) 
_{Jul}
(160) 
_{Aug}
(68) 
_{Sep}
(104) 
_{Oct}
(25) 
_{Nov}
(39) 
_{Dec}
(23) 
2005 
_{Jan}
(10) 
_{Feb}
(45) 
_{Mar}
(43) 
_{Apr}
(19) 
_{May}
(108) 
_{Jun}
(31) 
_{Jul}
(41) 
_{Aug}
(23) 
_{Sep}
(65) 
_{Oct}
(58) 
_{Nov}
(44) 
_{Dec}
(54) 
2006 
_{Jan}
(96) 
_{Feb}
(27) 
_{Mar}
(69) 
_{Apr}
(59) 
_{May}
(67) 
_{Jun}
(35) 
_{Jul}
(13) 
_{Aug}
(461) 
_{Sep}
(160) 
_{Oct}
(399) 
_{Nov}
(32) 
_{Dec}
(72) 
2007 
_{Jan}
(316) 
_{Feb}
(305) 
_{Mar}
(318) 
_{Apr}
(54) 
_{May}
(194) 
_{Jun}
(173) 
_{Jul}
(282) 
_{Aug}
(91) 
_{Sep}
(227) 
_{Oct}
(365) 
_{Nov}
(168) 
_{Dec}
(18) 
2008 
_{Jan}
(71) 
_{Feb}
(111) 
_{Mar}
(155) 
_{Apr}
(173) 
_{May}
(70) 
_{Jun}
(67) 
_{Jul}
(55) 
_{Aug}
(83) 
_{Sep}
(32) 
_{Oct}
(68) 
_{Nov}
(80) 
_{Dec}
(29) 
2009 
_{Jan}
(46) 
_{Feb}
(18) 
_{Mar}
(95) 
_{Apr}
(76) 
_{May}
(140) 
_{Jun}
(98) 
_{Jul}
(84) 
_{Aug}
(123) 
_{Sep}
(94) 
_{Oct}
(131) 
_{Nov}
(142) 
_{Dec}
(125) 
2010 
_{Jan}
(128) 
_{Feb}
(158) 
_{Mar}
(172) 
_{Apr}
(134) 
_{May}
(94) 
_{Jun}
(84) 
_{Jul}
(32) 
_{Aug}
(127) 
_{Sep}
(167) 
_{Oct}
(109) 
_{Nov}
(69) 
_{Dec}
(78) 
2011 
_{Jan}
(39) 
_{Feb}
(58) 
_{Mar}
(52) 
_{Apr}
(47) 
_{May}
(56) 
_{Jun}
(76) 
_{Jul}
(55) 
_{Aug}
(54) 
_{Sep}
(165) 
_{Oct}
(255) 
_{Nov}
(328) 
_{Dec}
(263) 
2012 
_{Jan}
(82) 
_{Feb}
(147) 
_{Mar}
(400) 
_{Apr}
(216) 
_{May}
(209) 
_{Jun}
(160) 
_{Jul}
(86) 
_{Aug}
(141) 
_{Sep}
(156) 
_{Oct}
(6) 
_{Nov}

_{Dec}

2015 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}
(1) 
_{Aug}

_{Sep}
(1) 
_{Oct}

_{Nov}
(1) 
_{Dec}
(2) 
2016 
_{Jan}

_{Feb}
(2) 
_{Mar}
(2) 
_{Apr}
(1) 
_{May}
(1) 
_{Jun}
(2) 
_{Jul}
(1) 
_{Aug}
(1) 
_{Sep}

_{Oct}

_{Nov}
(1) 
_{Dec}

S  M  T  W  T  F  S 





1

2

3

4

5
(6) 
6
(3) 
7

8
(1) 
9
(1) 
10
(1) 
11
(2) 
12
(3) 
13

14

15
(1) 
16
(1) 
17

18

19
(1) 
20
(3) 
21

22
(5) 
23
(4) 
24
(2) 
25

26

27
(4) 
28
(3) 
29

30
(5) 
31

From: <simonepernice@us...>  20090106 20:16:37

Revision: 5515 http://octave.svn.sourceforge.net/octave/?rev=5515&view=rev Author: simonepernice Date: 20090106 20:16:32 +0000 (Tue, 06 Jan 2009) Log Message:  Improved engForm to fully support engineer notation and added intForm (opposite to engForm) to convert from enginner notation to intervals Modified Paths:  trunk/octaveforge/main/simp/DESCRIPTION trunk/octaveforge/main/simp/INDEX trunk/octaveforge/main/simp/doc/simp.lyx trunk/octaveforge/main/simp/doc/simp.pdf trunk/octaveforge/main/simp/inst/__engSingleFormInt__.m trunk/octaveforge/main/simp/inst/engFormInt.m Added Paths:  trunk/octaveforge/main/simp/inst/__intSingleFormInt__.m trunk/octaveforge/main/simp/inst/intFormInt.m Modified: trunk/octaveforge/main/simp/DESCRIPTION ===================================================================  trunk/octaveforge/main/simp/DESCRIPTION 20090106 15:01:30 UTC (rev 5514) +++ trunk/octaveforge/main/simp/DESCRIPTION 20090106 20:16:32 UTC (rev 5515) @@ 1,6 +1,6 @@ Name: simp.tar Version: 1.0.0 Date: 13/12/2008 +Version: 1.1.0 +Date: 2/1/2009 Author: Simone Pernice Maintainer: Simone Pernice Title: Single Interval Mathematics Package for Octave Modified: trunk/octaveforge/main/simp/INDEX ===================================================================  trunk/octaveforge/main/simp/INDEX 20090106 15:01:30 UTC (rev 5514) +++ trunk/octaveforge/main/simp/INDEX 20090106 20:16:32 UTC (rev 5515) @@ 11,6 +11,7 @@ sqrtInt addSqrInt engFormInt + intFormInt dB10ToLinInt linToDB10Int dB20ToLinInt Modified: trunk/octaveforge/main/simp/doc/simp.lyx ===================================================================  trunk/octaveforge/main/simp/doc/simp.lyx 20090106 15:01:30 UTC (rev 5514) +++ trunk/octaveforge/main/simp/doc/simp.lyx 20090106 20:16:32 UTC (rev 5515) @@ 43,6 +43,10 @@ Single Interval Mathematics Package for Octave \end_layout +\begin_layout Author +Simone Pernice +\end_layout + \begin_layout Standard \newpage @@ 68,7 +72,7 @@ \end_layout \begin_layout Standard I am Simone Pernice and I am the writer of the SIMP package. +I am Simone Pernice the writer of the SIMP package. If you find any bug or you want to add features, you can contact me at pernice@... You can find further details on my web site: simonepernice.freehostia.com @@ 82,6 +86,11 @@ Version 1.0, Turin 14th December 2008, initial draft \end_layout +\begin_layout Itemize +Version 1.1, Palermo 2nd January 2009, few fixes to the documentation and + added the new function intFormInt +\end_layout + \begin_layout Section Preface \end_layout @@ 90,30 +99,69 @@ I am an electrical engineer, I worked both on hardware and software fields. Designing an electrical circuit is quite complex because the characteristics of the components involved have huge tolerance some about 5%, while others  80%. + 50%. The target is to have the circuit working in the worst case of the components and of the environment! That involves to compute several times the same equation putting inside the worst or best case values.  Some time ago I was doing the usual design when I though, what if I use  intervals instead of numbers: I may get the results in just one step! Then  I went on the Internet looking for Interval Mathematics: I discovered it  was invented in the '50s.  Eventually I looked for an open source calculator able to manage intervals  instead of numbers. + Some time ago I was designing a simple circuit when I though: +\begin_inset Quotes eld +\end_inset + +What if I use intervals instead of numbers? I may get the best and worst + case in just one step! +\begin_inset Quotes erd +\end_inset + +. + Then I looked on the Internet for Interval Mathematics: I discovered it + was invented in the '50s +\begin_inset LatexCommand cite +key "key1" + +\end_inset + +. + Although its not very spread it is a powerful tool: a calculator with finite + precision can be used to compute calculus requiring infinite precision + because the solution is a range where the actual value lay. + +\end_layout + +\begin_layout Standard +Therefore I looked for an open source calculator able to manage intervals + instead of real numbers. Unfortunately I was not able to find anything.  There are just some libraries for C++ language and packages for proprietary + There are just few libraries for the C++ language and packages for proprietary software.  I was thinking to develop a calculator on my own, but I was not that happy  because it would have required a lot of effort.  Then I discovered Octave.  After a look at its tutorial I decided to write a package to work on intervals  in Octave.  It was the right choice, because it took just three days to make SIMP while + I was thinking to develop a calculator on my own, but it would have required + a lot of effort and long time. + Then I discovered Octave +\begin_inset LatexCommand cite +key "key6" + +\end_inset + +. + By the way Octave is a great tool that can be used by every engineer for + its daily work. + After a look at Octave's tutorial +\begin_inset LatexCommand cite +key "key3" + +\end_inset + + I decided to write a package to work on intervals in Octave. + It was the right choice, because it took just three days to make it while building a new program from scratch would have taken weeks. The package extends the basic arithmetic functions to single interval mathemati cs, it is called SIMP.  Unfortunately it is not possible to overload Octave operators with m files,  therefore I made new functions working on matrix for that purpose. + As far as I know it is not possible to overload Octave operators with m + script files, therefore I made new functions working on matrix to extend + the basic operations to intervals. + In Octave it is possible to write the first few chars of a function and + then push the TAB key to get the list of the functions compatible. + Moreover it is really simple to build intermediate variables. + That makes not too long using the SIMP functions for standard calculations. \end_layout \begin_layout Standard @@ 145,7 +193,7 @@ \end_inset  shows some example to explain how the SIMP package can be used. + shows some examples to explain how the SIMP package can be used. Eventually the \begin_inset LatexCommand prettyref reference "sec:Functions" @@ 166,6 +214,27 @@ \end_layout \begin_layout Standard +SIMP is a simple interval calculator. + Intervals can be used instead of floating point number to automatically + take into account the tolerance of the values used in calculation. + All functions can be extended to interval: therefore it is possible to + apply all the functions to intervals to get the final result as an interval. + If you understand what intervals are, you can go directly to +\begin_inset LatexCommand prettyref +reference "sec:SingleIntervalMathematics" + +\end_inset + + to read some examples and then to +\begin_inset LatexCommand prettyref +reference "sec:Functions" + +\end_inset + + to see all the functions available. +\end_layout + +\begin_layout Standard Every day we need to compute the result of a lot of simple mathematical equations. For example the cost of the apples bought at the supermarket is given by @@ 192,8 +261,8 @@ \end_layout \begin_layout Enumerate Some values have an infinite number of digits after the decimal point, like  for +Some values have an infinite number of digits after the decimal point (real + number), like for \begin_inset Formula $\pi$ \end_inset @@ 201,9 +270,9 @@ \end_layout \begin_layout Enumerate Some values change with time or samples or whatever, like the weight of +Some values change with time or samples (or whatever), like the weight of a person (which can change of 5% during a day) or the current gain of a  BJT (which can change of 50% from the samples of the same series); + BJT (which can change of 50% on the samples of the same series); \end_layout \begin_layout Enumerate @@ 228,7 +297,7 @@ \end_layout \begin_layout Standard Here there are two errors: the circumference is knows with the tolerance +Here there are two errors: the circumference is known within the tolerance given by your meter, moreover \begin_inset Formula $\pi$ \end_inset @@ 239,13 +308,14 @@ buy a new pipe in a hardware shop. However the not infinite accuracy of those operation avoid the use of computers as automatic theorem demonstration tools and so on... + This kind of issue is quite common on engineer design. + What engineers do is to be sure their design will work in the worst case + or in most of the cases (usually more than 99.9%). + \end_layout \begin_layout Standard This kind of issue is quite common on engineer design.  What engineers do is to be sure their design will work in the worst case  or in most of the cases (usually more than 99.9%).  Here a simple example. +Here a simple example follows. Let us say you want to repaint the walls of your living room completely messed up by your children. You need to compute how many paint cans you need to buy. @@ 272,15 +342,16 @@ \end_layout \begin_layout Itemize roomWidth = 6 +roomWidth = 6 (from 5.4m to 6.6m) \end_layout \begin_layout Itemize steps roomLength = 4 +steps roomLength = 4 (from 3.6m to 4.4m) \end_layout \begin_layout Itemize steps roomHeight = 3 +steps roomHeight = 3 (it is assumed correct because its tolerance is much + smaller than the other pieces) \end_layout \begin_layout Itemize @@ 289,7 +360,8 @@ \end_layout \begin_layout Itemize paintLitersPerCan = 40 +paintLitersPerCan = 40 (it is assumed correct because its tolerance is much + smaller than the other pieces) \end_layout \begin_layout Standard @@ 314,9 +386,9 @@ \begin_layout Standard Are you satisfied with that result? I am not.  What if I have underestimated something? As every good engineer I would  check what happens in the worst case, which means 1.1m step and efficiency  of just 0.8. + What if I have underestimated something? As every engineer I would check + what happens in the worst case, which means 1.1m step and efficiency of + just 0.8. Again just substituting those values in \begin_inset LatexCommand eqref reference "eq:paintCans" @@ 367,14 +439,30 @@ \end_layout \begin_layout Standard As you can see in the example above a lot of computations are required to  get an idea of the result.  To get the worst (and sometime it is required also the best) case, you  need to think carefully at the equation because some time you need to put  the higher value (for steps) while other times the smallest (for efficiency)  to get the worst case and vice versa for the best. +As you saw in the example above a lot of computations are required to get + an idea of the range where the result of the equation lay. + To get the worst case, you need to think carefully at the equation because + some time you need to put the higher value (like for steps in +\begin_inset LatexCommand prettyref +reference "eq:paintCans" + +\end_inset + +) while other times the smallest (like for efficiency in +\begin_inset LatexCommand prettyref +reference "eq:paintCans" + +\end_inset + +) to get the worst case and vice versa for the best. There is a much simpler way to work with that issue.  You can use intervals instead of number. + You can use intervals instead of number +\begin_inset LatexCommand cite +key "key1,key2" + +\end_inset + +. An interval is: \end_layout @@ 397,9 +485,18 @@ \end_inset ).  Moreover if it is correct to use a number, it is possible to use a degenerate + +\end_layout + +\begin_layout Standard +Moreover when it is correct to use a number, it is possible to use a degenerate interval like [a, a].  It is possible also to define functions that work on interval instead of + That means intervals can replace real numbers in every computation. + +\end_layout + +\begin_layout Standard +It is possible also to define functions that work on intervals instead of numbers: \end_layout @@ 419,27 +516,29 @@ \end_layout \begin_layout Standard Note also sometime a function may generate several intervals as result,  but in this package we will concentrate on single interval function.  I will give you an example: +Note also sometime a function may generate several intervals as result. + As an example consider the following division: \begin_inset Formula $[4,4]/[2,2]=[\infty,2]\cup[2,+\infty]$ \end_inset .  However the result is a double interval, for that reason if you try to  divide for a interval containing 0 in SIMP, you will get an error. +, it generates two interval as result. + However SIMP works only on single interval function, for that reason if + you try to divide for a interval containing 0 in SIMP, you will get an + error. \end_layout \begin_layout Standard Eventually note that usually compute the interval result of a function applied  to intervals is a long task.  Therefore sometime we are satisfied by a bigger interval containing the  correct interval.  However the target is always to get the smallest interval containing the  solution.  In the example above you would have: +Eventually note that usually computing the interval result of a function + applied to intervals requires a lot of steps. + Therefore sometime we may be satisfied to find, in a short time, a bigger + interval containing the smallest interval where the solution must lay. + \end_layout +\begin_layout Standard +In the example above you would have: +\end_layout + \begin_layout Itemize roomWidth = [5.4, 6.6] meters \end_layout @@ 480,7 +579,14 @@ \end_layout \begin_layout Standard There are few issues you need to know about interval computations. +There are few issues you need to know about interval computations because + they do not happen in standard mathematics +\begin_inset LatexCommand cite +key "key2" + +\end_inset + +. \end_layout @@ 499,7 +605,7 @@ \end_inset ) can be written in several ways.  If the dimensions of the rectangle are b end h we can write: + If the dimensions of the rectangle are b and h we can write: \end_layout \begin_layout Standard @@ 541,8 +647,8 @@ \begin_layout Standard What is important to remember is that: \emph on Every variable should appear just once in the equation if possible in order  to get the smallest interval possible as result. +Every variable should appear just once in the equation (if possible) in + order to get the smallest interval possible as result. \end_layout \begin_layout Subsection @@ 550,15 +656,17 @@ \end_layout \begin_layout Standard The result of a set of equation involving intervals is +The result of a set of simultaneous equations involving intervals is \emph on always \emph default  an Hypercube.  For example if we have just two equations in the unknowns x and y the result  will be a couple of intervals which draw a rectangle on the Cartesian plane.  However in general the solution will be smaller, for example just a segment.  In that case the rectangle will contain the solution. + an hypercube. + For example if we have two simultaneous equations in the unknowns x and + y the result will be a couple of intervals which draw a rectangle on the + Cartesian plane. + However the solution of a couple of simultaneous equations may be smaller, + for example a segment on the Cartesian plane. + In that case the rectangle will contain the segment. There is no way to solve that, just remember the solution is usually a super set of the actual one. \end_layout @@ 574,12 +682,34 @@ \end_layout \begin_layout Subsection Installation +How to run SIMP in Octave \end_layout \begin_layout Standard First of all you have to install the SIMP package in Octave, so that Octave  will automatically load the new functions at every start. +Octave +\begin_inset LatexCommand cite +key "key6" + +\end_inset + + is a powerful numeric calculator, which is what is required for design. + It is open source and freely available on a lot of platform. + I suggest to play with Octave to understand its basic functions +\begin_inset LatexCommand cite +key "key3,key4" + +\end_inset + + before using SIMP package. + +\end_layout + +\begin_layout Subsubsection +Install SIMP +\end_layout + +\begin_layout Standard +First of all you have to install the SIMP package in Octave. To do that just run Octave from the directory where was downloaded the package and execute the following command: \end_layout @@ 588,6 +718,27 @@ pkg install simp.tar.gz \end_layout +\begin_layout Standard +From the next execution of Octave, it will automatically load the new functions. + Therefore SIMP functions will be available as the standard Octave ones. +\end_layout + +\begin_layout Subsubsection +Remove SIMP +\end_layout + +\begin_layout Standard +If for some reason you want to remove the SIMP package, you can write: +\end_layout + +\begin_layout Itemize +pkg uninstall simp.tar.gz +\end_layout + +\begin_layout Standard +From the next execution of Octave all the SIMP functions will not be available. +\end_layout + \begin_layout Subsection Some example \end_layout @@ 596,7 +747,7 @@ SIMP works on matrix, interpreted as intervals. The basic interval is: [min, max], which in Octave is a row vector made by two elements.  The added functions work on those matrix. + The added functions work on those matrixes. For example to add the intervals [5.4, 6.6] and [3.6, 4.4] it is possible to write: \end_layout @@ 611,6 +762,15 @@ \begin_layout Standard addInt stands for add intervals. + All SIMP functions end with the word +\begin_inset Quotes eld +\end_inset + +Int +\begin_inset Quotes erd +\end_inset + +. It is possible to use scalar number instead of intervals. Every scalar is computed like: \begin_inset Formula $s=[s,s]$ @@ 657,7 +817,7 @@ \end_layout \begin_layout Standard Now we know enough from Octave to compute the equation +Now we know enough Octave syntax to compute the equation \begin_inset LatexCommand ref reference "eq:paintCans" @@ 689,8 +849,9 @@ \begin_layout Standard Sometime the intervals are expressed in terms of tolerance.  The electronic resistors are sold in several tolerances: 1%, 2%, 5%.  There is a function to easily make an interval from a tolerance. + The electronic resistors are sold in several tolerance classes: 1%, 2%, + 5%. + There is a SIMP function to easily make an interval from a tolerance. For example a resistor of 10KOhms with 5% of tolerance can be converted in an interval: \end_layout @@ 716,17 +877,61 @@ \end_layout \begin_layout Standard All the computations are done among intervals, therefore if a result with  tolerance is required it is possible to get back the value and tolerance  of an interval in the hypothesis that the tolerance is symmetrical: +It is also possible to convert values from engineer notation to interval: \end_layout \begin_layout Itemize +intFormInt([ +\begin_inset Quotes eld +\end_inset + +10K+5% +\begin_inset Quotes erd +\end_inset + +) +\end_layout + +\begin_layout Description +> ans = [9500, 10500] +\end_layout + +\begin_layout Itemize +intFormInt([ +\begin_inset Quotes eld +\end_inset + +10K+5%10% +\begin_inset Quotes erd +\end_inset + +) +\end_layout + +\begin_layout Description +> ans = [9000, 10500] +\end_layout + +\begin_layout Standard +All the computations are done among intervals in SIMP. + Therefore there is a SIMP function to convert an interval in engineer notation + (in the hypothesis that the tolerance is symmetrical): +\end_layout + +\begin_layout Itemize engFormInt([9500, 10500]) \end_layout \begin_layout Description > 10K+5% +> ans = +\begin_inset Quotes eld +\end_inset + +10K+5% +\begin_inset Quotes erd +\end_inset + + \end_layout \begin_layout Standard @@ 734,7 +939,7 @@ to compute functions. It is possible to compute operation on vectors of the same size (element by element) or scalar by vector.  In that case the scalar is expanded in a vector of the sime size of the + In that case the scalar is expanded to a vector of the same size of the others. That is really useful for the functions where a x vector can be used to compute a y in just one time. @@ 781,7 +986,7 @@ \end_layout \begin_layout Standard As you can see SMIP can be used just like a calculator. +As you can see SIMP can be used just like a calculator. The basic operations are applied on intervals instead of scalar. That makes really simple to evaluate equations where some data is uncertain. \end_layout @@ 797,7 +1002,7 @@ \end_layout \begin_layout Standard This section describe the functions provided in the package. +This section describes the functions provided in the SIMP package. \end_layout \begin_layout Subsection @@ 805,275 +1010,542 @@ \end_layout \begin_layout Standard An interval is described by a matrix with two columns and a row. +All the SIMP functions work on vector of intervals as input. + +\end_layout + +\begin_layout Standard +A vector of intervals is a matrix with two columns and many rows: every + row describes an interval. The matrix is composed by real numbers. +\end_layout + +\begin_layout Standard +An interval is a degenerate vector with two columns and only one row. The first value is the interval minimum, the second is the interval maximum.  A real number is interpreted like an interval with the same maximum and  minimum.  It is also possible to write a vector of intervals: it is a matrix with  two columns and n rows, where every row is an interval. + Therefore [1.1, 2.1] is an interval with 1.1 as lower boundary and 2.1 as upper + boundary. \end_layout +\begin_layout Standard +A real number is meant as a case of degenerate interval with maximum and + minimum values coincident. + Therefore 5 is like [5, 5]. +\end_layout + +\begin_layout Standard +It is useful working on vector because the same operation can be applied + to several intervals in one step. + All the vectors involved must have the same number of rows (intervals), + with the exception of scalar and single interval. + They are automatically expanded to the number of rows (intervals) that + matches the other inputs. +\end_layout + \begin_layout Subsection addInt (a, b, c, ...) +valtol100ToInt (v1, ptol, ntol) +\begin_inset LatexCommand label +name "sub:valtol100ToInt(v,ptol," + +\end_inset + + \end_layout \begin_layout Standard +valtol100ToInt produces an interval with center value given by the scalar + v1, and positive and negative tolerance express in percentage given by + ptol and ntol. + ntol is optional, if ntol is not present it is assumed equal to ptol. +\end_layout + +\begin_layout Subsection +intToTol (v1) +\end_layout + +\begin_layout Standard +intToTol produces the tolerance of the vector of interval v1, in the hypothesis + that the actual value is in the average point between minimum and maximum. + +\end_layout + +\begin_layout Subsection +intToTol100 (v1) +\end_layout + +\begin_layout Standard +intToTol100 produces the tolerance (expressed in percentage) of the vector + of interval v1, in the hypothesis that the actual value is in the average + point between minimum and maximum. +\end_layout + +\begin_layout Subsection +intToVal (v1) +\end_layout + +\begin_layout Standard +intToVal produces the central value of the vector of intervals v1, in the + hypothesis that the actual value is in the average point. +\end_layout + +\begin_layout Subsection +engFormInt (v1) +\begin_inset LatexCommand label +name "sub:engFormInt(a)" + +\end_inset + + +\end_layout + +\begin_layout Standard +engFormInt returns a vector of strings representing the intervals in the + vector v1 in engineer notation. + As value it returns the average between minimum and maximum which means + symmetric tolerance. +\end_layout + +\begin_layout Standard +The engineer notation is obtained finding the exponent (multiple of three) + so that the mantissa is between 1 and 1000, then the exponent is converted + into a letter as per the following list: +\end_layout + +\begin_layout Itemize +Y = +\begin_inset Formula $10^{24}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +Z = +\begin_inset Formula $10^{21}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +E = +\begin_inset Formula $10^{18}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +P = +\begin_inset Formula $10^{15}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +T = +\begin_inset Formula $10^{12}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +G = +\begin_inset Formula $10^{9}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +M = +\begin_inset Formula $10^{6}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +K = +\begin_inset Formula $10^{3}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +nothing = +\begin_inset Formula $10^{0}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +m = +\begin_inset Formula $10^{3}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +u = +\begin_inset Formula $10^{6}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +n = +\begin_inset Formula $10^{9}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +p = +\begin_inset Formula $10^{12}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +f = +\begin_inset Formula $10^{15}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +a = +\begin_inset Formula $10^{18}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +z = +\begin_inset Formula $10^{21}$ +\end_inset + + +\end_layout + +\begin_layout Itemize +y = +\begin_inset Formula $10^{24}$ +\end_inset + + +\end_layout + +\begin_layout Standard +Eventually the tolerance is added in form of percentage: +\begin_inset Quotes eld +\end_inset + ++ +\begin_inset Quotes erd +\end_inset + + tolerance in percentage +\begin_inset Quotes eld +\end_inset + +% +\begin_inset Quotes erd +\end_inset + +. + Please note that the tolerance is symmetric which is not always the actual + case. + For example engFormInt([9500, 10500]) = +\begin_inset Quotes eld +\end_inset + +10K+10% +\begin_inset Quotes erd +\end_inset + +. + +\end_layout + +\begin_layout Standard +Note that with other functions ( +\begin_inset LatexCommand prettyref +reference "sub:valtol100ToInt(v,ptol," + +\end_inset + +) it is possible to define intervals with not symmetric tolerance, they + will not be converted properly back by +\begin_inset LatexCommand prettyref +reference "sub:engFormInt(a)" + +\end_inset + +. +\end_layout + +\begin_layout Subsection +intFormInt (string) +\end_layout + +\begin_layout Standard +intFormInt returns a vector of intervals given a vector of strings (or a + single string) representing the number in engineer notation. + See +\begin_inset LatexCommand prettyref +reference "sub:engFormInt(a)" + +\end_inset + + for details on engineer notation. + For example intFormInt( +\begin_inset Quotes eld +\end_inset + +10K+10% +\begin_inset Quotes erd +\end_inset + +) = [9500, 10500]. + +\end_layout + +\begin_layout Standard +Although it is not orthogonal to +\begin_inset LatexCommand prettyref +reference "sub:engFormInt(a)" + +\end_inset + +, it evaluates also expression with not symmetric tolerance: 10K+5%10% + is converted to [9000, 10500]. + That was done because not symmetric tolerance is quite common in practice. +\end_layout + +\begin_layout Subsection +addInt (v1, v2, v3, ...) +\end_layout + +\begin_layout Standard addInt adds the given vector of intervals. It returns \begin_inset Formula $a+b+c+\ldots$ +\begin_inset Formula $v1+v2+v3+\ldots$ \end_inset .  They must have the same number of rows or be scalars. + They must have the same number of rows or be single interval or be scalars. At least two vectors are required. \end_layout \begin_layout Subsection negateInt (a) +negateInt (v1) \end_layout \begin_layout Standard negateInt negates the given vector of intervals. It returns \begin_inset Formula $a$ +\begin_inset Formula $v1$ \end_inset . \end_layout \begin_layout Subsection subInt (a, b, c, ...) +subInt (v1, v2, v3, ...) \end_layout \begin_layout Standard subInt subtracts the given vector of intervals. It returns \begin_inset Formula $abc\ldots$ +\begin_inset Formula $v1v2v3\ldots$ \end_inset .  They must have the same number of rows or be scalar. + They must have the same number of rows or be single interval or be scalar. At least two vectors are required. \end_layout \begin_layout Subsection mulInt (a, b, c, ...) +mulInt (v1, v2, v3, ...) \end_layout \begin_layout Standard mulInt multiplies the given vector of intervals. It returns \begin_inset Formula $a\cdot b\cdot c\cdot\ldots$ +\begin_inset Formula $v1\cdot v2\cdot v3\cdot\ldots$ \end_inset .  They must have the same number of rows or be scalar. + They must have the same number of rows or be single interval or be scalar. At least two vectors are required. \end_layout \begin_layout Subsection invertInt (a) +invertInt (v1) \end_layout \begin_layout Standard invertInt inverts the given vector of intervals. It returns \begin_inset Formula $\frac{1}{a}$ +\begin_inset Formula $\frac{1}{v1}$ \end_inset . \end_layout \begin_layout Subsection invertAddInt (a, b, c, ...) +invertAddInt (v1, v2, v3, ...) \end_layout \begin_layout Standard invertAddInt adds the inverse of the given vector of intervals and then inverts again the result. It returns \begin_inset Formula $\frac{1}{\frac{1}{a}+\frac{1}{b}+\frac{1}{c+\ldots}}$ +\begin_inset Formula $\frac{1}{\frac{1}{v1}+\frac{1}{v2}+\frac{1}{v3}+\cdots}$ \end_inset .  They must have the same number of rows or be scalar. + They must have the same number of rows or be single interval or be scalar. At least two vectors are required. \end_layout \begin_layout Subsection divInt (a, b, c, ...) +divInt (v1, v2, v3, ...) \end_layout \begin_layout Standard divInt divides the given vector of intervals. It returns \begin_inset Formula $\frac{\frac{a}{b}}{c}\ldots$ +\begin_inset Formula $\frac{\frac{v1}{v2}}{v3}\ldots$ \end_inset .  They must have the same number of rows or be scalar. + They must have the same number of rows or be single interval or be scalar. + The vectors v2, v3, ... + must not include 0. At least two vectors are required. \end_layout \begin_layout Subsection powerInt (a, n) +powerInt (v1, n) \end_layout \begin_layout Standard powerInt rise the given vector of intervals to the power of n. It returns \begin_inset Formula $a^{n}$ +\begin_inset Formula $v1^{n}$ \end_inset . \end_layout \begin_layout Subsection sqrInt (a) +sqrInt (v1) \end_layout \begin_layout Standard sqrInt squares the given vector of intervals. It returns \begin_inset Formula $a^{2}$ +\begin_inset Formula $v1^{2}$ \end_inset . \end_layout \begin_layout Subsection sqrtInt (a) +sqrtInt (v1) \end_layout \begin_layout Standard sqrtInt square roots the given vector of intervals. It returns \begin_inset Formula $\sqrt{a}$ +\begin_inset Formula $\sqrt{v1}$ \end_inset . \end_layout \begin_layout Subsection sqrAddInt (a, b, c, ...) +sqrAddInt (v1, v2, v3, ...) \end_layout \begin_layout Standard addSqrInt adds the square of the given vector of intervals and then it squares root the result. It returns \begin_inset Formula $\sqrt{a^{2}+b^{2}+c^{2}+\ldots}$ +\begin_inset Formula $\sqrt{v1^{2}+v2^{2}+v3^{2}+\ldots}$ \end_inset .  They must have the same number of rows or be scalar. + They must have the same number of rows or be single interval or be scalar. At least two vectors are required. \end_layout \begin_layout Subsection engFormInt (a) +dB10ToLinInt (v1) \end_layout \begin_layout Standard engFormInt prints the intervals in the vector a in engineer format.  It prints the average between minimum and maximum expressed with engineer  notation and add the tolerance in percentage. \end_layout  \begin_layout Subsection dB10ToLinInt (a) \end_layout  \begin_layout Standard db10ToLinInt rises 10 to the power of a tens. +db10ToLinInt rises 10 to the power of v1 tens. It returns \begin_inset Formula $10^{\frac{a}{10}}$ +\begin_inset Formula $10^{\frac{v1}{10}}$ \end_inset . \end_layout \begin_layout Subsection linToDB10Int (a) +linToDB10Int (v1) \end_layout \begin_layout Standard linToDB10Int produces 10 times the logarithm of a. +linToDB10Int produces 10 times the logarithm of v1. It returns \begin_inset Formula $10log_{10}(a)$ +\begin_inset Formula $10log_{10}(v1)$ \end_inset . \end_layout \begin_layout Subsection dB20ToLinInt (a) +dB20ToLinInt (v1) \end_layout \begin_layout Standard db10ToLinInt rises 10 to the power of a twenties. +db10ToLinInt rises 10 to the power of v1 twenties. It returns \begin_inset Formula $10^{\frac{a}{20}}$ +\begin_inset Formula $10^{\frac{v1}{20}}$ \end_inset . \end_layout \begin_layout Subsection linToDB20Int (a) +linToDB20Int (v1) \end_layout \begin_layout Standard linToDB10Int produces 20 times the logarithm of a. +linToDB10Int produces 20 times the logarithm of v1. It returns \begin_inset Formula $20log_{10}(a)$ +\begin_inset Formula $20log_{10}(v1)$ \end_inset . \end_layout \begin_layout Subsection valtol100ToInt (v, ptol, ntol) \end_layout  \begin_layout Standard valtol100ToInt produces an interval with center value given by the scalar  v, and positive and negative tolerance express in percentage given by ptol  and ntol.  ntol is optional, if not present it is assumed equal to ptol. \end_layout  \begin_layout Subsection intToTol (a) \end_layout  \begin_layout Standard intToTol produces the tolerance of the vector of interval a, in the hypothesis  that the actual value is in the average point.  \end_layout  \begin_layout Subsection intToTol100 (a) \end_layout  \begin_layout Standard intToTol100 produces the tolerance (expressed in percentage) of the vector  of interval a, in the hypothesis that the actual value is in the average  point. \end_layout  \begin_layout Subsection intToVal (a) \end_layout  \begin_layout Standard intToVal produces the central value of the vector of intervals a, in the  hypothesis that the actual value is in the average point. \end_layout  \begin_layout Subsection linSpaceTol100Int (begin, end, numberOfIntervals, tolerance) \end_layout @@ 1104,8 +1576,8 @@ \end_layout \begin_layout Standard monotonicFunctionInt produces the y interval obtained applying the monotonic  function f to the interval x. +monotonicFunctionInt produces the y vector of interval obtained applying + the monotonic function f to the vector of interval x. If f is not monotonic, y may be wrong. \end_layout @@ 1114,8 +1586,8 @@ \end_layout \begin_layout Standard functionInt try to produces the y interval obtained applying the function  f to the interval x. +functionInt try to produces the y vector of interval obtained applying the + function f to the vector of interval x. The function is checked for monotonicity on the given number of point. nOfPoint is optional, default is 10. \end_layout @@ 1125,7 +1597,8 @@ \end_layout \begin_layout Standard plotInt plots two curves. +plotInt plots the interval of vector y respect to the interval of vector + x. Those curves, for every x interval center point, goes through ymin and ymax. x and y must have the same rows. @@ 1139,23 +1612,58 @@ For every x center point, plots the y tolerance. \end_layout +\begin_layout Standard + +\newpage + +\end_layout + \begin_layout Section Biography \end_layout \begin_layout Enumerate +\begin_layout Bibliography +\begin_inset LatexCommand bibitem +key "key1" + +\end_inset + http://en.wikipedia.org/wiki/Interval_arithmetic \end_layout \begin_layout Enumerate +\begin_layout Bibliography +\begin_inset LatexCommand bibitem +key "key2" + +\end_inset + http://www.cs.utep.edu/intervalcomp/hayes.pdf \end_layout \begin_layout Enumerate +\begin_layout Bibliography +\begin_inset LatexCommand bibitem +key "key6" + +\end_inset + +http://www.octave.org +\end_layout + +\begin_layout Bibliography +\begin_inset LatexCommand bibitem +key "key3" + +\end_inset + http://wwwmdp.eng.cam.ac.uk/web/CD/engapps/octave/octavetut.pdf \end_layout \begin_layout Enumerate +\begin_layout Bibliography +\begin_inset LatexCommand bibitem +key "key4" + +\end_inset + http://www.gnu.org/software/octave/docs.html \end_layout Modified: trunk/octaveforge/main/simp/doc/simp.pdf =================================================================== (Binary files differ) Modified: trunk/octaveforge/main/simp/inst/__engSingleFormInt__.m ===================================================================  trunk/octaveforge/main/simp/inst/__engSingleFormInt__.m 20090106 15:01:30 UTC (rev 5514) +++ trunk/octaveforge/main/simp/inst/__engSingleFormInt__.m 20090106 20:16:32 UTC (rev 5515) @@ 19,18 +19,18 @@ ## Author: simone pernice ## Created: 20080818 function __engSingleFormInt__ (interval) +function ret = __engSingleFormInt__ (interval) tol = intToTol100 (interval); val = intToVal (interval); coeff = 0;  while abs(val) < 1 && coeff > 5 + while abs(val) < 1 && coeff > 8 val *= 1000; coeff = 1; endwhile  while abs(val) >= 1000 && coeff < 4 + while abs(val) >= 1000 && coeff < 8 val /= 1000; coeff += 1; endwhile  units = "fpnum KMGT";  disp(sprintf ("%g%c+%g%%", val, units(coeff+6), tol)); + units = "yzafpnum KMGTPEZY"; + ret = sprintf ("%g%c+%g%%", val, units(coeff+9), tol); endfunction Added: trunk/octaveforge/main/simp/inst/__intSingleFormInt__.m ===================================================================  trunk/octaveforge/main/simp/inst/__intSingleFormInt__.m (rev 0) +++ trunk/octaveforge/main/simp/inst/__intSingleFormInt__.m 20090106 20:16:32 UTC (rev 5515) @@ 0,0 +1,96 @@ +## Copyright (C) 2008 simone pernice +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 021101301 USA + +## __intSingleFormInt__ return an interval from the given engineer format string + +## Author: simone pernice +## Created: 20081231 + +function ret = __intSingleFormInt__ (engnotation) + if (! ischar (engnotation)) + error ("It is required a string as input"); + endif + if (nargin() != 1) + error ("Wrong number of argument passed to the function."); + endif + + l = length (engnotation); + + #skip the initial sign + s = i = 1; + if ((c = engnotation(1)) == "+"  c == "") + i = 2; + endif + + #count for the value + while (i <= l && (isdigit(c = engnotation(i))  c == "."  c == "e")) + ++i; + if ( c == "e" && (engnotation(i) == "+"  engnotation(i) == "")) + ++i; + endif + endwhile + + #convert the value + val = str2double(substr(engnotation,s,is)); + + #look if a engineer coefficient is present and get the power + power = strfind ("yzafpnum KMGTPEZY", engnotation(i)); + if (length (power) == 0) + power = 9; + else + power = power (1); + ++i; + endif + #apply the power + val *= 10^(3*(power9)); + + #look for the positive and negative tolerance (fpt is foundPositiveTolerance, fnt is foundNegativeTolerance) + fpt = fnt = 0; + while (i <= l) + + #skip positive and negative signs storing what was found + while (i <= l && ((c = engnotation(i)) == "+"  c == "")) + ++i; + if (c == "+") fpt = 1; + elseif (c == "") fnt = 1; + endif + endwhile + s = i; + + #skip the digits untile the % is found + while (i <= l && engnotation(i) != "%") + ++i; + endwhile + + #convert the positive tolerance + if (fpt) + ptol = str2double(substr(engnotation,s,is)); + endif + + #convert the negative tolerance + if (fnt) + ntol = str2double(substr(engnotation,s,is)); + endif + + fpt = fnt = 0; + ++i; + endwhile + + + #build the interval + ret = valtol100ToInt(val, ptol, ntol); + +endfunction Modified: trunk/octaveforge/main/simp/inst/engFormInt.m ===================================================================  trunk/octaveforge/main/simp/inst/engFormInt.m 20090106 15:01:30 UTC (rev 5514) +++ trunk/octaveforge/main/simp/inst/engFormInt.m 20090106 20:16:32 UTC (rev 5515) @@ 19,16 +19,11 @@ ## Author: simone pernice ## Created: 20080818 function engFormInt (interval) +function ret = engFormInt (interval) if (nargin() != 1) error ("Wrong number of argument passed to the function."); endif   if (rows(interval) >0)  r = 1;  while r <= rows (interval)  __engSingleFormInt__ (interval (r,:));  ++r;  endwhile  endif + + ret = __intervalFunctionMultiInt__('__engSingleFormInt__', interval); + endfunction Added: trunk/octaveforge/main/simp/inst/intFormInt.m ===================================================================  trunk/octaveforge/main/simp/inst/intFormInt.m (rev 0) +++ trunk/octaveforge/main/simp/inst/intFormInt.m 20090106 20:16:32 UTC (rev 5515) @@ 0,0 +1,29 @@ +## Copyright (C) 2008 simone pernice +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 021101301 USA + +## intFormInt create an interval from a string or vector of strings in engineear format + +## Author: simone pernice +## Created: 20081231 + +function ret = intFormInt (interval) + if (nargin() != 1) + error ("Wrong number of argument passed to the function."); + endif + + ret = __intervalFunctionMultiInt__('__intSingleFormInt__', interval); + +endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 
From: <treichl@us...>  20090106 15:01:35

Revision: 5514 http://octave.svn.sourceforge.net/octave/?rev=5514&view=rev Author: treichl Date: 20090106 15:01:30 +0000 (Tue, 06 Jan 2009) Log Message:  Copyright changes from GPL2 to GPL3. Modified Paths:  trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/Readme.texi trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/makeoctaveapp.sh trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/mkoctfile.in trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/octave.in trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/selfupdate.sh trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/startup.sh.in Modified: trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/Readme.texi =================================================================== (Binary files differ) Modified: trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/makeoctaveapp.sh ===================================================================  trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/makeoctaveapp.sh 20090106 14:52:07 UTC (rev 5513) +++ trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/makeoctaveapp.sh 20090106 15:01:30 UTC (rev 5514) @@ 1,8 +1,9 @@ #!/bin/sh # Copyright (C) 2007, Thomas Treichl and Paul Kienzle +# Copyright (C) 20072008, Thomas Treichl and Paul Kienzle +# Copyright (C) 2009, Thomas Treichl # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but Modified: trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/mkoctfile.in ===================================================================  trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/mkoctfile.in 20090106 14:52:07 UTC (rev 5513) +++ trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/mkoctfile.in 20090106 15:01:30 UTC (rev 5514) @@ 1,8 +1,9 @@ #!/bin/sh # Copyright (C) 20072008, Thomas Treichl and Paul Kienzle +# Copyright (C) 2009, Thomas Treichl # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but Modified: trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/octave.in ===================================================================  trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/octave.in 20090106 14:52:07 UTC (rev 5513) +++ trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/octave.in 20090106 15:01:30 UTC (rev 5514) @@ 1,8 +1,9 @@ #!/bin/sh # Copyright (C) 20072008, Thomas Treichl and Paul Kienzle +# Copyright (C) 2009, Thomas Treichl # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but Modified: trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/selfupdate.sh ===================================================================  trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/selfupdate.sh 20090106 14:52:07 UTC (rev 5513) +++ trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/selfupdate.sh 20090106 15:01:30 UTC (rev 5514) @@ 1,9 +1,9 @@ #!/bin/sh # Copyright (C) 2007, Thomas Treichl and Paul Kienzle # Copyright (C) 2008, Thomas Treichl +# Copyright (C) 20082009, Thomas Treichl # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ 12,9 +12,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 021101301 USA +# along with this program; If not, see <http://www.gnu.org/licenses/>;. # Cf. the manpage of bash: "set e" exits the script immediately if a # simple command exits with a nonzero status. "set u" treats unset Modified: trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/startup.sh.in ===================================================================  trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/startup.sh.in 20090106 14:52:07 UTC (rev 5513) +++ trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/startup.sh.in 20090106 15:01:30 UTC (rev 5514) @@ 1,8 +1,9 @@ #!/bin/sh # Copyright (C) 2007, Thomas Treichl and Paul Kienzle +# Copyright (C) 20082009, Thomas Treichl # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 
From: <treichl@us...>  20090106 14:52:13

Revision: 5513 http://octave.svn.sourceforge.net/octave/?rev=5513&view=rev Author: treichl Date: 20090106 14:52:07 +0000 (Tue, 06 Jan 2009) Log Message:  Removed function "evalfailexit" and added "set euv" instead. Modified Paths:  trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/selfupdate.sh Modified: trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/selfupdate.sh ===================================================================  trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/selfupdate.sh 20090105 19:15:27 UTC (rev 5512) +++ trunk/octaveforge/admin/MacOSX/Octave.app/dmgpacker/selfupdate.sh 20090106 14:52:07 UTC (rev 5513) @@ 16,8 +16,15 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 021101301 USA +# Cf. the manpage of bash: "set e" exits the script immediately if a +# simple command exits with a nonzero status. "set u" treats unset +# variables as an error. "set v" print shell input lines as they are +# read. +set euv + # USAGE: # Put this script into the root directory of your Octave sources. +# # Before you start this script by a call of './selfupdate.sh' make # sure that you don't use Apple's original programs 'sed', 'awk', # 'aclocal', 'automake', 'bison' and 'flex' anymore. Download these @@ 25,6 +32,7 @@ # your system where they can be found (eg. in /usr/local/bin, make # sure that you set the $PATH environment variable correctly # below). On my system this looks like +# # bash ~$ which {sed,awk,aclocal,automake,bison,flex} # /usr/local/bin/sed # /usr/local/bin/awk @@ 33,6 +41,7 @@ # /usr/local/bin/bison # /usr/local/bin/flex # /usr/local/bin/sed +# # Change the version number in the file src/version.h to that # version number of the current Octave.app that should be # updated. Then modify the following APPPATH variable for your @@ 51,37 +60,41 @@ # Add the option ggdb to CFLAGS, CPPFLAGS and CXXFLAGS if you want to # create a debug version of Octave by adding ggdb to OPTFLAGS. ARCH="arch i386" OPTFLAGS="O3 ftreevectorize march=i686 mfpmath=sse,387 fforceaddr mieeefp msse3 msse2 msse mmmx ggdb" +OPTFLAGS="O3 fforceaddr march=i686 mfpmath=sse,387 mieeefp \ +msse3 msse2 msse mmmx ggdb" # Here are the optimization flags that can be used on a PPC platform # ARCH="arch ppc" # OPTFLAGS="O3 ftreevectorize mpowerpc faltivec maltivec mabi=altivec" +# OPTFLAGS="O3 mpowerpc faltivec maltivec mabi=altivec" # If you are running a Mac OS X 10.3 on the PPC platform then change to # MACOSX_DEPLOYMENT_TARGET=10.3 +# The MacOSX deployment target must be set to 10.4 for PPC and i386 export MACOSX_DEPLOYMENT_TARGET=10.4 +# The compiler directives GCC="gcc ${ARCH} ${OPTFLAGS}" CPP="gcc ${ARCH} E" CXX="g++ ${ARCH} ${OPTFLAGS}" # If you are running a Mac OS X 10.3 on the PPC platform then change to # isysroot /Developer/SDKs/MacOSX10.3.9.sdk and in the LDFLAGS use that # line Wl,syslibroot Wl,/Developer/SDKs/MacOSX10.3.9.sdk CFLAGS="isysroot /Developer/SDKs/MacOSX10.4u.sdk I/usr/X11R6/include I${INCPATH} I${INCPATH}/curl I${INCPATH}/readline I${INCPATH}/freetype I${INCPATH}/GraphicsMagick" +# The compiler flags +CFLAGS="isysroot /Developer/SDKs/MacOSX10.4u.sdk I/usr/X11R6/include \ +I${INCPATH} I${INCPATH}/curl I${INCPATH}/readline I${INCPATH}/freetype \ +I${INCPATH}/GraphicsMagick" CPPFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}" #LDFLAGS="L${LIBPATH} L${LIBPATH}/pkgconfig Wl,headerpad_max_install_names Wl,syslibroot Wl,/Developer/SDKs/MacOSX10.4u.sdk Xlinker m" LDFLAGS="L${LIBPATH} L${LIBPATH}/pkgconfig Wl,headerpad_max_install_names Wl,syslibroot Wl,/Developer/SDKs/MacOSX10.4u.sdk" +LDFLAGS="L${LIBPATH} L${LIBPATH}/pkgconfig Wl,headerpad_max_install_names \ +Wl,syslibroot Wl,/Developer/SDKs/MacOSX10.4u.sdk" +# LDFLAGS="L${LIBPATH} L${LIBPATH}/pkgconfig Wl,headerpad_max_install_names \ +# Wl,syslibroot Wl,/Developer/SDKs/MacOSX10.4u.sdk Xlinker m" # Note: another architecture flag and isysroot information here, change # this if you are running a Mac OS X on the PPC platform +# Note: another architecture flag here, change this if you are running +# a Mac OS X on the PPC platform F77="fort77 ${OPTFLAGS}" FLIBS="L${LIBPATH} lf2c" FFLAGS="Wc,arch Wc,i386 Wc,isysroot Wc,/Developer/SDKs/MacOSX10.4u.sdk ${OPTFLAGS} I${INCPATH}" +FFLAGS="${OPTFLAGS} I${INCPATH} Wc,arch Wc,i386 \ +Wc,isysroot Wc,/Developer/SDKs/MacOSX10.4u.sdk" # If you are running a Mac OS X 10.3 on the PPC platform then change to # EXTRACONF="host=powerpcappledarwin7.9.1" +# This is just used to display the right message at startup of +# Octave.app, for PPC use EXTRACONF="host=i386appledarwin7.9.1" EXTRACONF="host=i386appledarwin8.9.1" # I have installed the GNU tools in /usr/local/bin, that's why I need @@ 90,48 +103,36 @@ export PATH=${BINPATH}:/usr/local/bin:${PATH} export DYLD_LIBRARY_PATH=${LIBPATH} # Function: evalfailexit # Input args: ${1} is the string that has to be evaluated # Description: Evaluates the ${1} string prints a message to ${MSGFILE} # and exits with an error number 1 on fail evalfailexit() {  if ( ! eval "${1} 2>&1 >>${MSGFILE}" ); then  echo "selfupdate.sh: Building Octave.app has failed !!!"  echo "selfupdate.sh: The command that failed was: ${1}"  exit 1  fi }  # Use another file for output while './configure' and 'make' and # 'make install', eg. MSGFILE=/tmp/mymessages.log MSGFILE=/dev/stdout # /tmp/messages.log # /dev/stdout +MSGFILE=/tmp/messages.log # /dev/stdout # Rebuild the './configure' script with './autogen.sh' to make sure # that we have the latest changes available. evalfailexit "./autogen.sh" evalfailexit "./configure CC=\"${GCC}\" CPP=\"${CPP}\" CXX=\"${CXX}\" \ +./autogen.sh >>${MSGFILE} 2>&1 +eval "./configure CC=\"${GCC}\" CPP=\"${CPP}\" CXX=\"${CXX}\" \ F77=\"${F77}\" FLIBS=\"${FLIBS}\" FFLAGS=\"${FFLAGS}\" \ CFLAGS=\"${CFLAGS}\" CPPFLAGS=\"${CPPFLAGS}\" CXXFLAGS=\"${CXXFLAGS}\" \  LDFLAGS=\"${LDFLAGS}\" prefix=${PRFPATH} enableshared" evalfailexit "make" + LDFLAGS=\"${LDFLAGS}\" prefix=${PRFPATH} enableshared >>${MSGFILE} 2>&1" +make >>${MSGFILE} 2>&1 # This is the point of *no return*: If something goes wrong in the # following six lines then your new Octave.app may be definitely be # broken. We need to store the startup scripts of Octave.app with the # following two lines because they will be overwritten. evalfailexit "mv ${PRFPATH}/bin/octave ${PRFPATH}/bin/_octave" evalfailexit "mv ${PRFPATH}/bin/mkoctfile ${PRFPATH}/bin/_mkoctfile" +mv ${PRFPATH}/bin/octave ${PRFPATH}/bin/_octave +mv ${PRFPATH}/bin/mkoctfile ${PRFPATH}/bin/_mkoctfile # Cleanup as much as possible of the current Octave.app and install # the new binaries. evalfailexit "make uninstall" evalfailexit "make install" +make uninstall >>${MSGFILE} 2>&1 +make install >>${MSGFILE} 2>&1 # Replace the new created startup scripts that have been installed # with the old startup scripts of Octave.app  keep the _* files. evalfailexit "mv ${PRFPATH}/bin/_octave ${PRFPATH}/bin/octave" evalfailexit "mv ${PRFPATH}/bin/_mkoctfile ${PRFPATH}/bin/mkoctfile" +mv ${PRFPATH}/bin/_octave ${PRFPATH}/bin/octave +mv ${PRFPATH}/bin/_mkoctfile ${PRFPATH}/bin/mkoctfile # Let's run make check at the end of the installation process to have # a look how many of the tests succeed. evalfailexit "make check" +make check >>${MSGFILE} 2>&1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 