<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-1897</id>
	<title>Nabble - Octave - General</title>
	<updated>2008-10-10T14:58:06Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Octave---General-f1897.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Octave---General-f1897.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-19926956</id>
	<title>Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-10T14:58:06Z</published>
	<updated>2008-10-10T14:58:06Z</updated>
	<author>
		<name>dbateman</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks a lot for this post. I will try to implement my algorithms in the way
&lt;br&gt;&amp;gt; you described. Maybe there is one drawback. If the &amp;quot;query&amp;quot; call computes
&lt;br&gt;&amp;gt; some results for further computations they are lost with the end of the
&lt;br&gt;&amp;gt; &amp;quot;query&amp;quot; call and have to be recomputed in the second call. This can decrease
&lt;br&gt;&amp;gt; the performance of the algorithm. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;I've done quite a bit of F77 programming in my time and the declaring a 
&lt;br&gt;variable with &amp;quot;SAVE&amp;quot; allows its value to be stored between invocations 
&lt;br&gt;of a function. Can't you arrange that the precalculated values are 
&lt;br&gt;stored and reused on the second call?
&lt;br&gt;&lt;br&gt;D.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19926956&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19926956.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19926424</id>
	<title>Re: Help need for Differential algebraic equations</title>
	<published>2008-10-10T14:30:18Z</published>
	<updated>2008-10-10T14:30:18Z</updated>
	<author>
		<name>genehacker</name>
	</author>
	<content type="html">thanks very much for the help. now it defnitely works:)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;genehacker wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi all,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; I am new to octave and i love it the best as an open source alternative to matlab. I used lsode to solve ordinary diff equations, but now I do also have some algebraic equations to solve along.
&lt;br&gt;&lt;br&gt;I came across this function 'dassl', which is supposed to solve differential algebraic equations, but have problems using it. This is how i use it currently and below is the error message. I have no idea what it is. Please help!
&lt;br&gt;&lt;br&gt;******code*****
&lt;br&gt;&lt;br&gt;function xdot = f(x,xdot,t);
&lt;br&gt;%define all parameter values viz. k12, k23,f86 etc here
&lt;br&gt;xdot = zeros(9,1);
&lt;br&gt;xdot(2) = k12*x(1) - k23*x(2);
&lt;br&gt;xdot(3) = k23*x(2);
&lt;br&gt;xdot(5) = k45*x(4) - k56*x(5);
&lt;br&gt;xdot(6) = k56*x(5) - k67*x(6);
&lt;br&gt;xdot(7) = k67*x(6);
&lt;br&gt;&lt;br&gt;x(8) = f86*x(6);
&lt;br&gt;x(9) = f29*x(2);
&lt;br&gt;&lt;b&gt;endfunction&lt;/b&gt;;
&lt;br&gt;&lt;br&gt;&lt;br&gt;x0 = ones(9,1)';
&lt;br&gt;xdot0 =zeros(9,1)';
&lt;br&gt;t = linspace(0,50,50);
&lt;br&gt;dassl(&amp;quot;f&amp;quot;,x0,xdot0,t)
&lt;br&gt;&lt;br&gt;*****output******
&lt;br&gt;&lt;br&gt;&amp;nbsp;***MESSAGE FROM ROUTINE DDASSL IN LIBRARY SLATEC.
&lt;br&gt;&amp;nbsp;***POTENTIALLY RECOVERABLE ERROR, PROG ABORTED, TRACEBACK REQUESTED
&lt;br&gt;&amp;nbsp;* &amp;nbsp;AT T = &amp;nbsp; &amp;nbsp;0.000000E+00 &amp;nbsp;AND STEPSIZE H = &amp;nbsp; &amp;nbsp;1.594388E-05 &amp;nbsp;THE ITERATION
&lt;br&gt;&amp;nbsp;* &amp;nbsp;MATRIX IS SINGULAR
&lt;br&gt;&amp;nbsp;* &amp;nbsp;ERROR NUMBER = -8
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;***END OF MESSAGE
&lt;br&gt;&lt;br&gt;&amp;nbsp;***JOB ABORT DUE TO UNRECOVERED ERROR.
&lt;br&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR MESSAGE SUMMARY
&lt;br&gt;&amp;nbsp;LIBRARY &amp;nbsp; &amp;nbsp;SUBROUTINE MESSAGE START &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NERR &amp;nbsp; &amp;nbsp; LEVEL &amp;nbsp; &amp;nbsp; COUNT
&lt;br&gt;&amp;nbsp;SLATEC &amp;nbsp; &amp;nbsp; DDASSL &amp;nbsp; &amp;nbsp; AT T = &amp;nbsp; &amp;nbsp;0.000000E+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&lt;br&gt;error: exception encountered in Fortran subroutine ddassl_
&lt;br&gt;error: caught execution error in library function
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Help-need-for-Differential-algebraic-equations-tp19888756p19926424.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19928622</id>
	<title>Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-10T13:50:24Z</published>
	<updated>2008-10-10T13:50:24Z</updated>
	<author>
		<name>John W. Eaton</name>
	</author>
	<content type="html">On 10-Oct-2008, Marco2008 wrote:
&lt;br&gt;&lt;br&gt;| 
&lt;br&gt;| 
&lt;br&gt;| John W. Eaton wrote:
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; I don't know how to call this function from C/C++.
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; If you had a similar function in C++, for example something like
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; &amp;nbsp; void foo (double **v, int *len)
&lt;br&gt;| &amp;gt; &amp;nbsp; {
&lt;br&gt;| &amp;gt; &amp;nbsp; &amp;nbsp; len = 10; // or some computed value
&lt;br&gt;| &amp;gt; &amp;nbsp; &amp;nbsp; *v = new double [len];
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; &amp;nbsp; &amp;nbsp; // fill V here ...
&lt;br&gt;| &amp;gt; &amp;nbsp; }
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; then you could call it from an Octave DEFUN like this:
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; &amp;nbsp; double *v;
&lt;br&gt;| &amp;gt; &amp;nbsp; int len;
&lt;br&gt;| &amp;gt; &amp;nbsp; foo (&amp;v, &amp;len);
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; and then copy the values from V to an appropriately sized Matrix
&lt;br&gt;| &amp;gt; object:
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; &amp;nbsp; Matrix m (len, 1);
&lt;br&gt;| &amp;gt; &amp;nbsp; double *pm = m.fortran_vec ();
&lt;br&gt;| &amp;gt; &amp;nbsp; for (int i = 0; i &amp;lt; len; i++)
&lt;br&gt;| &amp;gt; &amp;nbsp; &amp;nbsp; m[i] = v[i];
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; then you would probably also want to free the memory allocated in FOO
&lt;br&gt;| &amp;gt; to avoid a memory leak:
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; &amp;nbsp; delete [] v;
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; Is an allocatable array in Fortran some kind of object that carries
&lt;br&gt;| &amp;gt; with it the size? &amp;nbsp;If so, then I think you need to know precisely what
&lt;br&gt;| &amp;gt; your compiler does so that you can call a function like this from C++
&lt;br&gt;| &amp;gt; (probably the details are implementation defined, so will not be
&lt;br&gt;| &amp;gt; portable). &amp;nbsp;Or is it guaranteed to just be a pointer to some data? &amp;nbsp;If
&lt;br&gt;| &amp;gt; it is just a pointer, then I think you will need to modify your
&lt;br&gt;| &amp;gt; function so that it also returns the size. &amp;nbsp;Otherwise, how can a C++
&lt;br&gt;| &amp;gt; function that calls your Fortran function know how large the allocated
&lt;br&gt;| &amp;gt; array is?
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; jwe
&lt;br&gt;| &amp;gt; _______________________________________________
&lt;br&gt;| &amp;gt; Help-octave mailing list
&lt;br&gt;| &amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19928622&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;| &amp;gt; &lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;| &amp;gt; 
&lt;br&gt;| 
&lt;br&gt;| Hello!
&lt;br&gt;| Thanks for this idea.
&lt;br&gt;| I tried a bit with this approach. It brought me to the following code:
&lt;br&gt;| 
&lt;br&gt;| subroutine funfortrantwo(size1, vector1)
&lt;br&gt;| 	implicit none
&lt;br&gt;| 	integer :: size1
&lt;br&gt;| 	real(8) :: vector1(size1)
&lt;br&gt;| 	vector1 = 2
&lt;br&gt;| 	! write(6,*) vector1
&lt;br&gt;| end subroutine funfortrantwo
&lt;br&gt;| 
&lt;br&gt;| #include &amp;lt;octave/oct.h&amp;gt;
&lt;br&gt;| #include &amp;lt;iostream&amp;gt;
&lt;br&gt;| #include &amp;quot;f77-fcn.h&amp;quot;
&lt;br&gt;| extern &amp;quot;C&amp;quot;
&lt;br&gt;| {
&lt;br&gt;| 	F77_RET_T
&lt;br&gt;| 	F77_FUNC (funfortrantwo, FUNFORTRANTWO) (int&amp; n1, double* m1);
&lt;br&gt;| }
&lt;br&gt;| DEFUN_DLD (fun_cpp2, args, ,&amp;quot;...&amp;quot;)
&lt;br&gt;| {
&lt;br&gt;| &amp;nbsp; &amp;nbsp; octave_value_list retval;
&lt;br&gt;| 	double* m1; &amp;nbsp;
&lt;br&gt;| 	int n1 = 7;
&lt;br&gt;| 	F77_XFCN (funfortrantwo, FUNFORTRANTWO,
&lt;br&gt;| 			( n1, m1 ) );
&lt;br&gt;| 	if (f77_exception_encountered)
&lt;br&gt;| 	{
&lt;br&gt;| 		error (&amp;quot;Error!&amp;quot;);
&lt;br&gt;| 		return retval;
&lt;br&gt;| 	}
&lt;br&gt;| 	int i1 = n1;
&lt;br&gt;| 	Matrix M1 (i1,1);
&lt;br&gt;| 	for (int i = 0; i &amp;lt; i1; i++)
&lt;br&gt;| 	{
&lt;br&gt;| 		double h1 = m1[i];
&lt;br&gt;| 		M1.fill(h1,i,0,i,0);
&lt;br&gt;| 	}
&lt;br&gt;| 	retval(0) = M1;
&lt;br&gt;| 	return retval;
&lt;br&gt;| }
&lt;br&gt;| 
&lt;br&gt;| it can be compiled by mkoctfile. But inside octave I get:
&lt;br&gt;| 
&lt;br&gt;| panic: Segmentation fault -- stopping myself...
&lt;br&gt;| attempting to save variables to `octave-core'...
&lt;br&gt;| save to `octave-core' complete
&lt;br&gt;| Segmentation fault
&lt;br&gt;| 
&lt;br&gt;| If I replace int &amp;nbsp;
&lt;br&gt;| &amp;nbsp; &amp;nbsp; int i1 = n1;
&lt;br&gt;| by 
&lt;br&gt;| &amp;nbsp; &amp;nbsp;int i1 = 7;
&lt;br&gt;| it works correctly for one time. The second time fails with the above
&lt;br&gt;| mentioned panic. Maybe the &amp;nbsp;memory management in my c++-file is not correct.
&lt;br&gt;&lt;br&gt;| 	double* m1; &amp;nbsp;
&lt;br&gt;| 	int n1 = 7;
&lt;br&gt;| 	F77_XFCN (funfortrantwo, FUNFORTRANTWO,
&lt;br&gt;| 			( n1, m1 ) );
&lt;br&gt;&lt;br&gt;No storage is allocated for m1. &amp;nbsp;You have only declared a pointer.
&lt;br&gt;Octave crashes because the call to your Fortran function scribbles
&lt;br&gt;over some memory.
&lt;br&gt;&lt;br&gt;Try
&lt;br&gt;&lt;br&gt;&amp;nbsp; int n1 = 7;
&lt;br&gt;&amp;nbsp; Matrix mm1 (n1, 1);
&lt;br&gt;&amp;nbsp; double *m1 = mm1.fortran_vec ();
&lt;br&gt;&amp;nbsp; F77_XFCN (funfortrantwo, FUNFORTRANTWO, (n1, m1));
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19928622&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19928622.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19925697</id>
	<title>Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-10T13:37:25Z</published>
	<updated>2008-10-10T13:37:25Z</updated>
	<author>
		<name>Marco2008</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;John W. Eaton wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I don't know how to call this function from C/C++.
&lt;br&gt;&lt;br&gt;If you had a similar function in C++, for example something like
&lt;br&gt;&lt;br&gt;&amp;nbsp; void foo (double **v, int *len)
&lt;br&gt;&amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; len = 10; // or some computed value
&lt;br&gt;&amp;nbsp; &amp;nbsp; *v = new double [len];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; // fill V here ...
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;then you could call it from an Octave DEFUN like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; double *v;
&lt;br&gt;&amp;nbsp; int len;
&lt;br&gt;&amp;nbsp; foo (&amp;v, &amp;len);
&lt;br&gt;&lt;br&gt;and then copy the values from V to an appropriately sized Matrix
&lt;br&gt;object:
&lt;br&gt;&lt;br&gt;&amp;nbsp; Matrix m (len, 1);
&lt;br&gt;&amp;nbsp; double *pm = m.fortran_vec ();
&lt;br&gt;&amp;nbsp; for (int i = 0; i &amp;lt; len; i++)
&lt;br&gt;&amp;nbsp; &amp;nbsp; m[i] = v[i];
&lt;br&gt;&lt;br&gt;then you would probably also want to free the memory allocated in FOO
&lt;br&gt;to avoid a memory leak:
&lt;br&gt;&lt;br&gt;&amp;nbsp; delete [] v;
&lt;br&gt;&lt;br&gt;Is an allocatable array in Fortran some kind of object that carries
&lt;br&gt;with it the size? &amp;nbsp;If so, then I think you need to know precisely what
&lt;br&gt;your compiler does so that you can call a function like this from C++
&lt;br&gt;(probably the details are implementation defined, so will not be
&lt;br&gt;portable). &amp;nbsp;Or is it guaranteed to just be a pointer to some data? &amp;nbsp;If
&lt;br&gt;it is just a pointer, then I think you will need to modify your
&lt;br&gt;function so that it also returns the size. &amp;nbsp;Otherwise, how can a C++
&lt;br&gt;function that calls your Fortran function know how large the allocated
&lt;br&gt;array is?
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;Help-octave@cae.wisc.edu
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Hello!
&lt;br&gt;Thanks for this idea.
&lt;br&gt;I tried a bit with this approach. It brought me to the following code:
&lt;br&gt;&lt;br&gt;subroutine funfortrantwo(size1, vector1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; implicit none
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; integer :: size1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; real(8) :: vector1(size1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector1 = 2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! write(6,*) vector1
&lt;br&gt;end subroutine funfortrantwo
&lt;br&gt;&lt;br&gt;#include &amp;lt;octave/oct.h&amp;gt;
&lt;br&gt;#include &amp;lt;iostream&amp;gt;
&lt;br&gt;#include &amp;quot;f77-fcn.h&amp;quot;
&lt;br&gt;extern &amp;quot;C&amp;quot;
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F77_RET_T
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F77_FUNC (funfortrantwo, FUNFORTRANTWO) (int&amp; n1, double* m1);
&lt;br&gt;}
&lt;br&gt;DEFUN_DLD (fun_cpp2, args, ,&amp;quot;...&amp;quot;)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; octave_value_list retval;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double* m1; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int n1 = 7;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F77_XFCN (funfortrantwo, FUNFORTRANTWO,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( n1, m1 ) );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (f77_exception_encountered)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error (&amp;quot;Error!&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return retval;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i1 = n1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Matrix M1 (i1,1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; i1; i++)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double h1 = m1[i];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; M1.fill(h1,i,0,i,0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retval(0) = M1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return retval;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;it can be compiled by mkoctfile. But inside octave I get:
&lt;br&gt;&lt;br&gt;panic: Segmentation fault -- stopping myself...
&lt;br&gt;attempting to save variables to `octave-core'...
&lt;br&gt;save to `octave-core' complete
&lt;br&gt;Segmentation fault
&lt;br&gt;&lt;br&gt;If I replace int &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; int i1 = n1;
&lt;br&gt;by 
&lt;br&gt;&amp;nbsp; &amp;nbsp;int i1 = 7;
&lt;br&gt;it works correctly for one time. The second time fails with the above mentioned panic. Maybe the &amp;nbsp;memory management in my c++-file is not correct.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19925697.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19923940</id>
	<title>enum in octave?</title>
	<published>2008-10-10T11:49:02Z</published>
	<updated>2008-10-10T11:49:02Z</updated>
	<author>
		<name>Jim H</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I think the question I want to ask is &amp;quot;does Octave have the concept of enum as in C?&amp;quot;
&lt;br&gt;&lt;br&gt;My application: &amp;nbsp;I would like to pass a set of arguments to a function in an array (p[ ]), but I want to refer to the elements of the array by mnemonic names like:
&lt;br&gt;&lt;br&gt;y[BOB] = p[R]*y[BOB]*(1 - y[BOB]/p[K]);
&lt;br&gt;&lt;br&gt;in C this could be done with #define R 0 &amp;nbsp;#define K 1, etc. or by an enum structure.
&lt;br&gt;&lt;br&gt;Possible in octave?
&lt;br&gt;&lt;br&gt;Jim </content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/enum-in-octave--tp19923940p19923940.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19921088</id>
	<title>Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-10T08:58:45Z</published>
	<updated>2008-10-10T08:58:45Z</updated>
	<author>
		<name>Marco2008</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Jaroslav Hajek-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;in terms of Fortran 2003/Interoperability with C, allocatable arrays
&lt;br&gt;are not interoperable. These arrays are always passed by array
&lt;br&gt;descriptor (allocating descriptor and passing its address), but how
&lt;br&gt;exactly the descriptor looks is completely compiler-dependent. Also,
&lt;br&gt;note that it is Fortran runtime library that allocates the array, but
&lt;br&gt;presumably C++ runtime library should deallocate it, which is almost
&lt;br&gt;bound to cause trouble.
&lt;br&gt;The easiest portable way to achieve what you need is to first make a
&lt;br&gt;special &amp;quot;query&amp;quot; call to the Fortran subroutine that will only return
&lt;br&gt;the array size, allocate it in C++, and then invoke a normal call.
&lt;br&gt;This is, for instance, how LAPACK works.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Thanks a lot for this post. I will try to implement my algorithms in the way you described. Maybe there is one drawback. If the &amp;quot;query&amp;quot; call computes some results for further computations they are lost with the end of the &amp;quot;query&amp;quot; call and have to be recomputed in the second call. This can decrease the performance of the algorithm. 
&lt;br&gt;By the way, what is a specific example for the use of LAPACK with this approach?
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Marco
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19921088.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19921110</id>
	<title>Release 3.0.3 of Octave</title>
	<published>2008-10-10T08:39:57Z</published>
	<updated>2008-10-10T08:39:57Z</updated>
	<author>
		<name>John W. Eaton</name>
	</author>
	<content type="html">On 10-Oct-2008, José Luis García Pallero wrote:
&lt;br&gt;&lt;br&gt;| What is the reason that release 3.0.3 are not in GNU site of Octave.
&lt;br&gt;&lt;br&gt;Because I haven't had time to put it on the ftp server.
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19921110&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Release-3.0.3-of-Octave-tp19919609p19921110.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19919609</id>
	<title>Release 3.0.3 of Octave</title>
	<published>2008-10-10T07:23:08Z</published>
	<updated>2008-10-10T07:23:08Z</updated>
	<author>
		<name>José Luis García Pallero</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;Hi,&lt;br&gt;What is the reason that release 3.0.3 are not in GNU site of Octave. Jaroslav Hayek announced last 3th October that this release was out. Is there any problem or bug?&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;*****************************************&lt;br&gt;
José Luis García Pallero&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19919609&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jgpallero@...&lt;/a&gt;&lt;br&gt;(o&amp;lt;&lt;br&gt;/ / \&lt;br&gt;V_/_&lt;br&gt;Use Debian GNU/Linux and enjoy!&lt;br&gt;*****************************************&lt;br&gt;
&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19919609&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Release-3.0.3-of-Octave-tp19919609p19919609.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19910107</id>
	<title>error on arrayfun function</title>
	<published>2008-10-09T17:51:31Z</published>
	<updated>2008-10-09T17:51:31Z</updated>
	<author>
		<name>joe_001</name>
	</author>
	<content type="html">When using arrayfun function I receive the following error message -
&lt;br&gt;&lt;br&gt;error: octave_base_value::cell_value(): wrong type argument 'bool'
&lt;br&gt;error: cellfun: Dimension mismatch
&lt;br&gt;&lt;br&gt;Actual code is below, how can I fix code to avoid this message?
&lt;br&gt;&lt;br&gt;&lt;br&gt;function case_generation4()
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;% Data
&lt;br&gt;A=[1 1 4;
&lt;br&gt;&amp;nbsp; &amp;nbsp;2 2 4;
&lt;br&gt;&amp;nbsp; &amp;nbsp;4 0.5 6];
&lt;br&gt;&lt;br&gt;% Engine
&lt;br&gt;n=size(A,1)
&lt;br&gt;Aspan = arrayfun(@(k) A(k,1):A(k,2):A(k,3), 1:n,'UniformOutput', false)
&lt;br&gt;[Aspan(:)]=ndgrid(Aspan(:));
&lt;br&gt;C=reshape(cat(n+1,Aspan(:)),[],n)
&lt;br&gt;endfunction</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/error-on-arrayfun-function-tp19910107p19910107.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19904192</id>
	<title>Re: Help need for Differential algebraic equations</title>
	<published>2008-10-09T10:52:38Z</published>
	<updated>2008-10-09T10:52:38Z</updated>
	<author>
		<name>Carlo de Falco-2</name>
	</author>
	<content type="html">&lt;br&gt;On 09/ott/08, at 18:09, genehacker wrote:
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; **********code ********
&lt;br&gt;&amp;gt; function res = f(x,xdot,t);
&lt;br&gt;&amp;gt; res = zeros(3,1);
&lt;br&gt;&amp;gt; k12=0.1;
&lt;br&gt;&amp;gt; k23=0.7;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; xdot(1) = -k12*x(1);
&lt;br&gt;&amp;gt; xdot(2) = k12*x(1) - k23*x(2);
&lt;br&gt;&amp;gt; xdot(3) = k23*x(2);
&lt;br&gt;&lt;br&gt;&amp;gt; endfunction;
&lt;br&gt;&lt;br&gt;as it stands this function does not make much sense:
&lt;br&gt;whatever its input is it will always return [0 0 0].'
&lt;br&gt;&lt;br&gt;to check, try for example running the following command multiple times:
&lt;br&gt;f (rand(3,1), rand(3,1), rand(1))
&lt;br&gt;&lt;br&gt;as xdot is not an output of the function, whatever value
&lt;br&gt;you assign to it will be lost when the function returns.
&lt;br&gt;&lt;br&gt;I suggest you read the manual chapter on defining functions:
&lt;br&gt;&lt;a href=&quot;http://www.gnu.org/software/octave/doc/interpreter/Functions-and-Scripts.html#Functions-and-Scripts&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/software/octave/doc/interpreter/Functions-and-Scripts.html#Functions-and-Scripts&lt;/a&gt;&lt;br&gt;to understand how input and output parameters are handled
&lt;br&gt;&lt;br&gt;&amp;gt; x0 = [100,0,0];
&lt;br&gt;&amp;gt; xdot0 =[-10,10,10];
&lt;br&gt;&amp;gt; t = linspace(0,50,50);
&lt;br&gt;&amp;gt; [x,xdot] = dassl(&amp;quot;f&amp;quot;,x0,xdot0,t);
&lt;br&gt;&lt;br&gt;&lt;br&gt;the first sentence in the documentation of dassl reads:
&lt;br&gt;&lt;br&gt;&amp;quot;-- Loadable Function: [X, XDOT, ISTATE, MSG] = dassl (FCN, X_0, &amp;nbsp;
&lt;br&gt;XDOT_0, T, T_CRIT)
&lt;br&gt;Solve the set of differential-algebraic equations
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 = f (x, xdot, t)&amp;quot;
&lt;br&gt;&lt;br&gt;so, put in mathematical terms, the problem you are trying to solve &amp;nbsp;
&lt;br&gt;with this statement reads:
&lt;br&gt;&lt;br&gt;find x(t) such that f(x,x',t) = 0 for 0&amp;lt;= t &amp;lt;= 50
&lt;br&gt;&lt;br&gt;as with your definition &amp;nbsp;f(x,x',t) = 0 is verified for any value of x, &amp;nbsp;
&lt;br&gt;x' and t,
&lt;br&gt;the problem is not well posed as ANY function x(t) is a solution.
&lt;br&gt;&lt;br&gt;c.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19904192&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Help-need-for-Differential-algebraic-equations-tp19888756p19904192.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19904088</id>
	<title>Re: Help need for Differential algebraic equations</title>
	<published>2008-10-09T10:47:55Z</published>
	<updated>2008-10-09T10:47:55Z</updated>
	<author>
		<name>John W. Eaton</name>
	</author>
	<content type="html">On &amp;nbsp;9-Oct-2008, genehacker wrote:
&lt;br&gt;&lt;br&gt;| 
&lt;br&gt;| Thanks for the reply Olaf. I defnitely changed the function return variable,
&lt;br&gt;| that should be different from xdot. But i still have a problem of running a
&lt;br&gt;| simple differential algebraic equation. I am getting the same answer, if i
&lt;br&gt;| tried a much simpler set of equations(even though I didnot use an algebraic
&lt;br&gt;| equation here, I intend to use it later on). [ Also, you asked why I am
&lt;br&gt;| doing x(2) = f*x(6), thats is the type of algebraic equation i intend to
&lt;br&gt;| use]. Is there something inherently wrong with my code? I couldnot get much
&lt;br&gt;| help about this online.
&lt;br&gt;| 
&lt;br&gt;| **********code ********
&lt;br&gt;| function res = f(x,xdot,t);
&lt;br&gt;| res = zeros(3,1);
&lt;br&gt;| k12=0.1;
&lt;br&gt;| k23=0.7;
&lt;br&gt;| 
&lt;br&gt;| xdot(1) = -k12*x(1);
&lt;br&gt;| xdot(2) = k12*x(1) - k23*x(2);
&lt;br&gt;| xdot(3) = k23*x(2);
&lt;br&gt;| 
&lt;br&gt;| endfunction;
&lt;br&gt;&lt;br&gt;X nad XDOT are parameters to your function. &amp;nbsp;Changing them has no
&lt;br&gt;effect. &amp;nbsp;If you are solving a DAE with dassl, you should be defining a
&lt;br&gt;residual funtion F such that it computes RES as a function of X, XDOT,
&lt;br&gt;and T. &amp;nbsp;Your function above simply sets RES to zero.
&lt;br&gt;&lt;br&gt;If your function is as you show above, then it looks like an ODE, not
&lt;br&gt;a DAE.
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19904088&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Help-need-for-Differential-algebraic-equations-tp19888756p19904088.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19903261</id>
	<title>Re: Help need for Differential algebraic equations</title>
	<published>2008-10-09T10:09:21Z</published>
	<updated>2008-10-09T10:09:21Z</updated>
	<author>
		<name>genehacker</name>
	</author>
	<content type="html">Thanks for the reply Olaf. I defnitely changed the function return variable, that should be different from xdot. But i still have a problem of running a simple differential algebraic equation. I am getting the same answer, if i tried a much simpler set of equations(even though I didnot use an algebraic equation here, I intend to use it later on). [ Also, you asked why I am doing x(2) = f*x(6), thats is the type of algebraic equation i intend to use]. Is there something inherently wrong with my code? I couldnot get much help about this online.
&lt;br&gt;&lt;br&gt;**********code ********
&lt;br&gt;function res = f(x,xdot,t);
&lt;br&gt;res = zeros(3,1);
&lt;br&gt;k12=0.1;
&lt;br&gt;k23=0.7;
&lt;br&gt;&lt;br&gt;xdot(1) = -k12*x(1);
&lt;br&gt;xdot(2) = k12*x(1) - k23*x(2);
&lt;br&gt;xdot(3) = k23*x(2);
&lt;br&gt;&lt;br&gt;&lt;b&gt;endfunction&lt;/b&gt;;
&lt;br&gt;&lt;br&gt;x0 = [100,0,0];
&lt;br&gt;xdot0 =[-10,10,10];
&lt;br&gt;t = linspace(0,50,50);
&lt;br&gt;[x,xdot] = dassl(&amp;quot;f&amp;quot;,x0,xdot0,t);
&lt;br&gt;&lt;br&gt;*********OUTPUT**********
&lt;br&gt;&lt;br&gt;&amp;nbsp;***MESSAGE FROM ROUTINE DDASSL IN LIBRARY SLATEC.
&lt;br&gt;&amp;nbsp;***POTENTIALLY RECOVERABLE ERROR, PROG ABORTED, TRACEBACK REQUESTED
&lt;br&gt;&amp;nbsp;* &amp;nbsp;AT T = &amp;nbsp; &amp;nbsp;0.000000E+00 &amp;nbsp;AND STEPSIZE H = &amp;nbsp; &amp;nbsp;1.425756E-11 &amp;nbsp;THE ITERATION
&lt;br&gt;&amp;nbsp;* &amp;nbsp;MATRIX IS SINGULAR
&lt;br&gt;&amp;nbsp;* &amp;nbsp;ERROR NUMBER = -8
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;***END OF MESSAGE
&lt;br&gt;&lt;br&gt;&amp;nbsp;***JOB ABORT DUE TO UNRECOVERED ERROR.
&lt;br&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR MESSAGE SUMMARY
&lt;br&gt;&amp;nbsp;LIBRARY &amp;nbsp; &amp;nbsp;SUBROUTINE MESSAGE START &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NERR &amp;nbsp; &amp;nbsp; LEVEL &amp;nbsp; &amp;nbsp; COUNT
&lt;br&gt;&amp;nbsp;SLATEC &amp;nbsp; &amp;nbsp; DDASSL &amp;nbsp; &amp;nbsp; AT T = &amp;nbsp; &amp;nbsp;0.000000E+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&lt;br&gt;error: exception encountered in Fortran subroutine ddassl_
&lt;br&gt;error: caught execution error in library function
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Help-need-for-Differential-algebraic-equations-tp19888756p19903261.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19893874</id>
	<title>Re: Help need for Differential algebraic equations</title>
	<published>2008-10-09T00:16:55Z</published>
	<updated>2008-10-09T00:16:55Z</updated>
	<author>
		<name>Olaf Till</name>
	</author>
	<content type="html">On Wed, Oct 08, 2008 at 03:22:11PM -0700, genehacker wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I came across this function 'dassl', which is supposed to solve differential
&lt;br&gt;&amp;gt; algebraic equations, but have problems using it. This is how i use it
&lt;br&gt;&amp;gt; currently and below is the error message. I have no idea what it is.
&lt;br&gt;&lt;br&gt;At least from 'T = &amp;nbsp; &amp;nbsp;0.000000E+00' you see that dassl did not get
&lt;br&gt;away from time zero. I do not know algorithms for DAEs, but probably
&lt;br&gt;the solver will build a gradient matrix by calling your function 'f'
&lt;br&gt;with different values of 'x' and 'xdot' and makes some 'iteration
&lt;br&gt;matrix' from it. The error 'THE ITERATION MATRIX IS SINGULAR' is not
&lt;br&gt;surprizing, since your function 'f' seems to be wrong (see below), so
&lt;br&gt;that the returned value does not depend on the argument 'xdot' at all.
&lt;br&gt;&lt;br&gt;&amp;gt; ******code*****
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; function xdot = f(x,xdot,t);
&lt;br&gt;The return value has the same name as the argument 'xdot'. You should
&lt;br&gt;give it a different name. You should assign to it the value of the
&lt;br&gt;right side of your DAE, which gets zero for a solution.
&lt;br&gt;&lt;br&gt;&amp;gt; %define all parameter values viz. k12, k23,f86 etc here
&lt;br&gt;&amp;gt; xdot = zeros(9,1);
&lt;br&gt;With the line above you have lost the values in the argument
&lt;br&gt;'xdot'. Also, you do not use this argument below --- seems you actually
&lt;br&gt;need a solver for algebraic equations (like 'fsolve'), not
&lt;br&gt;differential(-algebraic) equations. Or you actually mean to solve an
&lt;br&gt;ODE (use 'lsode' than). Anyway, something is wrong with your code ...
&lt;br&gt;&lt;br&gt;&amp;gt; xdot(2) = k12*x(1) - k23*x(2);
&lt;br&gt;&amp;gt; xdot(3) = k23*x(2);
&lt;br&gt;&amp;gt; xdot(5) = k45*x(4) - k56*x(5);
&lt;br&gt;&amp;gt; xdot(6) = k56*x(5) - k67*x(6);
&lt;br&gt;&amp;gt; xdot(7) = k67*x(6);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; x(8) = f86*x(6);
&lt;br&gt;&amp;gt; x(9) = f29*x(2);
&lt;br&gt;Why are you assigning to 'x' above?
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; endfunction;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; x0 = ones(9,1)';
&lt;br&gt;&amp;gt; xdot0 =zeros(9,1)';
&lt;br&gt;&amp;gt; t = linspace(0,50,50);
&lt;br&gt;&amp;gt; dassl(&amp;quot;f&amp;quot;,x0,xdot0,t)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; *****output******
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;***MESSAGE FROM ROUTINE DDASSL IN LIBRARY SLATEC.
&lt;br&gt;&amp;gt; &amp;nbsp;***POTENTIALLY RECOVERABLE ERROR, PROG ABORTED, TRACEBACK REQUESTED
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp;AT T = &amp;nbsp; &amp;nbsp;0.000000E+00 &amp;nbsp;AND STEPSIZE H = &amp;nbsp; &amp;nbsp;1.594388E-05 &amp;nbsp;THE ITERATION
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp;MATRIX IS SINGULAR
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp;ERROR NUMBER = -8
&lt;br&gt;&amp;gt; &amp;nbsp;*
&lt;br&gt;&amp;gt; &amp;nbsp;***END OF MESSAGE
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;***JOB ABORT DUE TO UNRECOVERED ERROR.
&lt;br&gt;&amp;gt; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR MESSAGE SUMMARY
&lt;br&gt;&amp;gt; &amp;nbsp;LIBRARY &amp;nbsp; &amp;nbsp;SUBROUTINE MESSAGE START &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NERR &amp;nbsp; &amp;nbsp; LEVEL &amp;nbsp; &amp;nbsp; COUNT
&lt;br&gt;&amp;gt; &amp;nbsp;SLATEC &amp;nbsp; &amp;nbsp; DDASSL &amp;nbsp; &amp;nbsp; AT T = &amp;nbsp; &amp;nbsp;0.000000E+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; error: exception encountered in Fortran subroutine ddassl_
&lt;br&gt;&amp;gt; error: caught execution error in library function
&lt;/div&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19893874&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Help-need-for-Differential-algebraic-equations-tp19888756p19893874.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19892593</id>
	<title>Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-08T22:16:26Z</published>
	<updated>2008-10-08T22:16:26Z</updated>
	<author>
		<name>Jaroslav Hajek-2</name>
	</author>
	<content type="html">On Wed, Oct 8, 2008 at 11:01 PM, Marco2008 &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19892593&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mbk_forum@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; John W. Eaton wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I think we need to know more details about precisely how your function
&lt;br&gt;&amp;gt;&amp;gt; does what you claim it does. &amp;nbsp;Perhaps you could post a simple example
&lt;br&gt;&amp;gt;&amp;gt; that has all the relevant features (i.e., some Fortran function that
&lt;br&gt;&amp;gt;&amp;gt; allocates a matrix and returns it as a parameter). &amp;nbsp;Exactly how does
&lt;br&gt;&amp;gt;&amp;gt; your Fortran function allocate the data? &amp;nbsp;How would you call your
&lt;br&gt;&amp;gt;&amp;gt; fucntion in a program written purely in Fortran?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; jwe
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So here is the example that works:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; c++-wrapper (fun_cpp.cc):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; #include &amp;lt;octave/oct.h&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; #include &amp;quot;f77-fcn.h&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; extern &amp;quot;C&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;F77_RET_T
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;F77_FUNC (funfortran, FUNFORTRAN) (double* matrix1);
&lt;br&gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; DEFUN_DLD (fun_cpp, args, ,&amp;quot;...&amp;quot;)
&lt;br&gt;&amp;gt; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; octave_value_list retval;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Matrix M1 = Matrix(2,2);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;F77_XFCN (funfortran, FUNFORTRAN,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( M1.fortran_vec() ) );
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (f77_exception_encountered)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;error (&amp;quot;Error!&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return retval;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;retval(0) = M1;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return retval;
&lt;br&gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Fortran-Subroutine (funfortran.f90):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; subroutine funfortran(matrix1)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;implicit none
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;real(8), intent(out) &amp;nbsp;:: &amp;nbsp;matrix1(2,2)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;matrix1(1,:) = (/1,2/)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;matrix1(2,:) = (/3,4/)
&lt;br&gt;&amp;gt; end subroutine funfortran
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Call in octave:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; octave:1&amp;gt; fun_cpp
&lt;br&gt;&amp;gt; ans =
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 1 &amp;nbsp; 2
&lt;br&gt;&amp;gt; &amp;nbsp; 3 &amp;nbsp; 4
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; octave:2&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; My problem is the following fortran code:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; subroutine funfortrantwo(vector1)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;implicit none
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;integer :: size1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;real(8), allocatable :: vector1(:)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size1 = 3
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! size1 here is defined by a fixed number only to make the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! example clear. Normally, it is computed inside this fortran
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! subroutine and not known before a call of funfortrantwo.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;allocate( vector1(size1) )
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;vector1 = 2
&lt;br&gt;&amp;gt; end subroutine funfortrantwo
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I do not know how to write the c++-wrapper for this subroutine. In the first
&lt;br&gt;&amp;gt; example the size of the matrix is known before the fortran subroutine is
&lt;br&gt;&amp;gt; called. But this is not the case in the second example.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Hi Marco,
&lt;br&gt;&lt;br&gt;in terms of Fortran 2003/Interoperability with C, allocatable arrays
&lt;br&gt;are not interoperable. These arrays are always passed by array
&lt;br&gt;descriptor (allocating descriptor and passing its address), but how
&lt;br&gt;exactly the descriptor looks is completely compiler-dependent. Also,
&lt;br&gt;note that it is Fortran runtime library that allocates the array, but
&lt;br&gt;presumably C++ runtime library should deallocate it, which is almost
&lt;br&gt;bound to cause trouble.
&lt;br&gt;The easiest portable way to achieve what you need is to first make a
&lt;br&gt;special &amp;quot;query&amp;quot; call to the Fortran subroutine that will only return
&lt;br&gt;the array size, allocate it in C++, and then invoke a normal call.
&lt;br&gt;This is, for instance, how LAPACK works.
&lt;br&gt;&lt;br&gt;regards
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;RNDr. Jaroslav Hajek
&lt;br&gt;computing expert
&lt;br&gt;Aeronautical Research and Test Institute (VZLU)
&lt;br&gt;Prague, Czech Republic
&lt;br&gt;url: www.highegg.matfyz.cz
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19892593&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19892593.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19888756</id>
	<title>Help need for Differential algebraic equations</title>
	<published>2008-10-08T15:22:10Z</published>
	<updated>2008-10-08T15:22:10Z</updated>
	<author>
		<name>genehacker</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; I am new to octave and i love it the best as an open source alternative to matlab. I used lsode to solve ordinary diff equations, but now I do also have some algebraic equations to solve along.
&lt;br&gt;&lt;br&gt;I came across this function 'dassl', which is supposed to solve differential algebraic equations, but have problems using it. This is how i use it currently and below is the error message. I have no idea what it is. Please help!
&lt;br&gt;&lt;br&gt;******code*****
&lt;br&gt;&lt;br&gt;function xdot = f(x,xdot,t);
&lt;br&gt;%define all parameter values viz. k12, k23,f86 etc here
&lt;br&gt;xdot = zeros(9,1);
&lt;br&gt;xdot(2) = k12*x(1) - k23*x(2);
&lt;br&gt;xdot(3) = k23*x(2);
&lt;br&gt;xdot(5) = k45*x(4) - k56*x(5);
&lt;br&gt;xdot(6) = k56*x(5) - k67*x(6);
&lt;br&gt;xdot(7) = k67*x(6);
&lt;br&gt;&lt;br&gt;x(8) = f86*x(6);
&lt;br&gt;x(9) = f29*x(2);
&lt;br&gt;&lt;b&gt;endfunction&lt;/b&gt;;
&lt;br&gt;&lt;br&gt;&lt;br&gt;x0 = ones(9,1)';
&lt;br&gt;xdot0 =zeros(9,1)';
&lt;br&gt;t = linspace(0,50,50);
&lt;br&gt;dassl(&amp;quot;f&amp;quot;,x0,xdot0,t)
&lt;br&gt;&lt;br&gt;*****output******
&lt;br&gt;&lt;br&gt;&amp;nbsp;***MESSAGE FROM ROUTINE DDASSL IN LIBRARY SLATEC.
&lt;br&gt;&amp;nbsp;***POTENTIALLY RECOVERABLE ERROR, PROG ABORTED, TRACEBACK REQUESTED
&lt;br&gt;&amp;nbsp;* &amp;nbsp;AT T = &amp;nbsp; &amp;nbsp;0.000000E+00 &amp;nbsp;AND STEPSIZE H = &amp;nbsp; &amp;nbsp;1.594388E-05 &amp;nbsp;THE ITERATION
&lt;br&gt;&amp;nbsp;* &amp;nbsp;MATRIX IS SINGULAR
&lt;br&gt;&amp;nbsp;* &amp;nbsp;ERROR NUMBER = -8
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;***END OF MESSAGE
&lt;br&gt;&lt;br&gt;&amp;nbsp;***JOB ABORT DUE TO UNRECOVERED ERROR.
&lt;br&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ERROR MESSAGE SUMMARY
&lt;br&gt;&amp;nbsp;LIBRARY &amp;nbsp; &amp;nbsp;SUBROUTINE MESSAGE START &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NERR &amp;nbsp; &amp;nbsp; LEVEL &amp;nbsp; &amp;nbsp; COUNT
&lt;br&gt;&amp;nbsp;SLATEC &amp;nbsp; &amp;nbsp; DDASSL &amp;nbsp; &amp;nbsp; AT T = &amp;nbsp; &amp;nbsp;0.000000E+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&lt;br&gt;error: exception encountered in Fortran subroutine ddassl_
&lt;br&gt;error: caught execution error in library function</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Help-need-for-Differential-algebraic-equations-tp19888756p19888756.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19888091</id>
	<title>Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-08T14:28:45Z</published>
	<updated>2008-10-08T14:28:45Z</updated>
	<author>
		<name>John W. Eaton</name>
	</author>
	<content type="html">On &amp;nbsp;8-Oct-2008, Marco2008 wrote:
&lt;br&gt;&lt;br&gt;| My problem is the following fortran code:
&lt;br&gt;| 
&lt;br&gt;| subroutine funfortrantwo(vector1)
&lt;br&gt;| 	implicit none
&lt;br&gt;| 	integer :: size1
&lt;br&gt;| 	real(8), allocatable :: vector1(:)
&lt;br&gt;| 	size1 = 3	
&lt;br&gt;| 	! size1 here is defined by a fixed number only to make the 
&lt;br&gt;| 	! example clear. Normally, it is computed inside this fortran
&lt;br&gt;| 	! subroutine and not known before a call of funfortrantwo.
&lt;br&gt;| 	allocate( vector1(size1) )
&lt;br&gt;| 	vector1 = 2
&lt;br&gt;| end subroutine funfortrantwo
&lt;br&gt;| 
&lt;br&gt;| I do not know how to write the c++-wrapper for this subroutine. In the first
&lt;br&gt;| example the size of the matrix is known before the fortran subroutine is
&lt;br&gt;| called. But this is not the case in the second example.
&lt;br&gt;&lt;br&gt;I don't know how to call this function from C/C++.
&lt;br&gt;&lt;br&gt;If you had a similar function in C++, for example something like
&lt;br&gt;&lt;br&gt;&amp;nbsp; void foo (double **v, int *len)
&lt;br&gt;&amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; len = 10; // or some computed value
&lt;br&gt;&amp;nbsp; &amp;nbsp; *v = new double [len];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; // fill V here ...
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;then you could call it from an Octave DEFUN like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; double *v;
&lt;br&gt;&amp;nbsp; int len;
&lt;br&gt;&amp;nbsp; foo (&amp;v, &amp;len);
&lt;br&gt;&lt;br&gt;and then copy the values from V to an appropriately sized Matrix
&lt;br&gt;object:
&lt;br&gt;&lt;br&gt;&amp;nbsp; Matrix m (len, 1);
&lt;br&gt;&amp;nbsp; double *pm = m.fortran_vec ();
&lt;br&gt;&amp;nbsp; for (int i = 0; i &amp;lt; len; i++)
&lt;br&gt;&amp;nbsp; &amp;nbsp; m[i] = v[i];
&lt;br&gt;&lt;br&gt;then you would probably also want to free the memory allocated in FOO
&lt;br&gt;to avoid a memory leak:
&lt;br&gt;&lt;br&gt;&amp;nbsp; delete [] v;
&lt;br&gt;&lt;br&gt;Is an allocatable array in Fortran some kind of object that carries
&lt;br&gt;with it the size? &amp;nbsp;If so, then I think you need to know precisely what
&lt;br&gt;your compiler does so that you can call a function like this from C++
&lt;br&gt;(probably the details are implementation defined, so will not be
&lt;br&gt;portable). &amp;nbsp;Or is it guaranteed to just be a pointer to some data? &amp;nbsp;If
&lt;br&gt;it is just a pointer, then I think you will need to modify your
&lt;br&gt;function so that it also returns the size. &amp;nbsp;Otherwise, how can a C++
&lt;br&gt;function that calls your Fortran function know how large the allocated
&lt;br&gt;array is?
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19888091&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19888091.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19887509</id>
	<title>Re: Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-08T14:01:46Z</published>
	<updated>2008-10-08T14:01:46Z</updated>
	<author>
		<name>Marco2008</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;John W. Eaton wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;I think we need to know more details about precisely how your function
&lt;br&gt;does what you claim it does. &amp;nbsp;Perhaps you could post a simple example
&lt;br&gt;that has all the relevant features (i.e., some Fortran function that
&lt;br&gt;allocates a matrix and returns it as a parameter). &amp;nbsp;Exactly how does
&lt;br&gt;your Fortran function allocate the data? &amp;nbsp;How would you call your
&lt;br&gt;fucntion in a program written purely in Fortran?
&lt;br&gt;&lt;br&gt;jwe
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
So here is the example that works: 
&lt;br&gt;&lt;br&gt;c++-wrapper (fun_cpp.cc):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;#include &amp;lt;octave/oct.h&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;#include &amp;quot;f77-fcn.h&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp;extern &amp;quot;C&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;	F77_RET_T
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F77_FUNC (funfortran, FUNFORTRAN) (double* matrix1);
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp;DEFUN_DLD (fun_cpp, args, ,&amp;quot;...&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;octave_value_list retval;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Matrix M1 = Matrix(2,2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F77_XFCN (funfortran, FUNFORTRAN,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( M1.fortran_vec() ) );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (f77_exception_encountered)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error (&amp;quot;Error!&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return retval;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; retval(0) = M1;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return retval;
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;Fortran-Subroutine (funfortran.f90):
&lt;br&gt;&lt;br&gt;subroutine funfortran(matrix1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; implicit none
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; real(8), intent(out) &amp;nbsp;:: &amp;nbsp;matrix1(2,2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; matrix1(1,:) = (/1,2/)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; matrix1(2,:) = (/3,4/)
&lt;br&gt;end subroutine funfortran
&lt;br&gt;&lt;br&gt;Call in octave:
&lt;br&gt;&lt;br&gt;octave:1&amp;gt; fun_cpp
&lt;br&gt;ans =
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;1 &amp;nbsp; 2
&lt;br&gt;&amp;nbsp; &amp;nbsp;3 &amp;nbsp; 4
&lt;br&gt;&lt;br&gt;octave:2&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;My problem is the following fortran code:
&lt;br&gt;&lt;br&gt;subroutine funfortrantwo(vector1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; implicit none
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; integer :: size1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; real(8), allocatable :: vector1(:)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size1 = 3	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! size1 here is defined by a fixed number only to make the 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! example clear. Normally, it is computed inside this fortran
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! subroutine and not known before a call of funfortrantwo.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allocate( vector1(size1) )
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; vector1 = 2
&lt;br&gt;end subroutine funfortrantwo
&lt;br&gt;&lt;br&gt;I do not know how to write the c++-wrapper for this subroutine. In the first example the size of the matrix is known before the fortran subroutine is called. But this is not the case in the second example.
&lt;br&gt;&lt;br&gt;Marco</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19887509.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19884628</id>
	<title>Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-08T11:19:39Z</published>
	<updated>2008-10-08T11:19:39Z</updated>
	<author>
		<name>John W. Eaton</name>
	</author>
	<content type="html">On &amp;nbsp;8-Oct-2008, Marco2008 wrote:
&lt;br&gt;&lt;br&gt;| 
&lt;br&gt;| Hello!
&lt;br&gt;| 
&lt;br&gt;| I would like to use some fortran subroutines from within octave. With the
&lt;br&gt;| documentation from the octave-homepage it works fine with an example of the
&lt;br&gt;| form:
&lt;br&gt;| 
&lt;br&gt;| ... 
&lt;br&gt;| octave_value_list retval;
&lt;br&gt;| Matrix M1 = Matrix(4,3);
&lt;br&gt;| F77_XFCN (function, FUNCTION, ( M1.fortran_vec() ) );
&lt;br&gt;| retval(0) = M1;
&lt;br&gt;| ...
&lt;br&gt;| 
&lt;br&gt;| Here, I the size of the matrix M1 is fixed. But in some cases I do not know
&lt;br&gt;| before the call of the fortran subroutine what size the return value M1 has
&lt;br&gt;| because this size is computed inside the fortran subroutine. I tried
&lt;br&gt;| something like 
&lt;br&gt;| 
&lt;br&gt;| ...
&lt;br&gt;| octave_value_list retval;
&lt;br&gt;| Matrix M1;
&lt;br&gt;| F77_XFCN (function, FUNCTION, ( M1.fortran_vec() );
&lt;br&gt;| retval(0) = M1;
&lt;br&gt;| ...
&lt;br&gt;| 
&lt;br&gt;| but it does not work. Therefor, I would like to know if and possibly how
&lt;br&gt;| that can be realized. 
&lt;br&gt;| It should be possible by defining a very large matrix M1 in the c++-wrapper
&lt;br&gt;| and return additionally the actually needed size from the fortran subroutine
&lt;br&gt;| by an integer variable. The return value M1 then has to be resized. 
&lt;br&gt;| But I would like to avoid this solution, because you never know what &amp;quot;very
&lt;br&gt;| large&amp;quot; means.
&lt;br&gt;| 
&lt;br&gt;| If someone had an idea, I would be very glad.
&lt;br&gt;&lt;br&gt;I think we need to know more details about precisely how your function
&lt;br&gt;does what you claim it does. &amp;nbsp;Perhaps you could post a simple example
&lt;br&gt;that has all the relevant features (i.e., some Fortran function that
&lt;br&gt;allocates a matrix and returns it as a parameter). &amp;nbsp;Exactly how does
&lt;br&gt;your Fortran function allocate the data? &amp;nbsp;How would you call your
&lt;br&gt;fucntion in a program written purely in Fortran?
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19884628&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19884628.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19882419</id>
	<title>Re: making many plots quickly</title>
	<published>2008-10-08T09:01:45Z</published>
	<updated>2008-10-08T09:01:45Z</updated>
	<author>
		<name>Francesco Potorti`-2</name>
	</author>
	<content type="html">&lt;div class='shrinkable-quote'&gt;&amp;gt;| Using the movie.m function that I posted some time ago (and that you can
&lt;br&gt;&amp;gt;| find at &amp;lt;&lt;a href=&quot;http://fly.isti.cnr.it/pub/software/octave/movie.m&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fly.isti.cnr.it/pub/software/octave/movie.m&lt;/a&gt;&amp;gt;) I can make
&lt;br&gt;&amp;gt;| movies from a series of plots saved on disk as .png files.
&lt;br&gt;&amp;gt;| 
&lt;br&gt;&amp;gt;| The way it works is that I use for each frame
&lt;br&gt;&amp;gt;| &amp;nbsp; figure(&amp;quot;visible&amp;quot;,&amp;quot;off&amp;quot;)
&lt;br&gt;&amp;gt;| then I create the plot and save it as png with
&lt;br&gt;&amp;gt;| &amp;nbsp; drawnow(&amp;quot;png&amp;quot;,sprintf(&amp;quot;%6d.png&amp;quot;,fileno++))
&lt;br&gt;&amp;gt;| and at the end I call ffmpeg or whatever.
&lt;br&gt;&amp;gt;| 
&lt;br&gt;&amp;gt;| When making many plots (hundreds or thousands) I see that octave and
&lt;br&gt;&amp;gt;| gnuplot take each 50% of CPU usage. &amp;nbsp;Looking ad drawnow.m, the cause
&lt;br&gt;&amp;gt;| seems to be that when drawing a plot to a file the pipe to gnuplot is
&lt;br&gt;&amp;gt;| closed each time. &amp;nbsp;If I could keep the pipe open, I could exploit having
&lt;br&gt;&amp;gt;| a dual-core CPU to make things faster. &amp;nbsp;And probably I would also save
&lt;br&gt;&amp;gt;| the CPU power needed to create and close a process for each frame.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I don't understand why opening and closing the plot stream would limit
&lt;br&gt;&amp;gt;you to one CPU. &amp;nbsp;Is opening and closing the pipe really the bottleneck
&lt;br&gt;&amp;gt;in the process?
&lt;/div&gt;&lt;br&gt;I do not know. &amp;nbsp;I suspected that when closing the pipe meant that Octave
&lt;br&gt;was waiting on Gnuplot for something to answer, and so they could not
&lt;br&gt;work in parallel. &amp;nbsp;But it was just guessing, while trying to explain why
&lt;br&gt;they took about 50% CPU each, when I have 200% to spare. &amp;nbsp;Was I wrong?
&lt;br&gt;&lt;br&gt;&amp;gt;If you want to keep the plot stream open, how do you propose doing it?
&lt;br&gt;&amp;gt;Remember that there may be a plot on the screen, and that should not
&lt;br&gt;&amp;gt;go away when drawnow is called again to print a plot to a file. &amp;nbsp;So
&lt;br&gt;&amp;gt;would you keep two plot streams open for each figure? &amp;nbsp;Or would there
&lt;br&gt;&amp;gt;be a dedicated gnuplot process just for printing? &amp;nbsp;Also, one advantage
&lt;br&gt;&amp;gt;to restarting gnuplot for each figure that is printed is that you
&lt;br&gt;&amp;gt;don't have to worry about the state of the gnuplot process, and
&lt;br&gt;&amp;gt;whether there have been any errors that might cause trouble.
&lt;br&gt;&lt;br&gt;I do not know how to answer this yet. &amp;nbsp;In fact, I had begun looking more
&lt;br&gt;closely at drawnow.m, and it is more complex than I hoped. &amp;nbsp;So I am not
&lt;br&gt;sure the work is worth it. &amp;nbsp;But I'll see, thank you for the insight.
&lt;br&gt;&lt;br&gt;&amp;gt;Instead of asking us, why not just do it if you think it would help
&lt;br&gt;&amp;gt;you? &amp;nbsp;Then if the change is useful to you, it seems likely that it
&lt;br&gt;&amp;gt;might also be useful to others, so you might as well submit it.
&lt;br&gt;&lt;br&gt;This answers my question, thank you.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Francesco Potortì (ricercatore) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Voice: +39 050 315 3058 (op.2111)
&lt;br&gt;ISTI - Area della ricerca CNR &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp; +39 050 315 2040
&lt;br&gt;via G. Moruzzi 1, I-56124 Pisa &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Email: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19882419&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Potorti@...&lt;/a&gt;
&lt;br&gt;(entrance 20, 1st floor, room C71) &amp;nbsp; &amp;nbsp; Web: &amp;nbsp; &lt;a href=&quot;http://fly.isti.cnr.it/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fly.isti.cnr.it/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19882419&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/making-many-plots-quickly-tp19783986p19882419.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19881595</id>
	<title>making many plots quickly</title>
	<published>2008-10-08T08:27:01Z</published>
	<updated>2008-10-08T08:27:01Z</updated>
	<author>
		<name>John W. Eaton</name>
	</author>
	<content type="html">On &amp;nbsp;2-Oct-2008, Francesco Potorti` wrote:
&lt;br&gt;&lt;br&gt;| Using the movie.m function that I posted some time ago (and that you can
&lt;br&gt;| find at &amp;lt;&lt;a href=&quot;http://fly.isti.cnr.it/pub/software/octave/movie.m&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fly.isti.cnr.it/pub/software/octave/movie.m&lt;/a&gt;&amp;gt;) I can make
&lt;br&gt;| movies from a series of plots saved on disk as .png files.
&lt;br&gt;| 
&lt;br&gt;| The way it works is that I use for each frame
&lt;br&gt;| &amp;nbsp; figure(&amp;quot;visible&amp;quot;,&amp;quot;off&amp;quot;)
&lt;br&gt;| then I create the plot and save it as png with
&lt;br&gt;| &amp;nbsp; drawnow(&amp;quot;png&amp;quot;,sprintf(&amp;quot;%6d.png&amp;quot;,fileno++))
&lt;br&gt;| and at the end I call ffmpeg or whatever.
&lt;br&gt;| 
&lt;br&gt;| When making many plots (hundreds or thousands) I see that octave and
&lt;br&gt;| gnuplot take each 50% of CPU usage. &amp;nbsp;Looking ad drawnow.m, the cause
&lt;br&gt;| seems to be that when drawing a plot to a file the pipe to gnuplot is
&lt;br&gt;| closed each time. &amp;nbsp;If I could keep the pipe open, I could exploit having
&lt;br&gt;| a dual-core CPU to make things faster. &amp;nbsp;And probably I would also save
&lt;br&gt;| the CPU power needed to create and close a process for each frame.
&lt;br&gt;&lt;br&gt;I don't understand why opening and closing the plot stream would limit
&lt;br&gt;you to one CPU. &amp;nbsp;Is opening and closing the pipe really the bottleneck
&lt;br&gt;in the process?
&lt;br&gt;&lt;br&gt;If you want to keep the plot stream open, how do you propose doing it?
&lt;br&gt;Remember that there may be a plot on the screen, and that should not
&lt;br&gt;go away when drawnow is called again to print a plot to a file. &amp;nbsp;So
&lt;br&gt;would you keep two plot streams open for each figure? &amp;nbsp;Or would there
&lt;br&gt;be a dedicated gnuplot process just for printing? &amp;nbsp;Also, one advantage
&lt;br&gt;to restarting gnuplot for each figure that is printed is that you
&lt;br&gt;don't have to worry about the state of the gnuplot process, and
&lt;br&gt;whether there have been any errors that might cause trouble.
&lt;br&gt;&lt;br&gt;| Is there in Octave any way to use gnuplot like this?
&lt;br&gt;&lt;br&gt;It doesn't seem so, from looking at gnuplot_drawnow.
&lt;br&gt;&lt;br&gt;| If not, would it make sense for me to submit a patch that modifies
&lt;br&gt;| drawnow for general usage, so that it keeps the pipe open when possible?
&lt;br&gt;&lt;br&gt;Instead of asking us, why not just do it if you think it would help
&lt;br&gt;you? &amp;nbsp;Then if the change is useful to you, it seems likely that it
&lt;br&gt;might also be useful to others, so you might as well submit it.
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19881595&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/making-many-plots-quickly-tp19783986p19881595.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19868029</id>
	<title>specifying C/C++ compiler for making mex files</title>
	<published>2008-10-07T14:36:32Z</published>
	<updated>2008-10-07T14:36:32Z</updated>
	<author>
		<name>charles reid</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;Hi there -&lt;br&gt;&lt;br&gt;Is there a way to specify which C/C++ compiler you want Octave to use when compiling mex files?&amp;nbsp; I couldn&amp;#39;t find this anywhere in the documentation.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Charles&lt;br clear=&quot;all&quot;&gt;
&lt;br&gt;&lt;br&gt;==========&lt;br&gt;&lt;br&gt;Out of damp and gloomy days, out of solitude, out of loveless words directed at us, conclusions grow up in us like fungus: one morning they are there, we know not how, and they gaze upon us, morose and gray. Woe to the thinker who is not the gardener but only the soil of the plants that grow in him.&lt;br&gt;
- Friedrich Nietzsche&lt;br&gt;
&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19868029&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/specifying-C-C%2B%2B-compiler-for-making-mex-files-tp19868029p19868029.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19845758</id>
	<title>Include Fortran Code which Returns Arrays of Dynamic/Unknown Size</title>
	<published>2008-10-06T13:27:59Z</published>
	<updated>2008-10-06T13:27:59Z</updated>
	<author>
		<name>Marco2008</name>
	</author>
	<content type="html">Hello!
&lt;br&gt;&lt;br&gt;I would like to use some fortran subroutines from within octave. With the documentation from the octave-homepage it works fine with an example of the form:
&lt;br&gt;&lt;br&gt;... 
&lt;br&gt;octave_value_list retval;
&lt;br&gt;Matrix M1 = Matrix(4,3);
&lt;br&gt;F77_XFCN (function, FUNCTION, ( M1.fortran_vec() ) );
&lt;br&gt;retval(0) = M1;
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;Here, I the size of the matrix M1 is fixed. But in some cases I do not know before the call of the fortran subroutine what size the return value M1 has because this size is computed inside the fortran subroutine. I tried something like 
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;octave_value_list retval;
&lt;br&gt;Matrix M1;
&lt;br&gt;F77_XFCN (function, FUNCTION, ( M1.fortran_vec() );
&lt;br&gt;retval(0) = M1;
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;but it does not work. Therefor, I would like to know if and possibly how that can be realized. 
&lt;br&gt;It should be possible by defining a very large matrix M1 in the c++-wrapper and return additionally the actually needed size from the fortran subroutine by an integer variable. The return value M1 then has to be resized. 
&lt;br&gt;But I would like to avoid this solution, because you never know what &amp;quot;very large&amp;quot; means.
&lt;br&gt;&lt;br&gt;If someone had an idea, I would be very glad.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Marco
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Include-Fortran-Code-which-Returns-Arrays-of-Dynamic-Unknown-Size-tp19845758p19845758.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19833300</id>
	<title>Re: How to use Octave with Visual Studio 2008 ?</title>
	<published>2008-10-06T00:42:45Z</published>
	<updated>2008-10-06T00:42:45Z</updated>
	<author>
		<name>atabodur</name>
	</author>
	<content type="html">I am using the version 3.0.1. Actually I setup this from the setup file &amp;quot;octave-3.0.1-vs2008-setup.exe&amp;quot;. I am showing the octave files from the project properties-&amp;gt;C/C++-&amp;gt;Additional Include Directories and showing the include folder in the octave setup. I am also showing the lib files from the Project Properties-&amp;gt;Linker-&amp;gt;Additional Library Directories. I set up the PATH from the Control Panel-&amp;gt;System-&amp;gt;Environment Variables. 
&lt;br&gt;&lt;br&gt;I don't know what is wrong with this. Any help will be appreciated. Thanks in advance. 
&lt;br&gt;&lt;br&gt;M.S. Civ. Eng. Mehmet Ata BODUR 
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/How-to-use-Octave-with-Visual-Studio-2008---tp17507964p19833300.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19806022</id>
	<title>ODEs: 3 approaches: which is best?</title>
	<published>2008-10-03T14:39:59Z</published>
	<updated>2008-10-03T14:39:59Z</updated>
	<author>
		<name>Jim H</name>
	</author>
	<content type="html">I know of at least 3 ways to solve odes using lsode and I did a simple tic-toc comparison. &amp;nbsp;I'd like to know what users think are the pro's and con's of the different approaches.
&lt;br&gt;&lt;br&gt;Method 1: put the function to be integrated in one file and run it from another file
&lt;br&gt;Method 2: put the function in a file with the lsode invocation + put the parameters inside the function
&lt;br&gt;Method 3: Method 2, but pass the parameters to the function.
&lt;br&gt;&lt;br&gt;Simple Timings: average of 3
&lt;br&gt;Method 1: 2.13 sec
&lt;br&gt;Method 2: 2.19 sec
&lt;br&gt;Method 3: 2.59 sec
&lt;br&gt;&lt;br&gt;Is (1) fastest because of compiling? Why is (2) faster than (3)? But, speed is not everything; there is something to be said for having 1 file, especially in the context of teaching modeling to biologists. &amp;nbsp;Any opinions on advantages and disadvantages?
&lt;br&gt;&lt;br&gt;-Jim
&lt;br&gt;&lt;br&gt;Here are the basic codes...
&lt;br&gt;=======================
&lt;br&gt;Method (1) Run file:
&lt;br&gt;%Parameters (model specific)
&lt;br&gt;global &amp;nbsp; &amp;nbsp;ALF &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp; 1.5; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % competition N1 on N2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;global &amp;nbsp; &amp;nbsp;B &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;0.01; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % predation rate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;global &amp;nbsp; &amp;nbsp;C &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;0.5; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% conversion Prey to Predator &amp;nbsp; &amp;nbsp; 
&lt;br&gt;global &amp;nbsp; &amp;nbsp;D &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;1.0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% predator death rate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;global &amp;nbsp; &amp;nbsp;EP &amp;nbsp; &amp;nbsp; = &amp;nbsp; &amp;nbsp;0.009; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% N2 predator avoidance advantage 
&lt;br&gt;global &amp;nbsp; &amp;nbsp;K &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;800; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% N(1)(2) carrying capacity &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;global &amp;nbsp; &amp;nbsp;R &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;1.0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% prey percapita increase &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;global MODEL=&amp;quot;OSimVanceFunc&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; yo = [200; 200; 40];
&lt;br&gt;&amp;nbsp; &amp;nbsp; t=linspace(0,1200,1201);
&lt;br&gt;tic()
&lt;br&gt;&amp;nbsp; &amp;nbsp; y=lsode(MODEL,yo,t);
&lt;br&gt;toc()
&lt;br&gt;&lt;br&gt;Method (1) Function File:
&lt;br&gt;function dydt = OSimVanceFunc(y,t)
&lt;br&gt;global &amp;nbsp; &amp;nbsp;ALF; &amp;nbsp; &amp;nbsp; &amp;nbsp; % competition N1 on N2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;global &amp;nbsp; &amp;nbsp;B &amp;nbsp;; &amp;nbsp; &amp;nbsp; &amp;nbsp; % predation rate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;global &amp;nbsp; &amp;nbsp;C &amp;nbsp;; &amp;nbsp; &amp;nbsp; &amp;nbsp; % conversion Prey to Predator &amp;nbsp; &amp;nbsp; 
&lt;br&gt;global &amp;nbsp; &amp;nbsp;D &amp;nbsp;; &amp;nbsp; &amp;nbsp; &amp;nbsp; % predator death rate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;global &amp;nbsp; &amp;nbsp;EP ; &amp;nbsp; &amp;nbsp; &amp;nbsp; % N2 predator avoidance advantage 
&lt;br&gt;global &amp;nbsp; &amp;nbsp;K &amp;nbsp;; &amp;nbsp; &amp;nbsp; &amp;nbsp; % N(1)(2) carrying capacity &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;global &amp;nbsp; &amp;nbsp;R &amp;nbsp;; &amp;nbsp; &amp;nbsp; &amp;nbsp; % prey percapita increase &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; n1 = &amp;nbsp;y(1)*(R - (R/K)*(y(1)+y(2)) - B*y(3));
&lt;br&gt;&amp;nbsp; &amp;nbsp; n2 = &amp;nbsp;y(2)*(R - (R/K)*(ALF*y(1)+y(2)) -(B-EP)*y(3));
&lt;br&gt;&amp;nbsp; &amp;nbsp; n3 = &amp;nbsp;y(3)*(C*B*y(1) + C*(B-EP)*y(2) - D);
&lt;br&gt;&amp;nbsp; &amp;nbsp; dydt = [n1;n2;n3];
&lt;br&gt;====================================
&lt;br&gt;Method (2) 
&lt;br&gt;1; &amp;nbsp;% dummy command so we can have a function defined in this file
&lt;br&gt;function ret = f(x,t)
&lt;br&gt;&amp;nbsp;ALF &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp; 1.5; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % competition N1 on N2
&lt;br&gt;&amp;nbsp;B &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;0.01; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % predation rate 
&lt;br&gt;&amp;nbsp;C &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;0.5; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% conversion Prey to Predator
&lt;br&gt;&amp;nbsp;D &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;1.0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% predator death rate
&lt;br&gt;&amp;nbsp;EP &amp;nbsp; &amp;nbsp; = &amp;nbsp; &amp;nbsp;0.009; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% N2 predator avoidance advantage
&lt;br&gt;&amp;nbsp;K &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;800; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% N(1)(2) carrying capacity
&lt;br&gt;&amp;nbsp;R &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;1.0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% prey percapita increase
&lt;br&gt;&amp;nbsp;
&lt;br&gt;% the model
&lt;br&gt;&amp;nbsp; &amp;nbsp; n1 = &amp;nbsp;x(1)*(R - (R/K)*(x(1)+x(2)) - B*x(3));
&lt;br&gt;&amp;nbsp; &amp;nbsp; n2 = &amp;nbsp;x(2)*(R - (R/K)*(ALF*x(1)+x(2)) -(B-EP)*x(3));
&lt;br&gt;&amp;nbsp; &amp;nbsp; n3 = &amp;nbsp;x(3)*(C*B*x(1) + C*(B-EP)*x(2) - D);
&lt;br&gt;&amp;nbsp; &amp;nbsp; ret = [n1;n2;n3];
&lt;br&gt;endfunction 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;x0 &amp;nbsp;= [200;200;40]; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % initial conditions as column vector
&lt;br&gt;t=linspace(0,1200,1201)'; &amp;nbsp; &amp;nbsp; % solution times as column vector
&lt;br&gt;tic()
&lt;br&gt;x=lsode(&amp;quot;f&amp;quot;,x0,t); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% solve
&lt;br&gt;toc()
&lt;br&gt;==================================================
&lt;br&gt;Method (3)
&lt;br&gt;1; &amp;nbsp;% dummy command so we can have a function defined in this file
&lt;br&gt;function ret = f(x,t, ALF,B,C,D,EP,K,R)
&lt;br&gt;% the model
&lt;br&gt;&amp;nbsp; &amp;nbsp; n1 = &amp;nbsp;x(1)*(R - (R/K)*(x(1)+x(2)) - B*x(3));
&lt;br&gt;&amp;nbsp; &amp;nbsp; n2 = &amp;nbsp;x(2)*(R - (R/K)*(ALF*x(1)+x(2)) -(B-EP)*x(3));
&lt;br&gt;&amp;nbsp; &amp;nbsp; n3 = &amp;nbsp;x(3)*(C*B*x(1) + C*(B-EP)*x(2) - D);
&lt;br&gt;&amp;nbsp; &amp;nbsp; ret = [n1;n2;n3];
&lt;br&gt;endfunction 
&lt;br&gt;&lt;br&gt;&amp;nbsp;ALF &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp; 1.5; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % competition N1 on N2
&lt;br&gt;&amp;nbsp;B &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;0.01; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % predation rate 
&lt;br&gt;&amp;nbsp;C &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;0.5; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% conversion Prey to Predator
&lt;br&gt;&amp;nbsp;D &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;1.0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% predator death rate
&lt;br&gt;&amp;nbsp;EP &amp;nbsp; &amp;nbsp; = &amp;nbsp; &amp;nbsp;0.009; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% N2 predator avoidance advantage
&lt;br&gt;&amp;nbsp;K &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;800; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% N(1)(2) carrying capacity
&lt;br&gt;&amp;nbsp;R &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp;1.0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;% prey percapita increase
&lt;br&gt;x0 &amp;nbsp;= [200;200;40]; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % initial conditions as column vector
&lt;br&gt;t=linspace(0,1200,1201)'; &amp;nbsp; &amp;nbsp; % solution times as column vector
&lt;br&gt;g = @(x,t) f(x, t, ALF, B, C, D, EP, K, R);
&lt;br&gt;tic()
&lt;br&gt;x=lsode(g, x0, t);
&lt;br&gt;toc()
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/ODEs%3A-3-approaches%3A-which-is-best--tp19806022p19806022.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19798755</id>
	<title>Re: Does anybody have Octave code to draw Rayleigh fading envelope?</title>
	<published>2008-10-03T07:07:07Z</published>
	<updated>2008-10-03T07:07:07Z</updated>
	<author>
		<name>Andreas Yankopolus</name>
	</author>
	<content type="html">I've attached a quick 'n' dirty translation of my C code into Octave. &amp;nbsp;
&lt;br&gt;It's based on Dent, Bottomley, and Croft's paper. It could stand some &amp;nbsp;
&lt;br&gt;inline comments to explain the code as well as TLC for vectorization &amp;nbsp;
&lt;br&gt;of t,error checking, overall optimization, and a whole host of things. &amp;nbsp;
&lt;br&gt;I'll make another editing pass over this thing if anyone is interested.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Andreas
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;&lt;br&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19798755&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;rayleigh.m&lt;/strong&gt; (3K) &lt;a href=&quot;http://www.nabble.com/attachment/19798755/0/rayleigh.m&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Does-anybody-have-Octave-code-to-draw-Rayleigh-fading-envelope--tp19760057p19798755.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19790587</id>
	<title>Re: Problem with single quotes</title>
	<published>2008-10-02T17:55:55Z</published>
	<updated>2008-10-02T17:55:55Z</updated>
	<author>
		<name>Sergei Steshenko-2</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;br&gt;--- On Thu, 10/2/08, Francesco Potorti` &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19790587&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Potorti@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; From: Francesco Potorti` &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19790587&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Potorti@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: Problem with single quotes
&lt;br&gt;&amp;gt; To: &amp;quot;Andreas Yankopolus&amp;quot; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19790587&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;andreas@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cc: &amp;quot;Octave-ML&amp;quot; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19790587&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;help-octave@...&lt;/a&gt;&amp;gt;, &amp;quot;John W. Eaton&amp;quot; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19790587&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jwe@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Date: Thursday, October 2, 2008, 9:59 AM
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; | &amp;gt; &amp;nbsp;fprintf ('''')
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; | I did not know that. That statement prints a
&lt;br&gt;&amp;gt; double quote in Octave.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; No, it should print a single ' character, same
&lt;br&gt;&amp;gt; as Matlab.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;I can only report what I see. I've tried it on
&lt;br&gt;&amp;gt; Octave 3.0.2 (OS X) and &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;gt;Octave 3.0.0 (Ubuntu Hardy). Both give me a double
&lt;br&gt;&amp;gt; quote.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; That's very strange. &amp;nbsp;Here is what I get on Octave
&lt;br&gt;&amp;gt; 3.0.1 on Debian:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; octave&amp;gt; fprintf ('''')
&lt;br&gt;&amp;gt; 'octave&amp;gt; fprintf('''')
&lt;br&gt;&amp;gt; 'octave&amp;gt; 
&lt;br&gt;&amp;gt; octave&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Would you copy and paste what you obtain?
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Help-octave mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19790587&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;/div&gt;&lt;br&gt;On 3.0.2:
&lt;br&gt;&lt;br&gt;&amp;quot;
&lt;br&gt;octave:1&amp;gt; fprintf ('''')
&lt;br&gt;'octave:2&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;quot;
&lt;br&gt;&lt;br&gt;- so, I see a single single quote. Self-built 'octave' on SUSE 10.3.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&amp;nbsp; Sergei.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19790587&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Problem-with-single-quotes-tp19780721p19790587.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19787211</id>
	<title>Re: genvarname.m</title>
	<published>2008-10-02T13:14:33Z</published>
	<updated>2008-10-02T13:14:33Z</updated>
	<author>
		<name>John W. Eaton</name>
	</author>
	<content type="html">On &amp;nbsp;2-Oct-2008, wlmd888 wrote:
&lt;br&gt;&lt;br&gt;| 
&lt;br&gt;| Thanks for your reply!
&lt;br&gt;| 
&lt;br&gt;| For nargchk function,
&lt;br&gt;| 
&lt;br&gt;| In Octave, the function is defined as:
&lt;br&gt;| 
&lt;br&gt;| nargchk (NARGIN_MIN, NARGIN_MAX, N)
&lt;br&gt;| 
&lt;br&gt;| In Matlab, the function is defined as:
&lt;br&gt;| MSGSTRUCT = NARGCHK(LOW,HIGH,N,'struct')
&lt;br&gt;| MSG=NARGCHK(LOW,HIGH,N,'string')
&lt;br&gt;| MSG = NARGCHK(LOW,HIGH,N)
&lt;br&gt;| 
&lt;br&gt;| So in matlab, it can accept more than 3 parameters, but in Octave, it can
&lt;br&gt;| only accept 3 parameters.
&lt;br&gt;&lt;br&gt;OK.
&lt;br&gt;&lt;br&gt;I'd consider a patch.
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19787211&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/genvarname.m-tp19783736p19787211.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19786391</id>
	<title>Re: genvarname.m</title>
	<published>2008-10-02T12:59:50Z</published>
	<updated>2008-10-02T12:59:50Z</updated>
	<author>
		<name>wlmd888</name>
	</author>
	<content type="html">Thanks for your reply!
&lt;br&gt;&lt;br&gt;For nargchk function,
&lt;br&gt;&lt;br&gt;In Octave, the function is defined as:
&lt;br&gt;&lt;br&gt;nargchk (NARGIN_MIN, NARGIN_MAX, N)
&lt;br&gt;&lt;br&gt;In Matlab, the function is defined as:
&lt;br&gt;MSGSTRUCT = NARGCHK(LOW,HIGH,N,'struct')
&lt;br&gt;MSG=NARGCHK(LOW,HIGH,N,'string')
&lt;br&gt;MSG = NARGCHK(LOW,HIGH,N)
&lt;br&gt;&lt;br&gt;So in matlab, it can accept more than 3 parameters, but in Octave, it can only accept 3 parameters.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;John W. Eaton wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On &amp;nbsp;2-Oct-2008, wlmd888 wrote:
&lt;br&gt;&lt;br&gt;| &amp;nbsp; I installed Octave 3.0.2 but did not find genvarname.m, 
&lt;br&gt;&lt;br&gt;It is in the current development sources, so it will appear in the
&lt;br&gt;next major release of Octave. &amp;nbsp;But it is just a .m file, so maybe it
&lt;br&gt;will also work with 3.0.2.
&lt;br&gt;&lt;br&gt;| in addition, nargchk.m is slightly different from that in Matlab.
&lt;br&gt;&lt;br&gt;In what way?
&lt;br&gt;&lt;br&gt;If you think you've found a bug in Octave, then please submit a
&lt;br&gt;complete report to the bug@octave.org list. &amp;nbsp;Please read
&lt;br&gt;&lt;a href=&quot;http://www.octave.org/bugs.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.octave.org/bugs.html&lt;/a&gt;&amp;nbsp;to see what you should include so that
&lt;br&gt;your report is helpful.
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;Help-octave@cae.wisc.edu
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/genvarname.m-tp19783736p19786391.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19786158</id>
	<title>genvarname.m</title>
	<published>2008-10-02T12:13:58Z</published>
	<updated>2008-10-02T12:13:58Z</updated>
	<author>
		<name>John W. Eaton</name>
	</author>
	<content type="html">On &amp;nbsp;2-Oct-2008, wlmd888 wrote:
&lt;br&gt;&lt;br&gt;| &amp;nbsp; I installed Octave 3.0.2 but did not find genvarname.m, 
&lt;br&gt;&lt;br&gt;It is in the current development sources, so it will appear in the
&lt;br&gt;next major release of Octave. &amp;nbsp;But it is just a .m file, so maybe it
&lt;br&gt;will also work with 3.0.2.
&lt;br&gt;&lt;br&gt;| in addition, nargchk.m is slightly different from that in Matlab.
&lt;br&gt;&lt;br&gt;In what way?
&lt;br&gt;&lt;br&gt;If you think you've found a bug in Octave, then please submit a
&lt;br&gt;complete report to the &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19786158&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bug@...&lt;/a&gt; list. &amp;nbsp;Please read
&lt;br&gt;&lt;a href=&quot;http://www.octave.org/bugs.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.octave.org/bugs.html&lt;/a&gt;&amp;nbsp;to see what you should include so that
&lt;br&gt;your report is helpful.
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19786158&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/genvarname.m-tp19783736p19786158.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19784466</id>
	<title>Re: Where is &quot;colororder&quot; defined?</title>
	<published>2008-10-02T10:56:47Z</published>
	<updated>2008-10-02T10:56:47Z</updated>
	<author>
		<name>Samarkand</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;John W. Eaton wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On &amp;nbsp;2-Oct-2008, Samarkand wrote:
&lt;br&gt;&lt;br&gt;| &amp;gt; To verify that this is the problem, I suggest that you start Octave in
&lt;br&gt;| &amp;gt; your home directory and type the following commands:
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; &amp;nbsp; which plot
&lt;br&gt;| &amp;gt; &amp;nbsp; path
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; Is the plot function coming from the 3.0.0 directory tree?
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; Does the output of path list the system directories for the 3.0.0
&lt;br&gt;| &amp;gt; version?
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; What is in your ~/.octaverc file?
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; jwe
&lt;br&gt;| &amp;gt; _______________________________________________
&lt;br&gt;| &amp;gt; Help-octave mailing list
&lt;br&gt;| &amp;gt; Help-octave@cae.wisc.edu
&lt;br&gt;| &amp;gt; &lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;| &amp;gt; 
&lt;br&gt;| &amp;gt; 
&lt;br&gt;| 
&lt;br&gt;| Many thanks John.
&lt;br&gt;| 
&lt;br&gt;| I can't see any obvious evidence of using the 3.0.0. tree, here's the output
&lt;br&gt;| from your suggestion:
&lt;br&gt;| 
&lt;br&gt;| ==================================================================
&lt;br&gt;| [root@matterhorn ~]# cd ~ 
&lt;br&gt;| [root@matterhorn ~]# octave 
&lt;br&gt;| GNU Octave, version 3.0.3 
&lt;br&gt;| Copyright (C) 2008 John W. Eaton and others. 
&lt;br&gt;| 
&lt;br&gt;| Preamble removed for
&lt;br&gt;| clarity........................................................
&lt;br&gt;| 
&lt;br&gt;| octave:1&amp;gt; which plot 
&lt;br&gt;| plot is the user-defined function from the file 
&lt;br&gt;| /usr/local/share/octave/3.0.3/m/plot/plot.m 
&lt;br&gt;| octave:2&amp;gt; path 
&lt;br&gt;| &amp;nbsp;
&lt;br&gt;| Octave's search path contains the following directories: 
&lt;br&gt;| /usr/local/share/octave/3.0.3/m/testfun
&lt;br&gt;| /usr/local/share/octave/3.0.3/m/control/base 
&lt;br&gt;| .
&lt;br&gt;| ETC (all pointing to the 3.0.3 tree)
&lt;br&gt;| .
&lt;br&gt;| /usr/local/share/octave/3.0.3/m/plot
&lt;br&gt;| .
&lt;br&gt;| ETC (all pointing to the 3.0.3 tree)
&lt;br&gt;| . 
&lt;br&gt;| &amp;nbsp;
&lt;br&gt;| octave:3&amp;gt; get (gca,&amp;quot;colororder&amp;quot;) 
&lt;br&gt;| warning: get: invalid property `colororder' 
&lt;br&gt;| octave:4&amp;gt; &amp;nbsp;
&lt;br&gt;| =============================================================
&lt;br&gt;| 
&lt;br&gt;| On your question of my .octaverc file well interestingly there is no such
&lt;br&gt;| file on my system so am using the default environment I guess.
&lt;br&gt;&lt;br&gt;What does
&lt;br&gt;&lt;br&gt;&amp;nbsp; which octave
&lt;br&gt;&lt;br&gt;or
&lt;br&gt;&lt;br&gt;&amp;nbsp; type octave
&lt;br&gt;&lt;br&gt;at the shell prompt tell you?
&lt;br&gt;&lt;br&gt;Using that result, what does
&lt;br&gt;&lt;br&gt;&amp;nbsp; ldd /path/to/octave
&lt;br&gt;&lt;br&gt;show?
&lt;br&gt;&lt;br&gt;As you are the only person who has reported this problem, and given
&lt;br&gt;that it is a pretty obvious problem that just about anyone trying to
&lt;br&gt;plot anything would notice, I highly suspect something is wrong with
&lt;br&gt;your installation.
&lt;br&gt;&lt;br&gt;But where did you get Octave 3.0.3? &amp;nbsp;I don't think the release has
&lt;br&gt;been announced yet. &amp;nbsp;So which release candidate are you using? &amp;nbsp;How
&lt;br&gt;did you build it?
&lt;br&gt;&lt;br&gt;Can anyone else who has been testing the release candidates confirm
&lt;br&gt;this problem?
&lt;br&gt;&lt;br&gt;Is your installed copy of Octave somehow linking with old libraries?
&lt;br&gt;&lt;br&gt;jwe
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;Help-octave@cae.wisc.edu
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;br&gt;Thaks again John, I'm inclined to agree that it is a defect in my installation so don't let me take any more of your time. For completeness sake, in answer to your questions:
&lt;br&gt;&lt;br&gt;==============================================
&lt;br&gt;[root@matterhorn log]# which octave 
&lt;br&gt;/usr/local/bin/octave 
&lt;br&gt;[root@matterhorn log]# ldd /usr/local/bin/octave 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linux-gate.so.1 =&amp;gt; &amp;nbsp;(0x00110000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; liboctinterp.so =&amp;gt; /usr/local/lib/octave-3.0.3/liboctinterp.so (0x00af6000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; liboctave.so =&amp;gt; /usr/local/lib/octave-3.0.3/liboctave.so (0x00111000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libcruft.so =&amp;gt; /usr/local/lib/octave-3.0.3/libcruft.so (0x00952000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; liblapack.so.3 =&amp;gt; /usr/lib/atlas/liblapack.so.3 (0x02000000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libblas.so.3 =&amp;gt; /usr/lib/atlas/libblas.so.3 (0x02509000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libfftw3.so.3 =&amp;gt; /usr/lib/libfftw3.so.3 (0x05751000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libreadline.so.5 =&amp;gt; /lib/libreadline.so.5 (0x0099f000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libncurses.so.5 =&amp;gt; /lib/libncurses.so.5 (0x053ff000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libdl.so.2 =&amp;gt; /lib/libdl.so.2 (0x009d4000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libhdf5.so.0 =&amp;gt; /usr/lib/libhdf5.so.0 (0x05474000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libz.so.1 =&amp;gt; /lib/libz.so.1 (0x009d9000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libgfortran.so.1 =&amp;gt; /usr/lib/libgfortran.so.1 (0x009ec000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libm.so.6 =&amp;gt; /lib/libm.so.6 (0x00a6c000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libstdc++.so.6 =&amp;gt; /usr/lib/libstdc++.so.6 (0x04a06000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libgcc_s.so.1 =&amp;gt; /lib/libgcc_s.so.1 (0x00a95000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libc.so.6 =&amp;gt; /lib/libc.so.6 (0x014f8000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libpthread.so.0 =&amp;gt; /lib/libpthread.so.0 (0x00aa1000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libtinfo.so.5 =&amp;gt; /lib/libtinfo.so.5 (0x053e5000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /lib/ld-linux.so.2 (0x00ad9000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libssl.so.6 =&amp;gt; /lib/libssl.so.6 (0x03212000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libcrypto.so.6 =&amp;gt; /lib/libcrypto.so.6 (0x052b0000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libgssapi_krb5.so.2 =&amp;gt; /usr/lib/libgssapi_krb5.so.2 (0x02f77000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libkrb5.so.3 =&amp;gt; /usr/lib/libkrb5.so.3 (0x03ae8000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libcom_err.so.2 =&amp;gt; /lib/libcom_err.so.2 (0x00aba000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libk5crypto.so.3 =&amp;gt; /usr/lib/libk5crypto.so.3 (0x02e8f000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libresolv.so.2 =&amp;gt; /lib/libresolv.so.2 (0x00abd000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libkrb5support.so.0 =&amp;gt; /usr/lib/libkrb5support.so.0 (0x02b46000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libkeyutils.so.1 =&amp;gt; /lib/libkeyutils.so.1 (0x051fd000) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; libselinux.so.1 =&amp;gt; /lib/libselinux.so.1 (0x02d50000) 
&lt;br&gt;[root@matterhorn log]# &amp;nbsp;
&lt;br&gt;&lt;br&gt;===================================================
&lt;br&gt;&lt;br&gt;I downloaded 3.0.3 rc2 from here &lt;a href=&quot;http://www.nabble.com/3.0.3-release-candidate-td19645333.html&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/3.0.3-release-candidate-td19645333.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;And I built it using the supplied instructions. There was a handful of failures during make check but otherwise all OK.
&lt;br&gt;&lt;br&gt;Incidentally the reason I went to 3.0.3 was because I was having the same error with colororder with 3.0.0 (per my first post).
&lt;br&gt;&lt;br&gt;As a circumvention to the problem I just cd to the plot directory you can see below. Plot then works irrespective of the directory I happen to start Octave from:
&lt;br&gt;&lt;br&gt;[root@matterhorn log]# cat /usr/local/share/octave/site/m/startup/octaverc &amp;nbsp;
&lt;br&gt;## System-wide startup file for Octave. 
&lt;br&gt;## 
&lt;br&gt;## This file should contain any commands that should be executed each 
&lt;br&gt;## time Octave starts for every user at this site. 
&lt;br&gt;cd /usr/local/share/octave/3.0.3/m/plot/ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&amp;lt;&amp;lt; I just added this to make it work
&lt;br&gt;&lt;br&gt;&lt;br&gt;So unless I can get to the bottom of it I'm happy to live with that.
&lt;br&gt;&lt;br&gt;Thanks again John for your help and you and your colleagues continuing support for Octave. It is very much appreciated.
&lt;br&gt;&lt;br&gt;Regards...........Chris 
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Where-is-%22colororder%22-defined--tp19759573p19784466.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19784669</id>
	<title>Re: Where is &quot;colororder&quot; defined?</title>
	<published>2008-10-02T10:51:15Z</published>
	<updated>2008-10-02T10:51:15Z</updated>
	<author>
		<name>Jaroslav Hajek-2</name>
	</author>
	<content type="html">On Thu, Oct 2, 2008 at 4:47 PM, Samarkand &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784669&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;samarkand99-pc@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; John W. Eaton wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On &amp;nbsp;2-Oct-2008, Samarkand wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; | Thanks Ben, I appreciate your comments but I'm not sure that's the case.
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | Please see the output I've just captured:
&lt;br&gt;&amp;gt;&amp;gt; | ==========================================================
&lt;br&gt;&amp;gt;&amp;gt; | [root@matterhorn /]# octave &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&amp;lt;&amp;lt; &amp;nbsp;Start
&lt;br&gt;&amp;gt;&amp;gt; | Octave in any directory
&lt;br&gt;&amp;gt;&amp;gt; | GNU Octave, version 3.0.3
&lt;br&gt;&amp;gt;&amp;gt; | Copyright (C) 2008 John W. Eaton and others.
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | text removed for clarity .........
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | octave:1&amp;gt; get (gca,&amp;quot;colororder&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt; | warning: get: invalid property `colororder' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt;&amp;lt; Get the error
&lt;br&gt;&amp;gt;&amp;gt; | message
&lt;br&gt;&amp;gt;&amp;gt; | octave:2&amp;gt; exit
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | [root@matterhorn /]# cd /usr/local/share/octave/3.0.3/m/plot &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt;&amp;lt; go to
&lt;br&gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt; | ../m/plot/ directory
&lt;br&gt;&amp;gt;&amp;gt; | [root@matterhorn plot]# octave &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;lt;&amp;lt; Start Octave
&lt;br&gt;&amp;gt;&amp;gt; | GNU Octave, version 3.0.3
&lt;br&gt;&amp;gt;&amp;gt; | Copyright (C) 2008 John W. Eaton and others.
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | text removed for clarity ...........
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | octave:1&amp;gt; get (gca,&amp;quot;colororder&amp;quot;)
&lt;br&gt;&amp;gt;&amp;gt; | &amp;lt;&amp;lt;&amp;lt; and it works just fine!!
&lt;br&gt;&amp;gt;&amp;gt; | ans =
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | &amp;nbsp; &amp;nbsp;0.00000 &amp;nbsp; 0.00000 &amp;nbsp; 1.00000
&lt;br&gt;&amp;gt;&amp;gt; | &amp;nbsp; &amp;nbsp;0.00000 &amp;nbsp; 0.50000 &amp;nbsp; 0.00000
&lt;br&gt;&amp;gt;&amp;gt; | &amp;nbsp; &amp;nbsp;1.00000 &amp;nbsp; 0.00000 &amp;nbsp; 0.00000
&lt;br&gt;&amp;gt;&amp;gt; | &amp;nbsp; &amp;nbsp;0.00000 &amp;nbsp; 0.75000 &amp;nbsp; 0.75000
&lt;br&gt;&amp;gt;&amp;gt; | &amp;nbsp; &amp;nbsp;0.75000 &amp;nbsp; 0.00000 &amp;nbsp; 0.75000
&lt;br&gt;&amp;gt;&amp;gt; | &amp;nbsp; &amp;nbsp;0.75000 &amp;nbsp; 0.75000 &amp;nbsp; 0.00000
&lt;br&gt;&amp;gt;&amp;gt; | &amp;nbsp; &amp;nbsp;0.25000 &amp;nbsp; 0.25000 &amp;nbsp; 0.25000
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | octave:2&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | =====================================================
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | Plot ONLY works if I start Octave from the ../m/plot/ directory which is
&lt;br&gt;&amp;gt;&amp;gt; | crazy!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; No, it's not crazy. &amp;nbsp;It's probably happening because you have the
&lt;br&gt;&amp;gt;&amp;gt; system directories for the 3.0.0 version in your load path, so you are
&lt;br&gt;&amp;gt;&amp;gt; mixing versions. &amp;nbsp;However, the current directory (&amp;quot;.&amp;quot;) is always first
&lt;br&gt;&amp;gt;&amp;gt; in the load path, so when you start Octave in the
&lt;br&gt;&amp;gt;&amp;gt; /usr/local/share/octave/3.0.3/m/plot directory, you are getting the
&lt;br&gt;&amp;gt;&amp;gt; version of the plotting functions that match the version of Octave
&lt;br&gt;&amp;gt;&amp;gt; that you are using.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; To verify that this is the problem, I suggest that you start Octave in
&lt;br&gt;&amp;gt;&amp;gt; your home directory and type the following commands:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; which plot
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; path
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Is the plot function coming from the 3.0.0 directory tree?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Does the output of path list the system directories for the 3.0.0
&lt;br&gt;&amp;gt;&amp;gt; version?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What is in your ~/.octaverc file?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; jwe
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Help-octave mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784669&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Many thanks John.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I can't see any obvious evidence of using the 3.0.0. tree, here's the output
&lt;br&gt;&amp;gt; from your suggestion:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ==================================================================
&lt;br&gt;&amp;gt; [root@matterhorn ~]# cd ~
&lt;br&gt;&amp;gt; [root@matterhorn ~]# octave
&lt;br&gt;&amp;gt; GNU Octave, version 3.0.3
&lt;br&gt;&amp;gt; Copyright (C) 2008 John W. Eaton and others.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Preamble removed for
&lt;br&gt;&amp;gt; clarity........................................................
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; octave:1&amp;gt; which plot
&lt;br&gt;&amp;gt; plot is the user-defined function from the file
&lt;br&gt;&amp;gt; /usr/local/share/octave/3.0.3/m/plot/plot.m
&lt;br&gt;&amp;gt; octave:2&amp;gt; path
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Octave's search path contains the following directories:
&lt;br&gt;&amp;gt; /usr/local/share/octave/3.0.3/m/testfun
&lt;br&gt;&amp;gt; /usr/local/share/octave/3.0.3/m/control/base
&lt;br&gt;&amp;gt; .
&lt;br&gt;&amp;gt; ETC (all pointing to the 3.0.3 tree)
&lt;br&gt;&amp;gt; .
&lt;br&gt;&amp;gt; /usr/local/share/octave/3.0.3/m/plot
&lt;br&gt;&amp;gt; .
&lt;br&gt;&amp;gt; ETC (all pointing to the 3.0.3 tree)
&lt;br&gt;&amp;gt; .
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; octave:3&amp;gt; get (gca,&amp;quot;colororder&amp;quot;)
&lt;br&gt;&amp;gt; warning: get: invalid property `colororder'
&lt;br&gt;&amp;gt; octave:4&amp;gt;
&lt;br&gt;&amp;gt; =============================================================
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On your question of my .octaverc file well interestingly there is no such
&lt;br&gt;&amp;gt; file on my system so am using the default environment I guess.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;Is it possible that you're using 3.0.3 RC1? There was a nasty bug in
&lt;br&gt;RC1, that prevented 'split' from working properly if two consecutive
&lt;br&gt;separators occured. That could sometimes cause problems when parsing
&lt;br&gt;paths. Can you try entering
&lt;br&gt;`split (&amp;quot;a//a&amp;quot;, &amp;quot;/&amp;quot;)' into your build of Octave?
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;RNDr. Jaroslav Hajek
&lt;br&gt;computing expert
&lt;br&gt;Aeronautical Research and Test Institute (VZLU)
&lt;br&gt;Prague, Czech Republic
&lt;br&gt;url: www.highegg.matfyz.cz
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784669&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Where-is-%22colororder%22-defined--tp19759573p19784669.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19784578</id>
	<title>Re: Where is &quot;colororder&quot; defined?</title>
	<published>2008-10-02T10:48:44Z</published>
	<updated>2008-10-02T10:48:44Z</updated>
	<author>
		<name>Jaroslav Hajek-2</name>
	</author>
	<content type="html">On Thu, Oct 2, 2008 at 6:41 PM, John W. Eaton &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784578&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jwe@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On &amp;nbsp;2-Oct-2008, Samarkand wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; | &amp;gt; To verify that this is the problem, I suggest that you start Octave in
&lt;br&gt;&amp;gt; | &amp;gt; your home directory and type the following commands:
&lt;br&gt;&amp;gt; | &amp;gt;
&lt;br&gt;&amp;gt; | &amp;gt; &amp;nbsp; which plot
&lt;br&gt;&amp;gt; | &amp;gt; &amp;nbsp; path
&lt;br&gt;&amp;gt; | &amp;gt;
&lt;br&gt;&amp;gt; | &amp;gt; Is the plot function coming from the 3.0.0 directory tree?
&lt;br&gt;&amp;gt; | &amp;gt;
&lt;br&gt;&amp;gt; | &amp;gt; Does the output of path list the system directories for the 3.0.0
&lt;br&gt;&amp;gt; | &amp;gt; version?
&lt;br&gt;&amp;gt; | &amp;gt;
&lt;br&gt;&amp;gt; | &amp;gt; What is in your ~/.octaverc file?
&lt;br&gt;&amp;gt; | &amp;gt;
&lt;br&gt;&amp;gt; | &amp;gt; jwe
&lt;br&gt;&amp;gt; | &amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; | &amp;gt; Help-octave mailing list
&lt;br&gt;&amp;gt; | &amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784578&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&amp;gt; | &amp;gt; &lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;&amp;gt; | &amp;gt;
&lt;br&gt;&amp;gt; | &amp;gt;
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; | Many thanks John.
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; | I can't see any obvious evidence of using the 3.0.0. tree, here's the output
&lt;br&gt;&amp;gt; | from your suggestion:
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; | ==================================================================
&lt;br&gt;&amp;gt; | [root@matterhorn ~]# cd ~
&lt;br&gt;&amp;gt; | [root@matterhorn ~]# octave
&lt;br&gt;&amp;gt; | GNU Octave, version 3.0.3
&lt;br&gt;&amp;gt; | Copyright (C) 2008 John W. Eaton and others.
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; | Preamble removed for
&lt;br&gt;&amp;gt; | clarity........................................................
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; | octave:1&amp;gt; which plot
&lt;br&gt;&amp;gt; | plot is the user-defined function from the file
&lt;br&gt;&amp;gt; | /usr/local/share/octave/3.0.3/m/plot/plot.m
&lt;br&gt;&amp;gt; | octave:2&amp;gt; path
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; | Octave's search path contains the following directories:
&lt;br&gt;&amp;gt; | /usr/local/share/octave/3.0.3/m/testfun
&lt;br&gt;&amp;gt; | /usr/local/share/octave/3.0.3/m/control/base
&lt;br&gt;&amp;gt; | .
&lt;br&gt;&amp;gt; | ETC (all pointing to the 3.0.3 tree)
&lt;br&gt;&amp;gt; | .
&lt;br&gt;&amp;gt; | /usr/local/share/octave/3.0.3/m/plot
&lt;br&gt;&amp;gt; | .
&lt;br&gt;&amp;gt; | ETC (all pointing to the 3.0.3 tree)
&lt;br&gt;&amp;gt; | .
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; | octave:3&amp;gt; get (gca,&amp;quot;colororder&amp;quot;)
&lt;br&gt;&amp;gt; | warning: get: invalid property `colororder'
&lt;br&gt;&amp;gt; | octave:4&amp;gt;
&lt;br&gt;&amp;gt; | =============================================================
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; | On your question of my .octaverc file well interestingly there is no such
&lt;br&gt;&amp;gt; | file on my system so am using the default environment I guess.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What does
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;which octave
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; or
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;type octave
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; at the shell prompt tell you?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Using that result, what does
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;ldd /path/to/octave
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; show?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As you are the only person who has reported this problem, and given
&lt;br&gt;&amp;gt; that it is a pretty obvious problem that just about anyone trying to
&lt;br&gt;&amp;gt; plot anything would notice, I highly suspect something is wrong with
&lt;br&gt;&amp;gt; your installation.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But where did you get Octave 3.0.3? &amp;nbsp;I don't think the release has
&lt;br&gt;&amp;gt; been announced yet. &amp;nbsp;So which release candidate are you using? &amp;nbsp;How
&lt;br&gt;&amp;gt; did you build it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can anyone else who has been testing the release candidates confirm
&lt;br&gt;&amp;gt; this problem?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;It seems to work fine with my build of 3.0.3 RC2.
&lt;br&gt;&lt;br&gt;&amp;gt; Is your installed copy of Octave somehow linking with old libraries?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; jwe
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Help-octave mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784578&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;RNDr. Jaroslav Hajek
&lt;br&gt;computing expert
&lt;br&gt;Aeronautical Research and Test Institute (VZLU)
&lt;br&gt;Prague, Czech Republic
&lt;br&gt;url: www.highegg.matfyz.cz
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784578&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Where-is-%22colororder%22-defined--tp19759573p19784578.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19783736</id>
	<title>genvarname.m</title>
	<published>2008-10-02T10:16:17Z</published>
	<updated>2008-10-02T10:16:17Z</updated>
	<author>
		<name>wlmd888</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;&amp;nbsp; I installed Octave 3.0.2 but did not find genvarname.m, 
&lt;br&gt;in addition, nargchk.m is slightly different from that in Matlab. Are these functions implemented in this current release?
&lt;br&gt;&lt;br&gt;&amp;nbsp; Thanks a lot!
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/genvarname.m-tp19783736p19783736.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19784124</id>
	<title>Re: Problem with single quotes</title>
	<published>2008-10-02T09:59:53Z</published>
	<updated>2008-10-02T09:59:53Z</updated>
	<author>
		<name>Francesco Potorti`-2</name>
	</author>
	<content type="html">&amp;gt;&amp;gt; | &amp;gt; &amp;nbsp;fprintf ('''')
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt; | I did not know that. That statement prints a double quote in Octave.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; No, it should print a single ' character, same as Matlab.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;I can only report what I see. I've tried it on Octave 3.0.2 (OS X) and &amp;nbsp;
&lt;br&gt;&amp;gt;Octave 3.0.0 (Ubuntu Hardy). Both give me a double quote.
&lt;br&gt;&lt;br&gt;That's very strange. &amp;nbsp;Here is what I get on Octave 3.0.1 on Debian:
&lt;br&gt;&lt;br&gt;octave&amp;gt; fprintf ('''')
&lt;br&gt;'octave&amp;gt; fprintf('''')
&lt;br&gt;'octave&amp;gt; 
&lt;br&gt;octave&amp;gt;
&lt;br&gt;&lt;br&gt;Would you copy and paste what you obtain?
&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784124&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Problem-with-single-quotes-tp19780721p19784124.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19783986</id>
	<title>making many plots quickly</title>
	<published>2008-10-02T09:42:13Z</published>
	<updated>2008-10-02T09:42:13Z</updated>
	<author>
		<name>Francesco Potorti`-2</name>
	</author>
	<content type="html">Using the movie.m function that I posted some time ago (and that you can
&lt;br&gt;find at &amp;lt;&lt;a href=&quot;http://fly.isti.cnr.it/pub/software/octave/movie.m&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fly.isti.cnr.it/pub/software/octave/movie.m&lt;/a&gt;&amp;gt;) I can make
&lt;br&gt;movies from a series of plots saved on disk as .png files.
&lt;br&gt;&lt;br&gt;The way it works is that I use for each frame
&lt;br&gt;&amp;nbsp; figure(&amp;quot;visible&amp;quot;,&amp;quot;off&amp;quot;)
&lt;br&gt;then I create the plot and save it as png with
&lt;br&gt;&amp;nbsp; drawnow(&amp;quot;png&amp;quot;,sprintf(&amp;quot;%6d.png&amp;quot;,fileno++))
&lt;br&gt;and at the end I call ffmpeg or whatever.
&lt;br&gt;&lt;br&gt;When making many plots (hundreds or thousands) I see that octave and
&lt;br&gt;gnuplot take each 50% of CPU usage. &amp;nbsp;Looking ad drawnow.m, the cause
&lt;br&gt;seems to be that when drawing a plot to a file the pipe to gnuplot is
&lt;br&gt;closed each time. &amp;nbsp;If I could keep the pipe open, I could exploit having
&lt;br&gt;a dual-core CPU to make things faster. &amp;nbsp;And probably I would also save
&lt;br&gt;the CPU power needed to create and close a process for each frame.
&lt;br&gt;&lt;br&gt;Is there in Octave any way to use gnuplot like this?
&lt;br&gt;&lt;br&gt;If not, would it make sense for me to submit a patch that modifies
&lt;br&gt;drawnow for general usage, so that it keeps the pipe open when possible?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Francesco Potortì (ricercatore) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Voice: +39 050 315 3058 (op.2111)
&lt;br&gt;ISTI - Area della ricerca CNR &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp; +39 050 315 2040
&lt;br&gt;via G. Moruzzi 1, I-56124 Pisa &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Email: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19783986&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Potorti@...&lt;/a&gt;
&lt;br&gt;(entrance 20, 1st floor, room C71) &amp;nbsp; &amp;nbsp; Web: &amp;nbsp; &lt;a href=&quot;http://fly.isti.cnr.it/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fly.isti.cnr.it/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Help-octave mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19783986&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Help-octave@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://www-old.cae.wisc.edu/mailman/listinfo/help-octave&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/making-many-plots-quickly-tp19783986p19783986.html" />
</entry>

</feed>
