From tmacchant at yahoo.co.jp Sat Aug 1 02:10:27 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Sat, 1 Aug 2009 16:10:27 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <20090801044222.65593.qmail@web3802.mail.bbt.yahoo.co.jp> Message-ID: <20090801071027.39077.qmail@web3811.mail.bbt.yahoo.co.jp> Hello I have made a patch to lo-sysdep.cc at the end of file. For the example by Matthiaas Brennwldd N = 100; n = 2; m = 2; tic for i = 1:n*m x = rand (2,N); subplot (n,m,i); plot (x(1,:),x(2,:)); end toc Time for plot is about 8 seconds and 2 second after that. (CPU CeleronM 1.3GHz, XP home 512 MB Memory). Before patch it took 5-7 minutes!!! Too slow. However, is it reanable each child process created by octave_popen2 always has ABOVE_NORMAL_PRIORITY_CLASS? The slowness at this time occurred because the octave-3.2.0 is heavy task for 1 core system, which share almost all cpu activities. I cannot judge this patch is appropriate so that I would like to heart the opinion by those who are much experience and knowledge for the windows programing. Regards Tatsuro ************************** --- a/liboctave/lo-sysdep.cc 2009-05-25 15:04:58 +0900 +++ b/liboctave/lo-sysdep.cc 2009-08-01 15:48:55 +0900 @@ -159,6 +159,7 @@ msg = "popen2: process creation failed"; return -1; } + SetPriorityClass(pi.hProcess, ABOVE_NORMAL_PRIORITY_CLASS); pid = pi.dwProcessId; CloseHandle (childRead); -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From huubvanniekerk at gmail.com Sun Aug 2 11:31:13 2009 From: huubvanniekerk at gmail.com (Huub van Niekerk) Date: Sun, 2 Aug 2009 18:31:13 +0200 Subject: Compiling Octave 3.2.2 on Solaris 10 Sparc: which gcc/g++? Message-ID: <44808e650908020931s1c1d1201pcd280952e5dfa5f@mail.gmail.com> Hi, I want to compile Octave 3.2.2 from source, because the versions offered by Blastwave and Sunfreeware are outdated. I've downloaded and extracted the code, and ran ./configure. It ends with this message: configure: error: g++ version 3.4.6 will probably fail to compile Octave Does anyone know why this "will probably fail"? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090802/0c3c1d46/attachment.html From sonne at debian.org Sun Aug 2 13:45:22 2009 From: sonne at debian.org (Soeren Sonnenburg) Date: Sun, 02 Aug 2009 20:45:22 +0200 Subject: overloading the global new/delete operator in octave Message-ID: <1249238722.5560.13.camel@localhost> Dear all, I am a bit puzzled why my overloaded global new[] operator does not become effective when building a octave extension (it works with python/matlab though)... I declare something like void* operator new[](std::size_t size) throw (std::bad_alloc) { printf("test\n"); } DEFUN_DLD (sg, prhs, nlhs, "shogun.") { volatile int* foo = new int[2]; } but don't see the test output... In the octave src I only see in oct-obj.h *local* overloading of new/delete but no more? I also wonder why the in this file new(size_t size, void*p) function is declared... looks to me like a nop - orhas this the same cause...? // FIXME -- without this, I have errors with the stack of // octave_value_list objects in ov-usr-fcn.h. Why? void *operator new (size_t size, void *p) { return ::operator new (size, p); } Hmmhhh... Soeren -- For the one fact about the future of which we can be certain is that it will be utterly fantastic. -- Arthur C. Clarke, 1962 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090802/7ed237a6/attachment.bin From jenda-k at seznam.cz Sun Aug 2 03:33:28 2009 From: jenda-k at seznam.cz (jenda-k at seznam.cz) Date: Sun, 02 Aug 2009 10:33:28 +0200 (CEST) Subject: =?us-ascii?Q?Biquadratic=20equation?= Message-ID: <124.285-11107-1121702765-1249202008@seznam.cz> Hi, I have a simple request: How to get a solving of biquadratic equation like 16x^4-4x^2-2=0 in GNU Octave. I dont have enough skills to do it myself. Thanks From bpabbott at mac.com Sun Aug 2 18:14:22 2009 From: bpabbott at mac.com (Ben Abbott) Date: Sun, 02 Aug 2009 19:14:22 -0400 Subject: Biquadratic equation In-Reply-To: <124.285-11107-1121702765-1249202008@seznam.cz> References: <124.285-11107-1121702765-1249202008@seznam.cz> Message-ID: <526738E5-8859-47E7-9A98-F1BB852FFFCF@mac.com> On Aug 2, 2009, at 4:33 AM, jenda-k at seznam.cz wrote: > Hi, > > I have a simple request: How to get a solving of biquadratic > equation like 16x^4-4x^2-2=0 in GNU Octave. I dont have enough > skills to do it myself. > > Thanks Octave has a nice function for solving for the roots of polynomials. x1 = roots ([16, 0, -4, 0, -2]); avoid reduce numerical errors ... x2 = (sqrt(roots([16 -4, -2]))*[1 -1])(:) sort(x1)-[-0.5i;0.5i;1/sqrt(2);-1/sqrt(2)] ans = 0.0000e+00 0.0000e+00 7.7716e-16 -8.8818e-16 sort(x2)-[-0.5i;0.5i;1/sqrt(2);-1/sqrt(2)] ans = 0.0000e+00 0.0000e+00 1.1102e-16 -1.1102e-16 Ben From en_fernandez at yahoo.com.ar Sun Aug 2 19:28:21 2009 From: en_fernandez at yahoo.com.ar (Enrique Fernandez) Date: Sun, 02 Aug 2009 21:28:21 -0300 Subject: Biquadratic equation In-Reply-To: <124.285-11107-1121702765-1249202008@seznam.cz> References: <124.285-11107-1121702765-1249202008@seznam.cz> Message-ID: <4A762F25.6000906@yahoo.com.ar> roots([16 0 -4 0 -2]) Enrique Fernandez jenda-k at seznam.cz escribi?: > Hi, > > I have a simple request: How to get a solving of biquadratic equation like 16x^4-4x^2-2=0 in GNU Octave. I dont have enough skills to do it myself. > > Thanks > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > From highegg at gmail.com Mon Aug 3 00:24:58 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Mon, 3 Aug 2009 07:24:58 +0200 Subject: Compiling Octave 3.2.2 on Solaris 10 Sparc: which gcc/g++? In-Reply-To: <44808e650908020931s1c1d1201pcd280952e5dfa5f@mail.gmail.com> References: <44808e650908020931s1c1d1201pcd280952e5dfa5f@mail.gmail.com> Message-ID: <69d8d540908022224v269ed8b3s7ee446b310d0e836@mail.gmail.com> On Sun, Aug 2, 2009 at 6:31 PM, Huub van Niekerk wrote: > Hi, > > I want to compile Octave 3.2.2 from source, because the versions offered by > Blastwave and Sunfreeware are outdated. I've downloaded and extracted the > code, and ran ./configure. It ends with this message: > > configure: error: g++ version 3.4.6 will probably fail to compile Octave > > Does anyone know why this "will probably fail"? > > Thanks. Because the failure has been reported multiple times and is due to bugs in gcc. It's not sure the bugs appear on all platforms and some of them also depend on configuration settings; you may try your luck, but the failure is highly likely. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From dasergatskov at gmail.com Mon Aug 3 00:33:46 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 3 Aug 2009 00:33:46 -0500 Subject: printing plots in 3.2.2 Message-ID: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> I did the following on self-compiled octave-3.2.2 on Fedora-11 x86_64: octave:1> plot(randn(10)) line 0: undefined variable: size octave:2> xlabel("X") octave:3> ylabel("Y") octave:4> title("Test") octave:5> print("-depsc2", "test_epsc2.eps") octave:6> print("-dpsc2", "test_psc2.ps") octave:7> print("-dpng", "test_png.png") === The observations: * "line 0: undefined variable: size" (does not show up on the subsequent plots!), appears to be benign * fonts on x11 terminal looks too small for my taste (smaller than used to be with 3.0.x) * eps file has really, really small fonts * ps fonts look OK, but entire figure shifted too much to the left "Y" label essentially cut off of the page * png file looks great This is all with a fairly recent cvs snapshot of gnuplot. FWIW. Dmitri. -- From nuncio.m at gmail.com Mon Aug 3 02:13:00 2009 From: nuncio.m at gmail.com (Nuncio M) Date: Mon, 3 Aug 2009 12:43:00 +0530 Subject: octave error Message-ID: <902312120908030013w4d3f7918iaea858f443f41d10@mail.gmail.com> Hi octavians, While compiling the script I got the following error error: octave_base_value::array_value(): wrong type argument `complex matrix' error: evaluating if command near line 29, column 2 error: evaluating for command near line 8, column 2 error: near line 57 of file `/home/nuncio/data/nodc/osd/file.m' following is the script addpath("/home/nuncio/matandoct/oceans") addpath("/home/nuncio/matandoct/seawater_ver3_2") ext='.txt'; prefix1='file_'; prefix2='file_splint_'; prefix3='file_brfr_'; for i=2410:2414 l=i; mid=int2str(l); infilename=[prefix1,mid,ext]; oufilename1=[prefix2,mid,ext]; oufilename2=[prefix3,mid,ext]; PR=1000.0; xx=load(infilename); mnth=xx(:,1); dday=xx(:,2); yyear=xx(:,3); llon=xx(:,4); llat=xx(:,5); lev=xx(:,6); tem=xx(:,7); sal=xx(:,8); disp(infilename); lev_n=[0:50]*2+1; sz=length(lev_n); sz1=length(lev); disp(lev(sz1)) if ((length(lev) >= 5) && (lev(sz1) > 80.0)) disp(infilename); tem_int=interp1(lev,tem,lev_n,'spline','extrap'); sal_int=interp1(lev,sal,lev_n,'spline','extrap'); S=sal_int; T=tem_int; P=lev_n; bf=bvfreq(S,T,P); nsqd=bf.*bf; dens= sw_dens(S,T,P); pden=sw_pden(S,T,P,PR); % writing tem and salinity to file--------- fid=fopen(oufilename1,"wt"); fprintf(fid,'%5.1f %3.1f %3.1f %7.2f %7.2f\n',vertcat(yyear(1),\ mnth(1),dday(1),llon(1),llat(1))) fprintf(fid,'%5.1f %9.3f %9.3f %10.3f \n',vertcat(lev_n,tem_int,\ sal_int,dens)); fclose(fid); % -------------------------------------- % Writing brufre tofile fid=fopen(oufilename2,"wt"); fprintf(fid,'%5.1f %3.1f %3.1f %7.2f %7.2f\n',vertcat(yyear(1),\ mnth(1),dday(1),llon(1),llat(1))) fprintf(fid,'%5.1f %9.3f\n',\ vertcat(lev_n(1:50),nsqd)); fclose(fid) % -------------------------------------- endif endfor -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090803/8cf8774e/attachment.html From sergstesh at yahoo.com Mon Aug 3 02:13:52 2009 From: sergstesh at yahoo.com (Sergei Steshenko) Date: Mon, 3 Aug 2009 00:13:52 -0700 (PDT) Subject: overloading the global new/delete operator in octave In-Reply-To: <1249238722.5560.13.camel@localhost> Message-ID: <920085.24526.qm@web35204.mail.mud.yahoo.com> --- On Sun, 8/2/09, Soeren Sonnenburg wrote: > From: Soeren Sonnenburg > Subject: overloading the global new/delete operator in octave > To: "Octave users list" > Date: Sunday, August 2, 2009, 11:45 AM > Dear all, > > I am a bit puzzled why my overloaded global new[] operator > does not > become effective when building a octave extension (it works > with > python/matlab though)... > > I declare something like > > void* operator new[](std::size_t size) throw > (std::bad_alloc) > { > ? ? printf("test\n"); > } > > DEFUN_DLD (sg, prhs, nlhs, "shogun.") > { > ? ? volatile int* foo = new int[2]; > } > > but don't see the test output... In the octave src I only > see in > oct-obj.h *local* overloading of new/delete but no more? > > I also wonder why the in this file new(size_t size, void*p) > function is > declared... looks to me like a nop - orhas this the same > cause...? > > ? // FIXME -- without this, I have errors with the > stack of > ? // octave_value_list objects in ov-usr-fcn.h.? > Why? > ? void *operator new (size_t size, void *p) > ? ? { return ::operator new (size, p); } > > Hmmhhh... > Soeren > -- > For the one fact about the future of which we can be > certain is that it > will be utterly fantastic. -- Arthur C. Clarke, 1962 > > -----Inline Attachment Follows----- > It's probably a (wrong) long shot, but try fprintf(stderr, "test\n"); - you know, (un)buffered output. Experimentally stdout sometimes takes a lot of time/output to get flushed. Regards, Sergei. From sergstesh at yahoo.com Mon Aug 3 02:15:35 2009 From: sergstesh at yahoo.com (Sergei Steshenko) Date: Mon, 3 Aug 2009 00:15:35 -0700 (PDT) Subject: Compiling Octave 3.2.2 on Solaris 10 Sparc: which gcc/g++? In-Reply-To: <44808e650908020931s1c1d1201pcd280952e5dfa5f@mail.gmail.com> Message-ID: <72632.69999.qm@web35203.mail.mud.yahoo.com> --- On Sun, 8/2/09, Huub van Niekerk wrote: > From: Huub van Niekerk > Subject: Compiling Octave 3.2.2 on Solaris 10 Sparc: which gcc/g++? > To: "help-octave" > Date: Sunday, August 2, 2009, 9:31 AM > Hi, > > I want to compile Octave 3.2.2 from source, because the > versions offered by Blastwave and Sunfreeware are outdated. > I've downloaded and extracted the code, and ran > ./configure. It ends with this message: > > > configure: error: g++ version 3.4.6 will probably fail to > compile Octave > > Does anyone know why this "will probably fail"? > > Thanks. > > Because gcc-3.4.6 does not support some needed C++ constructs. Regards, Sergei. From tmacchant at yahoo.co.jp Mon Aug 3 04:15:50 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Mon, 3 Aug 2009 18:15:50 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <786203326691974B9F4C5D69B748688A0F41D48407@kclexch01.kl.kcl.fi> Message-ID: <20090803091550.97189.qmail@web3807.mail.bbt.yahoo.co.jp> Hello The patch I have cosidered for octave_popen2 in iboctave/losyspep.cc See http://www.nabble.com/Re:-Plotting-with-3.2.0-on-Windows-is-SLOOOOOOWWWW-p24766712.html For the convenience to understand this problem I show the code of patched octave_popen2 function. ********** pid_t octave_popen2 (const std::string& cmd, const string_vector& args, bool sync_mode, int *fildes, std::string& msg) { pid_t pid; PROCESS_INFORMATION pi; STARTUPINFO si; std::string command = "\"" + cmd + "\""; HANDLE hProcess = GetCurrentProcess(), childRead, childWrite, parentRead, parentWrite; DWORD pipeMode; ZeroMemory (&pi, sizeof (pi)); ZeroMemory (&si, sizeof (si)); si.cb = sizeof (si); if (! CreatePipe (&childRead, &parentWrite, 0, 65536) || ! DuplicateHandle (hProcess, childRead, hProcess, &childRead, 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)) { msg = "popen2: pipe creation failed"; return -1; } if (! CreatePipe (&parentRead, &childWrite, 0, 0) || ! DuplicateHandle (hProcess, childWrite, hProcess, &childWrite, 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)) { msg = "popen2: pipe creation failed"; return -1; } if (! sync_mode) { pipeMode = PIPE_NOWAIT; SetNamedPipeHandleState (parentRead, &pipeMode, 0, 0); } fildes[1] = _open_osfhandle (reinterpret_cast (parentRead), _O_RDONLY | _O_BINARY); fildes[0] = _open_osfhandle (reinterpret_cast (parentWrite), _O_WRONLY | _O_BINARY); si.dwFlags |= STARTF_USESTDHANDLES; si.hStdInput = childRead; si.hStdOutput = childWrite; // Ignore first arg as it is the command for (int k=1; k Hi, > > > octave-3.2.0 occupied 99% cpu activity and thus I guessed that > > the speed gnuplot made slower and thus led to slooooow plotting. > > Such symptoms can arise if the lack of select() in Windows is worked around with something like > > time_t now = time(NULL); > while (time(NULL) < now + timeout) { > PeekNamedPipe(read_handle, NULL, 0, NULL, &len, NULL)); > if (len > 0) // data is available > break; > } > > which would consume all available CPU time until the program at the other end of the pipe has > written something. If this is the case, instead of treating the symptoms with changed process > priorities you might want to go closer to the root cause by adding a short sleep to the code, > e.g., > > DWORD sleeptime = 1; // 1 millisecond > time_t now = time(NULL); > while (time(NULL) < now + timeout) { > PeekNamedPipe(read_handle, NULL, 0, NULL, &len, NULL)); > if (len > 0) // data is available > break; > Sleep(sleeptime); > if (sleeptime < 64) > sleeptime *= 2; > } > > I don't know my way around Octave's C++ sources and couldn't find PeekNamedPipe in them, so I > don't really know if this is the case. The actual loop structure (if any) could involve calling > several functions and instead of PeekNamedPipe can, e.g., call an unblocking read. Anyway, I > hope this helps debugging. > > Cheers, Olli > > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From olli.saarela at gmail.com Mon Aug 3 05:41:02 2009 From: olli.saarela at gmail.com (Olli Saarela) Date: Mon, 3 Aug 2009 13:41:02 +0300 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW Message-ID: Hi, > octave-3.2.0 occupied 99% cpu activity and thus I guessed that > the speed gnuplot made slower and thus led to slooooow plotting. Such symptoms can arise if the lack of select() in Windows is worked around with something like time_t now = time(NULL); while (time(NULL) < now + timeout) { PeekNamedPipe(read_handle, NULL, 0, NULL, &len, NULL)); if (len > 0) // data is available break; } which would consume all available CPU time until the program at the other end of the pipe has written something. If this is the case, instead of treating the symptoms with changed process priorities you might want to go closer to the root cause by adding a short sleep to the code, e.g., DWORD sleeptime = 1; // 1 millisecond time_t now = time(NULL); while (time(NULL) < now + timeout) { PeekNamedPipe(read_handle, NULL, 0, NULL, &len, NULL)); if (len > 0) // data is available break; Sleep(sleeptime); if (sleeptime < 64) sleeptime *= 2; } I don?t know my way around Octave?s C++ sources and couldn?t find PeekNamedPipe in them, so I don?t really know if this is the case. The actual loop structure (if any) could involve calling several functions and instead of PeekNamedPipe can, e.g., call an unblocking read. Anyway, I hope this helps debugging. Cheers, Olli From olli.saarela at gmail.com Mon Aug 3 05:54:02 2009 From: olli.saarela at gmail.com (Olli Saarela) Date: Mon, 3 Aug 2009 13:54:02 +0300 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW Message-ID: I was looking for a CPU consuming loop in the C++ code, but there might actually be some in the script files. Does this help? *** __gnuplot_get_var__.m~ Tue Jun 9 23:22:14 2009 --- __gnuplot_get_var__.m Mon Aug 3 13:52:35 2009 *************** *** 125,135 **** fflush (ostream); str = {}; while (isempty (str)) str = char (fread (istream)'); ! if (! isempty (str)) str = regexp (str, "OCTAVE:.*", "match"); str = str{end}(8:end); endif fclear (istream); endwhile --- 125,137 ---- fflush (ostream); str = {}; while (isempty (str)) str = char (fread (istream)'); ! if (isempty (str)) ! sleep(0.05); ! else str = regexp (str, "OCTAVE:.*", "match"); str = str{end}(8:end); endif fclear (istream); endwhile On my multicore machine the tic-toc timing is practically the same, but cputime() shows a significant speed-up. Cheers, Olli > -----Original Message----- > From: Tatsuro MATSUOKA [mailto:tmacchant at yahoo.co.jp] > Sent: 3. elokuuta 2009 12:16 > To: Saarela Olli > Cc: help at octave.org > Subject: Re: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW > > Hello > > The patch I have cosidered for octave_popen2 in iboctave/losyspep.cc > > See > > http://www.nabble.com/Re:-Plotting-with-3.2.0-on-Windows-is- > SLOOOOOOWWWW-p24766712.html > > For the convenience to understand this problem I show the code of > patched octave_popen2 function. > > ********** > pid_t > octave_popen2 (const std::string& cmd, const string_vector& args, bool > sync_mode, > int *fildes, std::string& msg) > { > pid_t pid; > PROCESS_INFORMATION pi; > STARTUPINFO si; > std::string command = "\"" + cmd + "\""; > HANDLE hProcess = GetCurrentProcess(), childRead, childWrite, > parentRead, parentWrite; > DWORD pipeMode; > > ZeroMemory (&pi, sizeof (pi)); > ZeroMemory (&si, sizeof (si)); > si.cb = sizeof (si); > > if (! CreatePipe (&childRead, &parentWrite, 0, 65536) || > ! DuplicateHandle (hProcess, childRead, hProcess, &childRead, 0, > TRUE, DUPLICATE_SAME_ACCESS | > DUPLICATE_CLOSE_SOURCE)) > { > msg = "popen2: pipe creation failed"; > return -1; > } > if (! CreatePipe (&parentRead, &childWrite, 0, 0) || > ! DuplicateHandle (hProcess, childWrite, hProcess, &childWrite, > 0, TRUE, DUPLICATE_SAME_ACCESS | > DUPLICATE_CLOSE_SOURCE)) > { > msg = "popen2: pipe creation failed"; > return -1; > } > if (! sync_mode) > { > pipeMode = PIPE_NOWAIT; > SetNamedPipeHandleState (parentRead, &pipeMode, 0, 0); > } > fildes[1] = _open_osfhandle (reinterpret_cast (parentRead), > _O_RDONLY | _O_BINARY); > fildes[0] = _open_osfhandle (reinterpret_cast (parentWrite), > _O_WRONLY | _O_BINARY); > si.dwFlags |= STARTF_USESTDHANDLES; > si.hStdInput = childRead; > si.hStdOutput = childWrite; > > // Ignore first arg as it is the command > for (int k=1; k command += " \"" + args[k] + "\""; > OCTAVE_LOCAL_BUFFER (char, c_command, command.length () + 1); > strcpy (c_command, command.c_str ()); > if (! CreateProcess (0, c_command, 0, 0, TRUE, 0, 0, 0, &si, &pi)) > { > msg = "popen2: process creation failed"; > return -1; > } > SetPriorityClass(pi.hProcess, ABOVE_NORMAL_PRIORITY_CLASS); // added > line > pid = pi.dwProcessId; > > CloseHandle (childRead); > CloseHandle (childWrite); > CloseHandle (pi.hProcess); > CloseHandle (pi.hThread); > > return pid; > } > ******************* > > SetPriorityClass(pi.hProcess, ABOVE_NORMAL_PRIORITY_CLASS); // added > line > > This make the child process has always has the absolute higher priority > class. > If the parent process is octave and child process is gnuplot this is > realistic. > However in general sense I have an anxiety for this simple patch > > Your code is worth to be examined. > > Thanks!! > > Tatsuro > > --- Saarela Olli wrote: > > > Hi, > > > > > octave-3.2.0 occupied 99% cpu activity and thus I guessed that > > > the speed gnuplot made slower and thus led to slooooow plotting. > > > > Such symptoms can arise if the lack of select() in Windows is worked > around with something like > > > > time_t now = time(NULL); > > while (time(NULL) < now + timeout) { > > PeekNamedPipe(read_handle, NULL, 0, NULL, &len, NULL)); > > if (len > 0) // data is available > > break; > > } > > > > which would consume all available CPU time until the program at the > other end of the pipe has > > written something. If this is the case, instead of treating the > symptoms with changed process > > priorities you might want to go closer to the root cause by adding a > short sleep to the code, > > e.g., > > > > DWORD sleeptime = 1; // 1 millisecond > > time_t now = time(NULL); > > while (time(NULL) < now + timeout) { > > PeekNamedPipe(read_handle, NULL, 0, NULL, &len, NULL)); > > if (len > 0) // data is available > > break; > > Sleep(sleeptime); > > if (sleeptime < 64) > > sleeptime *= 2; > > } > > > > I don't know my way around Octave's C++ sources and couldn't find > PeekNamedPipe in them, so I > > don't really know if this is the case. The actual loop structure (if > any) could involve calling > > several functions and instead of PeekNamedPipe can, e.g., call an > unblocking read. Anyway, I > > hope this helps debugging. > > > > Cheers, Olli > > > > > > > -------------------------------------- > Power up the Internet with Yahoo! Toolbar. > http://pr.mail.yahoo.co.jp/toolbar/ -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090803/fca22b74/attachment.html From anwesha_dastidar at mindtree.com Mon Aug 3 07:09:26 2009 From: anwesha_dastidar at mindtree.com (AGD) Date: Mon, 3 Aug 2009 05:09:26 -0700 (PDT) Subject: Thinning algorithm In-Reply-To: <1249026035.4050.6.camel@sh-t400> References: <24751355.post@talk.nabble.com> <1249026035.4050.6.camel@sh-t400> Message-ID: <24789602.post@talk.nabble.com> Hi, Apparently Matlab has a command for the thinning proces. The format looks something like this: BW2=bwmorph(BW,'remove'); where 'remove' is a function that eliminates the interior pixels; something similar to thinning. However this format does not work in Octave even though there is a bwmorph command in the image package. If someone has an idea about this then please give in your solutions. Thanks S?ren Hauberg wrote: > > Hi > > I don't know what you mean when you write "thinning algorithm", so I > can't help you there. To me it sounds like you're asking a question > about image processing, and not really about Octave, so I recommend that > you ask your questions somewhere related to image processing. > > As to how you convert an image to a binary image, then the easiest form > is a simple thresholding, i.e. > > bw = (im > 0.5); > > as an example. > > To get a basic understanding of image processing in Octave, I recommend > reading the introductory chapter of the manual plus the chapter on image > processing. From thereon, the best you can do is to play around a bit. > Just try things out (that never hurts). It is usually the best way to > figure things out in Octave. > > S?ren > > tor, 30 07 2009 kl. 22:46 -0700, skrev AGD: >> Hi all, >> >> I need some help regarding thinning algorithm in Octave. Is it necessary >> to >> convert every image to a binary form? If yes, then what is the procedure? >> Can anyone refer me to a site which provides online guidance through the >> basic image processing commands in Octave? >> >> Thanks, >> AGD > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > -- View this message in context: http://www.nabble.com/Thinning-algorithm-tp24751355p24789602.html Sent from the Octave - General mailing list archive at Nabble.com. From soren at hauberg.org Mon Aug 3 08:02:59 2009 From: soren at hauberg.org (=?ISO-8859-1?Q?S=F8ren?= Hauberg) Date: Mon, 03 Aug 2009 15:02:59 +0200 Subject: Thinning algorithm In-Reply-To: <24789602.post@talk.nabble.com> References: <24751355.post@talk.nabble.com> <1249026035.4050.6.camel@sh-t400> <24789602.post@talk.nabble.com> Message-ID: <1249304579.3600.14.camel@sh-t400> man, 03 08 2009 kl. 05:09 -0700, skrev AGD: > Apparently Matlab has a command for the thinning proces. The format looks > something like this: > > BW2=bwmorph(BW,'remove'); > > where 'remove' is a function that eliminates the interior pixels; something > similar to thinning. > However this format does not work in Octave even though there is a bwmorph > command in the image package. Did we forget to implement the 'remove' option (I don't have the code right here, so I can't check)? You can just do something like (untested code) interior = bwmorph (BW, 'erode'); BW2 = BW - interior; S?ren From christy1865 at yahoo.com Mon Aug 3 08:20:04 2009 From: christy1865 at yahoo.com (Kristen Richter) Date: Mon, 3 Aug 2009 06:20:04 -0700 (PDT) Subject: Figure Position Message-ID: <313670.73604.qm@web30208.mail.mud.yahoo.com> Hello all, I am attempting to apply the position property to several figures in order them to tile them across the screen. After reading the online Matlab manual, it seems like the appropriate commands are figure('Position',[left bottom width height]) or even set(figure(#),'Position',[left bottom width height]) However, using these commands in Octave only produces a figure that auto-tiles with my command window. When I query get(figure(#),'Position'), I get my input back, as if the figure created was actually at this position. And I've double-triple-checked the units I'm using. Once, in my harried quest to get this working, I managed to change the offset of the auto-tiling, but reviewing over my command history, I cannot seem to reproduce this. I've spent some time searching wikis for problems other people have posted and reading a little over the archives (since Jan-09) of this mailing list and haven't found anything similar to what I am experiencing, though I understand that Octave and gnuplot may be unaware of any resizing or change in position that I do with my mouse. I'm not sure if this is an area where development for Octave hasn't reached, but the 'Position' property seems like a commonly used handle. Any light that could be shed on this situation would be greatly appreciated. And I'm running the latest version of octave, 3.2.0, compiled in Ubuntu without arpack (couldn't get this working). -Kristen From sonne at debian.org Mon Aug 3 08:45:31 2009 From: sonne at debian.org (Soeren Sonnenburg) Date: Mon, 03 Aug 2009 15:45:31 +0200 Subject: overloading the global new/delete operator in octave In-Reply-To: <920085.24526.qm@web35204.mail.mud.yahoo.com> References: <920085.24526.qm@web35204.mail.mud.yahoo.com> Message-ID: <1249307131.4878.1.camel@localhost> On Mon, 2009-08-03 at 00:13 -0700, Sergei Steshenko wrote: > > > --- On Sun, 8/2/09, Soeren Sonnenburg wrote: > > > From: Soeren Sonnenburg > > Subject: overloading the global new/delete operator in octave > > To: "Octave users list" > > Date: Sunday, August 2, 2009, 11:45 AM > > Dear all, > > > > I am a bit puzzled why my overloaded global new[] operator > > does not > > become effective when building a octave extension (it works > > with > > python/matlab though)... [...] > It's probably a (wrong) long shot, but try > > fprintf(stderr, "test\n"); > > - you know, (un)buffered output. Experimentally stdout sometimes takes a > lot of time/output to get flushed. That was not the cause (and I still don't know what could potentially cause it). However, I managed to create a an isolated toy example which works just fine :-) So there could be a problem related to interactions between the two libraries I link against (which in fact implement this overloading...). Anyway working isolated example follows: #include #include #include #include #include void* operator new(std::size_t size) throw (std::bad_alloc) { void *p=malloc(size); fprintf(stderr, "alloc %p %lld\n", p, (long long int) size); return p; } void operator delete(void *p) { fprintf(stderr, "free %p\n", p); if (p) free(p); } void* operator new[](std::size_t size) throw (std::bad_alloc) { void *p=malloc(size); fprintf(stderr, "alloc[] %p %lld\n", p, (long long int) size); return p; } void operator delete[](void *p) { fprintf(stderr, "free[] %p\n", p); if (p) free(p); } DEFUN_DLD (shogun, prhs, nlhs, "shogun.") { fprintf(stderr, "start\n"); volatile int* foo = new int[2]; delete[] foo; fprintf(stderr, "end\n"); return octave_value_list(); } Soeren -- For the one fact about the future of which we can be certain is that it will be utterly fantastic. -- Arthur C. Clarke, 1962 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090803/492433f3/attachment.bin From wlmd888 at yahoo.com Mon Aug 3 14:21:05 2009 From: wlmd888 at yahoo.com (david) Date: Mon, 3 Aug 2009 12:21:05 -0700 (PDT) Subject: PDE question Message-ID: <879624.51207.qm@web45504.mail.sp1.yahoo.com> Hi, I am looking for the Partial differential equation toolbox for Octave, similar as matlab, in particular, ode45.m, odeset.m, pdeintrp.m. Does anyone know if these functions are available somewhere? Thank you very much! From shermanj at umd.edu Mon Aug 3 14:35:52 2009 From: shermanj at umd.edu (James Sherman Jr.) Date: Mon, 3 Aug 2009 15:35:52 -0400 Subject: PDE question In-Reply-To: <879624.51207.qm@web45504.mail.sp1.yahoo.com> References: <879624.51207.qm@web45504.mail.sp1.yahoo.com> Message-ID: <6800c3890908031235q6222c86bjb81272bee8515e38@mail.gmail.com> I believe you're looking for the OdePkg package from octave-forge. http://octave.sourceforge.net/packages.html On Mon, Aug 3, 2009 at 3:21 PM, david wrote: > > Hi, > > I am looking for the Partial differential equation toolbox for Octave, similar as matlab, in particular, ode45.m, odeset.m, pdeintrp.m. Does anyone know if these functions are available somewhere? > > Thank you very much! > > > > > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > From wlmd888 at yahoo.com Mon Aug 3 14:46:14 2009 From: wlmd888 at yahoo.com (david) Date: Mon, 3 Aug 2009 12:46:14 -0700 (PDT) Subject: PDE question In-Reply-To: <6800c3890908031235q6222c86bjb81272bee8515e38@mail.gmail.com> Message-ID: <346595.95686.qm@web45502.mail.sp1.yahoo.com> --- On Mon, 8/3/09, James Sherman Jr. wrote: Thank you for your helpful info. I found odeset.m and ode45.m from odepkg, but not pdeintrp.m, does anyone know where I can find pdeintrp.m? Thanks a lot! > From: James Sherman Jr. > Subject: Re: PDE question > To: "david" > Cc: help-octave at octave.org > Date: Monday, August 3, 2009, 12:35 PM > I believe you're looking for the > OdePkg package from octave-forge. > > http://octave.sourceforge.net/packages.html > > On Mon, Aug 3, 2009 at 3:21 PM, david > wrote: > > > > Hi, > > > > I am looking for the Partial differential equation > toolbox for Octave, similar as matlab, in particular, > ode45.m, odeset.m, pdeintrp.m. Does anyone know if these > functions are available somewhere? > > > > Thank you very much! > > > > > > > > > > > > > > _______________________________________________ > > Help-octave mailing list > > Help-octave at octave.org > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > From bpabbott at mac.com Mon Aug 3 17:58:31 2009 From: bpabbott at mac.com (Ben Abbott) Date: Mon, 03 Aug 2009 18:58:31 -0400 Subject: Figure Position In-Reply-To: <313670.73604.qm@web30208.mail.mud.yahoo.com> References: <313670.73604.qm@web30208.mail.mud.yahoo.com> Message-ID: <0978FD6F-59E5-46F7-B4B7-4393894B8546@mac.com> On Aug 3, 2009, at 9:20 AM, Kristen Richter wrote: > Hello all, > > I am attempting to apply the position property to several figures in > order them to tile them across the screen. After reading the online > Matlab > manual, it seems like the appropriate commands are > > figure('Position',[left bottom width height]) > or even set(figure(#),'Position',[left bottom width height]) > > However, using these commands in Octave only produces a figure that > auto-tiles with my command window. When I query > get(figure(#),'Position'), I get my input back, as if the figure > created was actually at this position. And I've double-triple- > checked the units I'm using. > > Once, in my harried quest to get this working, I managed to change > the offset of the auto-tiling, but reviewing over my command > history, I cannot seem to reproduce this. > > I've spent some time searching wikis for problems other people have > posted and reading a little over the archives (since Jan-09) of this > mailing list and haven't found anything similar to what I am > experiencing, though I understand that Octave and gnuplot may be > unaware of any resizing or change in position that I do with my > mouse. I'm not sure if this is an area where development for Octave > hasn't reached, but the 'Position' property seems like a commonly > used handle. > > Any light that could be shed on this situation would be greatly > appreciated. > And I'm running the latest version of octave, 3.2.0, compiled in > Ubuntu without arpack (couldn't get this working). > > -Kristen Hi Kristen, Unfortunately, Octave's handle graphics are not yet fully compatible with Matlab. The figure position property is only partially compatible. To place the figure you need to be running gnuplot 4.2.5 or later and octave 3.2.x. When creating a figure, you can set the figure's position by figure (h, "position", [xLL, yLL, width, height]) For example ... figure(1,"position",get(0,"screensize")([3,4,3,4]).*[0.1 0.2 0.8 0.7]) Once the plot stream to gnuplot is open, it is no longer possible to can the the figures position (unless someone wants to write the necessary code to communicate with x11). Ben From tmacchant at yahoo.co.jp Mon Aug 3 18:24:23 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Tue, 4 Aug 2009 08:24:23 +0900 (JST) Subject: PDE question In-Reply-To: <346595.95686.qm@web45502.mail.sp1.yahoo.com> Message-ID: <20090803232423.86425.qmail@web3803.mail.bbt.yahoo.co.jp> Hello To my knowledge pdeintrp.m is not implemented to octave and octave-forge. By searching pde related keywords, I found that BIM - Box Integration Method Package for Octave (ocatve-forge package) may be used for PDE. http://octave.sourceforge.net/doc/BIM.html#Computationfunctions I found the thread the following http://www.nabble.com/Solving-PDE--novice-question-td23033302.html Regards Tatsuro --- david wrote: > > > > --- On Mon, 8/3/09, James Sherman Jr. wrote: > Thank you for your helpful info. I found odeset.m and ode45.m from odepkg, but not pdeintrp.m, > does anyone know where I can find pdeintrp.m? > > Thanks a lot! > > > > > From: James Sherman Jr. > > Subject: Re: PDE question > > To: "david" > > Cc: help-octave at octave.org > > Date: Monday, August 3, 2009, 12:35 PM > > I believe you're looking for the > > OdePkg package from octave-forge. > > > > http://octave.sourceforge.net/packages.html > > > > On Mon, Aug 3, 2009 at 3:21 PM, david > > wrote: > > > > > > Hi, > > > > > > I am looking for the Partial differential equation > > toolbox for Octave, similar as matlab, in particular, > > ode45.m, odeset.m, pdeintrp.m. Does anyone know if these > > functions are available somewhere? > > > > > > Thank you very much! > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Help-octave mailing list > > > Help-octave at octave.org > > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > > > > > > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From carlo.defalco at gmail.com Mon Aug 3 18:27:26 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Tue, 4 Aug 2009 01:27:26 +0200 Subject: PDE question In-Reply-To: <346595.95686.qm@web45502.mail.sp1.yahoo.com> References: <346595.95686.qm@web45502.mail.sp1.yahoo.com> Message-ID: On 3 Aug 2009, at 21:46, david wrote: > Thank you for your helpful info. I found odeset.m and ode45.m from > odepkg, but not pdeintrp.m, does anyone know where I can find > pdeintrp.m? > > Thanks a lot! "pdeintrp" is from the PDE toolbox, the octave-forge package containing (mostly) the same functionalities (though with no attempt whatsoever at implementing a compatible interface) as the PDE toolbox is "bim". There is no implementation of the "pdeintrp" function itself in 'bim', as I considered it too trivial. it would be easy to add it as follows (note that the copyright notice and the doc string take more space than the function body itself): ------------------------------------------------------------------------ ## Copyright (C) 2009 Carlo de Falco ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, see ## . ## -*- texinfo -*- ## @deftypefn {Function File} {@var{ut} =} pdeintrp (@var{p}, @var{t}, @var{un}) ## Compute the values @var{ut} of a function interpolated linearly at triangle midpoints ## of a triangulation defined by @var{p}, @var{t} given the nodal values @var{un}. ## @end deftypefn ## Author: Carlo de Falco ## Created: 2009-08-04 function ut = pdeintrp (p, t, un) ut = sum (un(t(1:3,:)),1)/3; endfunction ------------------------------------------------------------------------------- c. From bpabbott at mac.com Mon Aug 3 18:59:40 2009 From: bpabbott at mac.com (Ben Abbott) Date: Mon, 03 Aug 2009 19:59:40 -0400 Subject: printing plots in 3.2.2 In-Reply-To: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> References: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> Message-ID: On Aug 3, 2009, at 1:33 AM, Dmitri A. Sergatskov wrote: > I did the following on self-compiled octave-3.2.2 on Fedora-11 x86_64: > > octave:1> plot(randn(10)) > line 0: undefined variable: size > > octave:2> xlabel("X") > octave:3> ylabel("Y") > octave:4> title("Test") > octave:5> print("-depsc2", "test_epsc2.eps") > octave:6> print("-dpsc2", "test_psc2.ps") > octave:7> print("-dpng", "test_png.png") > > === > > The observations: > > * "line 0: undefined variable: size" (does not show up on the > subsequent plots!), > appears to be benign > > * fonts on x11 terminal looks too small for my taste (smaller than > used > to be with 3.0.x) > > * eps file has really, really small fonts > > * ps fonts look OK, but entire figure shifted too much to the left > "Y" label essentially cut off of the page > > * png file looks great > > This is all with a fairly recent cvs snapshot of gnuplot. > > FWIW. > > Dmitri. The "line 0: undefined variable: size" error is from gnuplot. It appears that this is due to a bug in the pipe to gnuplot. Unfortunately, I don't get the error so I'm unable to try to track it down. The x11 fonts may be modified by specifying a default font. set (0, "defaultaxesfontname", "Helveitica") set (0, "defaulttextfontname", "Helvetica") or by changing the default fontsize set (0, "defaultaxesfontsize", 12) set (0, "defaulttextfontsize", 12) In any event, in 3.0.x the default fontname was "Helvetica" for 3.2 is it "*". Which implies that x11 will use its default. Gnuplot scales down the fontsize for eps files. You can compensate by increasing the fontsize. For example, set (findall (gcf, "-property", "fontsize"), 20) The ps output is likely a problem because you're figure papersize/ paperposition properties are set to the size for a US letter (8.5x11in). If you change these to A4, you should get what you expect. As we don't yet have listeners in place for conversion of units, be sure to set those properties with units == "inches". Ben From matthias.brennwald at eawag.ch Mon Aug 3 11:16:22 2009 From: matthias.brennwald at eawag.ch (Matthias Brennwald) Date: Mon, 03 Aug 2009 18:16:22 +0200 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: References: Message-ID: <4A770D56.3010205@brennwald.org> help-octave-request at octave.org wrote: Dear all I promised to confirm my versions of Windows XP. I have Windows XP Professional on both of my machines (VirtualBox on Apple MacBook and a Pentium-4). In the meantime I upgraded the memory of the Pentium machine from 256 MB to 4 GB, but this did not help much with the slowness. From the posts by Tatsuro, John and Olli I take that there is an issue related to the process priorities in Octave/gnuplot on Windows. So I guess it was not me doing something wrong... Thanks for the great support! Matthias From amrit at wisc.edu Mon Aug 3 14:45:13 2009 From: amrit at wisc.edu (Rishi Amrit) Date: Mon, 3 Aug 2009 14:45:13 -0500 Subject: local variables in debugger : Octave 3.2.2 Message-ID: Hi, I have a keyboard statement inside a function which I am calling from my main script. When Octave stops in the debug mode, I dont see the variables in the scope of that function. I only see the variables in the out main script. Eg: main.m: a=1; b=2; fun2; fun2.m function fun2 c=1; d=2; keyboard Now when I run, octave> main keyboard: stopped in fun2.m octave> who a b Why am I not seeing the local variables ? This was not the case in Octave 3.0.5. Seems to be there in Octave 3.2.2. Any ideas on what changed ? Thanks, Rishi -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090803/265ed8c7/attachment.html From dasergatskov at gmail.com Mon Aug 3 21:09:04 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 3 Aug 2009 21:09:04 -0500 Subject: printing plots in 3.2.2 In-Reply-To: References: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> Message-ID: <892b16670908031909o59ade1e9pe028f8152edbe0b5@mail.gmail.com> On Mon, Aug 3, 2009 at 6:59 PM, Ben Abbott wrote: > The "line 0: undefined variable: size" error is from gnuplot. It appears > that this is due to a bug in the pipe to gnuplot. Unfortunately, I don't get > the error so I'm unable to try to track it down. > Ok. I do not see it with octave 3.0.5 -- again fwiw > The x11 fonts may be modified by specifying a default font. > > ? ? ? ?set (0, "defaultaxesfontname", "Helveitica") > ? ? ? ?set (0, "defaulttextfontname", "Helvetica") > > or by changing the default fontsize > > ? ? ? ?set (0, "defaultaxesfontsize", 12) > ? ? ? ?set (0, "defaulttextfontsize", 12) > > In any event, in 3.0.x the default fontname was "Helvetica" for 3.2 is it > "*". Which implies that x11 will use its default. > > Gnuplot scales down the fontsize for eps files. You can compensate by > increasing the fontsize. For example, > > set (findall (gcf, "-property", "fontsize"), 20) > I know that. Using different font does not seem to help. To get the fonts to an acceptable size in eps, I need to set their size to 24 that makes x11 plots look grotesque. Again this is definitely change with 3.2.2 vs 3.0.5. I am using both on the same computer with the same gnuplot. It appers to me that with 3.2.2 the size of picture in eps has increased but fonts remein the same, so the fonts _for the given picture size_ become too small. > The ps output is likely a problem because you're figure > papersize/paperposition properties are set to the size for a US letter > (8.5x11in). If you change these to A4, you should get what you expect. As we > don't yet have listeners in place for conversion of units, be sure to set > those properties with units == "inches". > I have this problem while running "./run-octave --no-init-file" in the top level source-tree directory. So octave uses defaults. The postscript prolog has BoundingBox defined as: %%BoundingBox: 50 50 612 792 If I change it to %%BoundingBox: 0 0 612 792 I get standard letter-size page and the figure looks about right. (A4 pagesize would be 595 848, if I remember correctly) > Ben > > Dmitri. From dasergatskov at gmail.com Mon Aug 3 21:46:54 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 3 Aug 2009 21:46:54 -0500 Subject: printing plots in 3.2.2 In-Reply-To: References: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> Message-ID: <892b16670908031946x5c26c2d4u4526239187d8f5b1@mail.gmail.com> On Mon, Aug 3, 2009 at 6:59 PM, Ben Abbott wrote: > The "line 0: undefined variable: size" error is from gnuplot. It appears > that this is due to a bug in the pipe to gnuplot. Unfortunately, I don't get > the error so I'm unable to try to track it down. I got a fresh CVS snapshot of gnuplot and this error is gone. Sincerely, Dmitri. -- From anwesha_dastidar at mindtree.com Tue Aug 4 00:31:34 2009 From: anwesha_dastidar at mindtree.com (AGD) Date: Mon, 3 Aug 2009 22:31:34 -0700 (PDT) Subject: pixel conversion Message-ID: <24802550.post@talk.nabble.com> Hi all, Is there a direct command to convert an entire matrix of 0's and 1's to 0's and 255's respectively? Thanks -- View this message in context: http://www.nabble.com/pixel-conversion-tp24802550p24802550.html Sent from the Octave - General mailing list archive at Nabble.com. From anwesha_dastidar at mindtree.com Tue Aug 4 00:51:11 2009 From: anwesha_dastidar at mindtree.com (AGD) Date: Mon, 3 Aug 2009 22:51:11 -0700 (PDT) Subject: pixel conversion Message-ID: <24802550.post@talk.nabble.com> Hi all, Is there a direct command to convert an entire matrix of 0's and 1's to 0's and 255's respectively? And is there a way to invert the pixel values of 1 and 0 in the matrix? (32X32) Thanks -- View this message in context: http://www.nabble.com/pixel-conversion-tp24802550p24802550.html Sent from the Octave - General mailing list archive at Nabble.com. From soren at hauberg.org Tue Aug 4 01:52:45 2009 From: soren at hauberg.org (=?ISO-8859-1?Q?S=F8ren?= Hauberg) Date: Tue, 04 Aug 2009 08:52:45 +0200 Subject: pixel conversion In-Reply-To: <24802550.post@talk.nabble.com> References: <24802550.post@talk.nabble.com> Message-ID: <1249368765.4352.3.camel@sh-t400> man, 03 08 2009 kl. 22:51 -0700, skrev AGD: > Is there a direct command to convert an entire matrix of 0's and 1's to 0's > and 255's respectively? B = 255 * A; > And is there a way to invert the pixel values of 1 and 0 in the matrix? > (32X32) B = 1 - A; S?ren From tmacchant at yahoo.co.jp Tue Aug 4 02:30:23 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Tue, 4 Aug 2009 16:30:23 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <4A770D56.3010205@brennwald.org> Message-ID: <20090804073023.88308.qmail@web3805.mail.bbt.yahoo.co.jp> Hello --- Matthias Brennwald wrote: > help-octave-request at octave.org wrote: > > Dear all > > I promised to confirm my versions of Windows XP. I have Windows XP > Professional on both of my machines (VirtualBox on Apple MacBook and a > Pentium-4). In the meantime I upgraded the memory of the Pentium machine > from 256 MB to 4 GB, but this did not help much with the slowness. This issue comes from task scheduling between the parent (octave ) and child (gnuplot) processes. T The cpu of my computer in university is pentium with hyper threaded. It has a two logical core so that task scheduling problem is not sever. > From the posts by Tatsuro, John and Olli I take that there is an issue > related to the process priorities in Octave/gnuplot on Windows. So I > guess it was not me doing something wrong... Thank you for your reporting the issue. Your post have revealed an important points for octave for windows. > Thanks for the great support! I have not enough time to try the proposal of the Olli but until this week end I will try and report here. The modification will be implemented in the next release of octave for windows. Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From highegg at gmail.com Tue Aug 4 02:59:02 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Tue, 4 Aug 2009 09:59:02 +0200 Subject: problem with acos In-Reply-To: <19056.36423.298575.9098@segfault.lan> References: <24698044.post@talk.nabble.com> <19055.4681.660260.677700@segfault.lan> <24714856.post@talk.nabble.com> <19056.30541.267198.892694@segfault.lan> <24723052.post@talk.nabble.com> <19056.31877.947356.170980@segfault.lan> <19056.36423.298575.9098@segfault.lan> Message-ID: <69d8d540908040059k53e1a640i970ef326764da79@mail.gmail.com> On Wed, Jul 29, 2009 at 8:00 PM, John W. Eaton wrote: > On 29-Jul-2009, John W. Eaton wrote: > > | This discussion brings up an implementation question: ?should Octave > | switch to complex acos if the some of the arguments are real and > | outside the range [-1, 1]? ?I suppose that makes the most sense. > > I see that this was already done for asin, but somehow we missed > acos. ?I checked in the following change. > > ?http://hg.savannah.gnu.org/hgweb/octave/rev/bcdf878e2686 > > Jaroslav, I think this should be safe to apply to the 3.2.x branch. > > Thanks, > > jwe > Done. Btw., it would help me a little if you avoided extending previously created ChangeLog entries and rather started new ones. That way, the transplant does not require manual intervention. Anyway, I think that extending a previous entry is only sensible if the patches are related. cheers -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From tmacchant at yahoo.co.jp Tue Aug 4 03:56:39 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Tue, 4 Aug 2009 17:56:39 +0900 (JST) Subject: How can I get successive plot on octave 3.2 as was obtained in octave 3.0.x Message-ID: <20090804085639.14594.qmail@web3804.mail.bbt.yahoo.co.jp> Hello Please execute the attached on octave 3.0.x and octave 3.2.x. This script is demonstration of Thermal diffusive Equation in one dimension. In octave 3.0.x, the successive plots worked fine. However!! In octave 3.2.x, the screen flashes every new plot, it is not ease to see. In addition, in fltk back end only final graph is plotted (mingw). Perhaps this is due to the change in plotting routine in octave 3.2 How can I get the successive plots, which can be done in octave 3.0.x, on octave 3.2.x? Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ -------------- next part -------------- A non-text attachment was scrubbed... Name: exdiff_en.m Type: application/x-unknown Size: 2023 bytes Desc: 98020253-exdiff_en.m Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090804/27f1496a/attachment.bin From highegg at gmail.com Tue Aug 4 04:57:33 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Tue, 4 Aug 2009 11:57:33 +0200 Subject: local variables in debugger : Octave 3.2.2 In-Reply-To: References: Message-ID: <69d8d540908040257x90c6b22sbc6bea4b579e2abb@mail.gmail.com> On Mon, Aug 3, 2009 at 9:45 PM, Rishi Amrit wrote: > Hi, > > ??? I have a keyboard statement inside a function which I am calling from my > main script. When Octave stops in the debug mode, I dont see the variables > in the scope of that function. I only see the variables in the out main > script. Eg: > > main.m: > > a=1; b=2; > fun2; > > > fun2.m > function fun2 > c=1; d=2; > keyboard > > > > Now when I run, > > octave> main > keyboard: stopped in fun2.m > octave> who > a??? b > > > Why am I not seeing the local variables ? This was not the case in Octave > 3.0.5. Seems to be there in Octave 3.2.2. Any ideas on what changed ? > > Thanks, > > Rishi I think the following patch is in order: http://hg.savannah.gnu.org/hgweb/octave/rev/fb22dd5d6242 there's no need to skip the built-in function stack frame, because get_debug_input already does that all right, and there's no need to save and restore the frame, because do_keyboard does it. John, can you check it out? I hope this didn't spoil something else. regards -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From bpabbott at mac.com Tue Aug 4 06:30:15 2009 From: bpabbott at mac.com (Ben Abbott) Date: Tue, 04 Aug 2009 07:30:15 -0400 Subject: printing plots in 3.2.2 In-Reply-To: <892b16670908031909o59ade1e9pe028f8152edbe0b5@mail.gmail.com> References: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> <892b16670908031909o59ade1e9pe028f8152edbe0b5@mail.gmail.com> Message-ID: <5384153F-54EA-400F-B651-A0EE4FD860B0@mac.com> On Aug 3, 2009, at 10:09 PM, Dmitri A. Sergatskov wrote: > On Mon, Aug 3, 2009 at 6:59 PM, Ben Abbott wrote: >> The "line 0: undefined variable: size" error is from gnuplot. It >> appears >> that this is due to a bug in the pipe to gnuplot. Unfortunately, I >> don't get >> the error so I'm unable to try to track it down. >> > > Ok. I do not see it with octave 3.0.5 -- again fwiw > >> The x11 fonts may be modified by specifying a default font. >> >> set (0, "defaultaxesfontname", "Helveitica") >> set (0, "defaulttextfontname", "Helvetica") >> >> or by changing the default fontsize >> >> set (0, "defaultaxesfontsize", 12) >> set (0, "defaulttextfontsize", 12) >> >> In any event, in 3.0.x the default fontname was "Helvetica" for 3.2 >> is it >> "*". Which implies that x11 will use its default. >> >> Gnuplot scales down the fontsize for eps files. You can compensate by >> increasing the fontsize. For example, >> >> set (findall (gcf, "-property", "fontsize"), 20) > > I know that. Using different font does not seem to help. To get the > fonts > to an acceptable size in eps, I need to set their size to 24 that > makes x11 plots look grotesque. The scaling down of fonts is done by gnuplot. It should be possible to compensate and have octave double the point size of all fonts for eps- output, but I don't have the time right now. > Again this is definitely change with 3.2.2 vs 3.0.5. > I am using both on the same computer with the same gnuplot. > It appers to me that with 3.2.2 the size of picture in eps has > increased > but fonts remein the same, so the fonts _for the given picture size_ > become too small. The eps output was modified to be consistent with how Matlab works. The size of the eps image should coincide with the width and height specified by the figure's paperposition property. >> The ps output is likely a problem because you're figure >> papersize/paperposition properties are set to the size for a US >> letter >> (8.5x11in). If you change these to A4, you should get what you >> expect. As we >> don't yet have listeners in place for conversion of units, be sure >> to set >> those properties with units == "inches". > > I have this problem while running "./run-octave --no-init-file" in the > top level source-tree directory. So octave uses defaults. > The postscript prolog has BoundingBox defined as: > > %%BoundingBox: 50 50 612 792 > > If I change it to > > %%BoundingBox: 0 0 612 792 > > I get standard letter-size page and the figure looks about right. > > (A4 pagesize would be 595 848, if I remember correctly) Ok, I had infered you were looking at the printed page, not the ps file itself. What software are you using to view the ps output? Ben From olaf.till at uni-jena.de Tue Aug 4 06:35:47 2009 From: olaf.till at uni-jena.de (Olaf Till) Date: Tue, 4 Aug 2009 13:35:47 +0200 Subject: Too many arguments? Message-ID: <20090804113547.GA7628@olaf> Hallo, is Octave supposed to complain if a function is called with too many arguments? (In the recent version and in the future --- have only tested with 3.0.5.) Thanks, Olaf From soren at hauberg.org Tue Aug 4 06:49:15 2009 From: soren at hauberg.org (=?ISO-8859-1?Q?S=F8ren?= Hauberg) Date: Tue, 04 Aug 2009 13:49:15 +0200 Subject: Too many arguments? In-Reply-To: <20090804113547.GA7628@olaf> References: <20090804113547.GA7628@olaf> Message-ID: <1249386555.3875.56.camel@sh-t400> tir, 04 08 2009 kl. 13:35 +0200, skrev Olaf Till: > is Octave supposed to complain if a function is called with too many > arguments? (In the recent version and in the future --- have only > tested with 3.0.5.) That is the responsibility of the individual function. Most functions do not complain when given too many arguments, but some do. S?ren From carlo.defalco at gmail.com Tue Aug 4 06:56:11 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Tue, 4 Aug 2009 13:56:11 +0200 Subject: Too many arguments? In-Reply-To: <1249386555.3875.56.camel@sh-t400> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> Message-ID: <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> 2009/8/4 S?ren Hauberg : > tir, 04 08 2009 kl. 13:35 +0200, skrev Olaf Till: >> is Octave supposed to complain if a function is called with too many >> arguments? (In the recent version and in the future --- have only >> tested with 3.0.5.) > > That is the responsibility of the individual function. Most functions do > not complain when given too many arguments, but some do. > > S?ren for a minimalistic approach to checking for consistency of input parameters you could use "nargchk" c. From olaf.till at uni-jena.de Tue Aug 4 07:24:54 2009 From: olaf.till at uni-jena.de (Olaf Till) Date: Tue, 4 Aug 2009 14:24:54 +0200 Subject: Too many arguments? In-Reply-To: <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> Message-ID: <20090804122454.GB8268@olaf> On Tue, Aug 04, 2009 at 01:56:11PM +0200, Carlo de Falco wrote: > 2009/8/4 S?ren Hauberg : > > tir, 04 08 2009 kl. 13:35 +0200, skrev Olaf Till: > >> is Octave supposed to complain if a function is called with too many > >> arguments? (In the recent version and in the future --- have only > >> tested with 3.0.5.) > > > > That is the responsibility of the individual function. Most functions do > > not complain when given too many arguments, but some do. > > > > S?ren > > for a minimalistic approach to checking for consistency of input > parameters you could use "nargchk" > > c. Thanks --- but I do not mean what the function can do to check the arguments count, but what Octave itself is supposed to do in the future. In Matlab, one cannot call a function with more arguments than listed in the functions header. I do _not_ want this behavior. In Octave 3.0.5, luckily calling a function with too many arguments is possible. But I would like to make sure that future versions of Octave won't make it like Matlab. (Since I would like to change an Octave-Forge function to call a user-function with an argument more, but do not want to break existing user-functions.) Olaf From dasergatskov at gmail.com Tue Aug 4 07:42:13 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Tue, 4 Aug 2009 07:42:13 -0500 Subject: printing plots in 3.2.2 In-Reply-To: <5384153F-54EA-400F-B651-A0EE4FD860B0@mac.com> References: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> <892b16670908031909o59ade1e9pe028f8152edbe0b5@mail.gmail.com> <5384153F-54EA-400F-B651-A0EE4FD860B0@mac.com> Message-ID: <892b16670908040542i1c17a02udfd3e09e783d8514@mail.gmail.com> On Tue, Aug 4, 2009 at 6:30 AM, Ben Abbott wrote: > The scaling down of fonts is done by gnuplot. It should be possible to > compensate and have octave double the point size of all fonts for > eps-output, but I don't have the time right now. > Gnuplot scales down entire picture. I.e. if you do in gnuplot plot sin(x) set term post set out "testpost.ps" replot set term post eps set out "testeps.eps" replot The result will look the same if your postscript viewer scale the picture to the same size (like, say, full-screen). This is not the case if I do something like that in octave. It appears to me the size of the picture gets enlarged w/o changing size of the font. Then gnuplot scale down everything and fonts become very small. The easiest fix -- do not use "eps" option to gnuplot postscript terminal. >> %%BoundingBox: 0 0 612 792 >> >> I get standard letter-size page and the figure looks about right. >> >> (A4 pagesize would be 595 848, if I remember correctly) > > Ok, I had infered you were looking at the printed page, not the ps file > itself. > > What software are you using to view the ps output? This is an interesting conclusion. I look at the postscript output with either "evince", convert to pdf using "epstopdf" and use acroread to look at the resulting pdf file, or just use ghostscript directly: "gs -sDEVICE=x11 test_psc2.ps" I look at the postscript file header using vi (vim to be more specific). A4 paper as far as I remember is 210mmX297mm 72*210/25.4 = 595 72*297/25.4 = 842 (rounded to integer) But I do not understand, why are you arguing with me. Are you NOT seeing these problems? > > Ben > Sincerely, Dmitri. -- From carlo.defalco at gmail.com Tue Aug 4 08:43:41 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Tue, 4 Aug 2009 15:43:41 +0200 Subject: Too many arguments? In-Reply-To: <20090804122454.GB8268@olaf> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> Message-ID: <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> > Thanks --- but I do not mean what the function can do to check the > arguments count, but what Octave itself is supposed to do in the > future. In Matlab, one cannot call a function with more arguments than > listed in the functions header. I do _not_ want this behavior. In > Octave 3.0.5, luckily calling a function with too many arguments is > possible. But I would like to make sure that future versions of Octave > won't make it like Matlab. (Since I would like to change an > Octave-Forge function to call a user-function with an argument more, > but do not want to break existing user-functions.) > > Olaf Oh, I see! I misunderstood your question, I thought you actually wanted Octave to behave like matlab so I suggested a quick way to achieve that. Sorry for the noise, c. From carlo.defalco at gmail.com Tue Aug 4 08:45:55 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Tue, 4 Aug 2009 15:45:55 +0200 Subject: Too many arguments? In-Reply-To: <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> Message-ID: <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> 2009/8/4 Carlo de Falco : >> Thanks --- but I do not mean what the function can do to check the >> arguments count, but what Octave itself is supposed to do in the >> future. In Matlab, one cannot call a function with more arguments than >> listed in the functions header. I do _not_ want this behavior. In >> Octave 3.0.5, luckily calling a function with too many arguments is >> possible. But I would like to make sure that future versions of Octave >> won't make it like Matlab. (Since I would like to change an >> Octave-Forge function to call a user-function with an argument more, >> but do not want to break existing user-functions.) >> >> Olaf > > Oh, I see! > I misunderstood your question, I thought you actually wanted Octave > to behave like matlab so I suggested a quick way to achieve that. > Sorry for the noise, > c. > FWIW Octave 3.2.2 still accepts extra arguments without complaining. I have no idea whether or not this will still be the case in the future... c. From jwe at octave.org Tue Aug 4 11:59:51 2009 From: jwe at octave.org (John W. Eaton) Date: Tue, 4 Aug 2009 12:59:51 -0400 Subject: local variables in debugger : Octave 3.2.2 In-Reply-To: <69d8d540908040257x90c6b22sbc6bea4b579e2abb@mail.gmail.com> References: <69d8d540908040257x90c6b22sbc6bea4b579e2abb@mail.gmail.com> Message-ID: <19064.26887.94860.49748@segfault.lan> On 4-Aug-2009, Jaroslav Hajek wrote: | On Mon, Aug 3, 2009 at 9:45 PM, Rishi Amrit wrote: | > Hi, | > | > ??? I have a keyboard statement inside a function which I am calling from my | > main script. When Octave stops in the debug mode, I dont see the variables | > in the scope of that function. I only see the variables in the out main | > script. Eg: | > | > main.m: | > | > a=1; b=2; | > fun2; | > | > | > fun2.m | > function fun2 | > c=1; d=2; | > keyboard | > | > | > | > Now when I run, | > | > octave> main | > keyboard: stopped in fun2.m | > octave> who | > a??? b | > | > | > Why am I not seeing the local variables ? This was not the case in Octave | > 3.0.5. Seems to be there in Octave 3.2.2. Any ideas on what changed ? | > | > Thanks, | > | > Rishi | | I think the following patch is in order: | http://hg.savannah.gnu.org/hgweb/octave/rev/fb22dd5d6242 | | there's no need to skip the built-in function stack frame, because | get_debug_input already does that all right, and there's no need to | save and restore the frame, because do_keyboard does it. | | John, can you check it out? I hope this didn't spoil something else. With your change, dbup/dbdown was not working as I would expect. I checked in the following additional change and it seems to work correctly now. http://hg.savannah.gnu.org/hgweb/octave/rev/25c2e92ee03c I also noticed that dbwhere is not working correctly, so I'll take a look at that next. jwe From tmacchant at yahoo.co.jp Tue Aug 4 14:43:43 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Wed, 5 Aug 2009 04:43:43 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: Message-ID: <20090804194344.74803.qmail@web3811.mail.bbt.yahoo.co.jp> Hello --- Olli Saarela wrote: > I was looking for a CPU consuming loop in the C++ code, but there might > actually be some in the script files. Does this help? > > *** __gnuplot_get_var__.m~ Tue Jun 9 23:22:14 2009 > --- __gnuplot_get_var__.m Mon Aug 3 13:52:35 2009 > *************** > *** 125,135 **** > fflush (ostream); > > str = {}; > while (isempty (str)) > str = char (fread (istream)'); > ! if (! isempty (str)) > str = regexp (str, "OCTAVE:.*", "match"); > str = str{end}(8:end); > endif > fclear (istream); > endwhile > --- 125,137 ---- > fflush (ostream); > > str = {}; > while (isempty (str)) > str = char (fread (istream)'); > ! if (isempty (str)) > ! sleep(0.05); > ! else > str = regexp (str, "OCTAVE:.*", "match"); > str = str{end}(8:end); > endif > fclear (istream); > endwhile > > > On my multicore machine the tic-toc timing is practically the same, but > cputime() shows a significant speed-up. > First > ! if (isempty (str)) > ! sleep(0.05); > ! else I have tested on computer in my home (cpu Celerron M 1.3GHz) Why 'else' is here? With this 'else' plot was failled. I remove 'else' and tested argument of sleep from 0.05 to 1 with task manager active. Octave consumed 99% cpu time while loop of this test. N = 100; n = 2; m = 2; tic for i = 1:n*m x = rand (2,N); subplot (n,m,i); plot (x(1,:),x(2,:)); end toc Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From jwe at octave.org Tue Aug 4 15:02:40 2009 From: jwe at octave.org (John W. Eaton) Date: Tue, 4 Aug 2009 16:02:40 -0400 Subject: local variables in debugger : Octave 3.2.2 In-Reply-To: <19064.26887.94860.49748@segfault.lan> References: <69d8d540908040257x90c6b22sbc6bea4b579e2abb@mail.gmail.com> <19064.26887.94860.49748@segfault.lan> Message-ID: <19064.37856.485055.820212@segfault.lan> On 4-Aug-2009, John W. Eaton wrote: | I also noticed that dbwhere is not working correctly, so I'll take a | look at that next. I also checked an additional change for this problem. http://hg.savannah.gnu.org/hgweb/octave/rev/bbe033dcfe13 jwe From olli.saarela at gmail.com Tue Aug 4 15:08:01 2009 From: olli.saarela at gmail.com (Olli Saarela) Date: Tue, 4 Aug 2009 23:08:01 +0300 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <20090804194344.74803.qmail@web3811.mail.bbt.yahoo.co.jp> References: <20090804194344.74803.qmail@web3811.mail.bbt.yahoo.co.jp> Message-ID: Hello, >> ! if (isempty (str)) >> ! sleep(0.05); >> ! else > >I have tested on computer in my home (cpu Celerron M 1.3GHz) >Why 'else' is here? > With this 'else' plot was failled. When applying the patch, did you notice the removal of the "!" operator from "if (! isempty (str))"? For me the patch works, but if I remove the "else" then it fails. The "else" is there in order to preserve the original program logic. In both the original code if (! isempty (str)) str = regexp (str, "OCTAVE:.*", "match"); and in the patched code if (isempty (str)) sleep(0.05); else str = regexp (str, "OCTAVE:.*", "match"); the contents of the variable str are parsed with regexp() if str is not empty. If this doesn't solve the problem, the what is the error message you get when the plot fails? Best regards, Olli 2009/8/4 Tatsuro MATSUOKA > Hello > > --- Olli Saarela wrote: > > > I was looking for a CPU consuming loop in the C++ code, but there might > > actually be some in the script files. Does this help? > > > > *** __gnuplot_get_var__.m~ Tue Jun 9 23:22:14 2009 > > --- __gnuplot_get_var__.m Mon Aug 3 13:52:35 2009 > > *************** > > *** 125,135 **** > > fflush (ostream); > > > > str = {}; > > while (isempty (str)) > > str = char (fread (istream)'); > > ! if (! isempty (str)) > > str = regexp (str, "OCTAVE:.*", "match"); > > str = str{end}(8:end); > > endif > > fclear (istream); > > endwhile > > --- 125,137 ---- > > fflush (ostream); > > > > str = {}; > > while (isempty (str)) > > str = char (fread (istream)'); > > ! if (isempty (str)) > > ! sleep(0.05); > > ! else > > str = regexp (str, "OCTAVE:.*", "match"); > > str = str{end}(8:end); > > endif > > fclear (istream); > > endwhile > > > > > > On my multicore machine the tic-toc timing is practically the same, but > > cputime() shows a significant speed-up. > > > > First > > ! if (isempty (str)) > > ! sleep(0.05); > > ! else > > I have tested on computer in my home (cpu Celerron M 1.3GHz) > Why 'else' is here? > With this 'else' plot was failled. > > I remove 'else' and tested argument of sleep from 0.05 to 1 with task > manager active. > Octave consumed 99% cpu time while loop of this test. > N = 100; > n = 2; > m = 2; > tic > for i = 1:n*m > x = rand (2,N); > subplot (n,m,i); > plot (x(1,:),x(2,:)); > end > toc > > > Regards > > Tatsuro > > -------------------------------------- > Power up the Internet with Yahoo! Toolbar. > http://pr.mail.yahoo.co.jp/toolbar/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090804/f1b9f614/attachment.html From bpabbott at mac.com Tue Aug 4 18:13:31 2009 From: bpabbott at mac.com (Ben Abbott) Date: Tue, 04 Aug 2009 19:13:31 -0400 Subject: printing plots in 3.2.2 In-Reply-To: <892b16670908040542i1c17a02udfd3e09e783d8514@mail.gmail.com> References: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> <892b16670908031909o59ade1e9pe028f8152edbe0b5@mail.gmail.com> <5384153F-54EA-400F-B651-A0EE4FD860B0@mac.com> <892b16670908040542i1c17a02udfd3e09e783d8514@mail.gmail.com> Message-ID: On Aug 4, 2009, at 8:42 AM, Dmitri A. Sergatskov wrote: > On Tue, Aug 4, 2009 at 6:30 AM, Ben Abbott wrote: > >> The scaling down of fonts is done by gnuplot. It should be possible >> to >> compensate and have octave double the point size of all fonts for >> eps-output, but I don't have the time right now. >> > > Gnuplot scales down entire picture. I.e. if you do in gnuplot > plot sin(x) > set term post > set out "testpost.ps" > replot > set term post eps > set out "testeps.eps" > replot > > The result will look the same if your postscript viewer scale > the picture to the same size (like, say, full-screen). > This is not the case if I do something like that in octave. > It appears to me the size of the picture gets enlarged w/o changing > size of the font. Then gnuplot scale down everything and > fonts become very small. The easiest fix -- do not use > "eps" option to gnuplot postscript terminal. Octave sets the size of the gnuplot canvas when it sets the terminal. The result is that only the fontsize for eps output scales down. I like the idea of generating a ps file and using it in place of eps (that solves the font size problem). I'll experiment with that to make sure there are not problems I haven't thought of. > But I do not understand, why are you arguing with me. Are you NOT > seeing these > problems? Sorry, it is not my intent to argue. I've been in a rush for several weeks ... perhaps I should slow down and explain more. The changes between 3.0.x and 3.2.x were to improve compatibility with Matlab. Regarding what I see ... (1) The ps output is not always properly centered, but I've not yet determine why. (2) The eps output size is correct, but the fontsize is half what it should be. (3) The axis labels often crop. This is due to changes which favor the axes position property of the outerposition property. What I'd like to see ... (1) the ps figure should be centered on the page (with default settings) (2) The eps output should render the same fonts size as the ps output. (3) Listeners should reconcile the position/outerposition/tightinset/ activepositionproperty properties, and would avoid cropping the axes labels when the activepositionproperty == "outerposition". Until the listener in (3) are in place, I thought it easier to tweak the axes' position property to get the desired result, than the outer position property. In addition, the ability to explicitly set the axes' position is needed for the plotyy, subplot, and colorbar functions. Ben From tmacchant at yahoo.co.jp Tue Aug 4 19:00:10 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Wed, 5 Aug 2009 09:00:10 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: Message-ID: <20090805000010.9998.qmail@web3804.mail.bbt.yahoo.co.jp> Hello Sorry for my giving error message. --- Olli Saarela wrote: > Hello, > > >> ! if (isempty (str)) > >> ! sleep(0.05); > >> ! else > > > >I have tested on computer in my home (cpu Celerron M 1.3GHz) > >Why 'else' is here? > > With this 'else' plot was failled. > > When applying the patch, did you notice the removal of the "!" operator from > "if (! isempty (str))"? For me the patch works, but if I remove the "else" > then it fails. > > The "else" is there in order to preserve the original program logic. In both > the original code > > if (! isempty (str)) > str = regexp (str, "OCTAVE:.*", "match"); > > and in the patched code > > if (isempty (str)) > sleep(0.05); > else > str = regexp (str, "OCTAVE:.*", "match"); > > the contents of the variable str are parsed with regexp() if str is not > empty. > > If this doesn't solve the problem, the what is the error message you get > when the plot fails? > > Best regards, > Olli > The code if (! isempty (str)) sleep(0.05); else str = regexp (str, "OCTAVE:.*", "match"); str = str{end}(8:end); endif gives octave.exe:5>for i = 1:n*m > x = rand (2,N); > subplot (n,m,i); > plot (x(1,:),x(2,:)); > end error: subscript indices must be either positive integers or logicals. warning: __gnuplot_get_var__: some elements in list of return values are undefined error: called from: error: C:\Programs\Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\plot\__go_draw_axes__.m at line 39, column 18 error: subscript indices must be either positive integers or logicals. warning: __gnuplot_get_var__: some elements in list of return values are undefined error: called from: error: C:\Programs\Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\plot\__go_draw_axes__.m at line 39, column 18 error: subscript indices must be either positive integers or logicals. warning: __gnuplot_get_var__: some elements in list of return values are undefined error: called from: error: C:\Programs\Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\plot\__go_draw_axes__.m at line 39, column 18 error: subscript indices must be either positive integers or logicals. warning: __gnuplot_get_var__: some elements in list of return values are undefined error: called from: error: C:\Programs\Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\plot\__go_draw_axes__.m at line 39, column 18 octave.exe:6>toc Elapsed time is 3.23438 seconds. Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From tmacchant at yahoo.co.jp Tue Aug 4 19:27:19 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Wed, 5 Aug 2009 09:27:19 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <20090804194344.74803.qmail@web3811.mail.bbt.yahoo.co.jp> Message-ID: <20090805002719.27433.qmail@web3809.mail.bbt.yahoo.co.jp> Sorry I have manually change the code and > > ! if (isempty (str)) Is forgotten. octave.exe:11>for i = 1:n*m > x = rand (2,N); > subplot (n,m,i); > plot (x(1,:),x(2,:)); > end octave.exe:12>cputime()-ts ans = 0.76563 octave.exe:13> octave.exe:13>N = 100; octave.exe:14>n = 2; octave.exe:15>m = 2; octave.exe:16>tic octave.exe:17>for i = 1:n*m > x = rand (2,N); > subplot (n,m,i); > plot (x(1,:),x(2,:)); > end octave.exe:18>toc Elapsed time is 3.2813 seconds. cputime is surely reduced on the computer in my university (cpu is HT-pentium). I will test again at home. Regards Tatsuro I will check again at home Regards. --- Tatsuro MATSUOKA wrote: > Hello > > --- Olli Saarela wrote: > > > I was looking for a CPU consuming loop in the C++ code, but there might > > actually be some in the script files. Does this help? > > > > *** __gnuplot_get_var__.m~ Tue Jun 9 23:22:14 2009 > > --- __gnuplot_get_var__.m Mon Aug 3 13:52:35 2009 > > *************** > > *** 125,135 **** > > fflush (ostream); > > > > str = {}; > > while (isempty (str)) > > str = char (fread (istream)'); > > ! if (! isempty (str)) > > str = regexp (str, "OCTAVE:.*", "match"); > > str = str{end}(8:end); > > endif > > fclear (istream); > > endwhile > > --- 125,137 ---- > > fflush (ostream); > > > > str = {}; > > while (isempty (str)) > > str = char (fread (istream)'); > > ! if (isempty (str)) > > ! sleep(0.05); > > ! else > > str = regexp (str, "OCTAVE:.*", "match"); > > str = str{end}(8:end); > > endif > > fclear (istream); > > endwhile > > > > > > On my multicore machine the tic-toc timing is practically the same, but > > cputime() shows a significant speed-up. > > > > First > > ! if (isempty (str)) > > ! sleep(0.05); > > ! else > > I have tested on computer in my home (cpu Celerron M 1.3GHz) > Why 'else' is here? > With this 'else' plot was failled. > > I remove 'else' and tested argument of sleep from 0.05 to 1 with task manager active. > Octave consumed 99% cpu time while loop of this test. > N = 100; > n = 2; > m = 2; > tic > for i = 1:n*m > x = rand (2,N); > subplot (n,m,i); > plot (x(1,:),x(2,:)); > end > toc > > > Regards > > Tatsuro > > -------------------------------------- > Power up the Internet with Yahoo! Toolbar. > http://pr.mail.yahoo.co.jp/toolbar/ > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From tmacchant at yahoo.co.jp Tue Aug 4 19:36:05 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Wed, 5 Aug 2009 09:36:05 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW Message-ID: <20090805003605.42043.qmail@web3814.mail.bbt.yahoo.co.jp> Sorry again if (isempty (str)) # sleep(0.05); Then N = 100; n = 2; m = 2; ts=cputime() for i = 1:n*m x = rand (2,N); subplot (n,m,i); plot (x(1,:),x(2,:)); end cputime()-ts gives about 2 seconds if (isempty (str)) sleep(0.05); The same test gives 0.8 seconds Anyway further test should be done one core computer and I will do it at home. Regards Tatsuro --- Tatsuro MATSUOKA wrote: > Sorry > > I have manually change the code > and > > > ! if (isempty (str)) > Is forgotten. > > octave.exe:11>for i = 1:n*m > > x = rand (2,N); > > subplot (n,m,i); > > plot (x(1,:),x(2,:)); > > end > octave.exe:12>cputime()-ts > ans = 0.76563 > octave.exe:13> > octave.exe:13>N = 100; > octave.exe:14>n = 2; > octave.exe:15>m = 2; > octave.exe:16>tic > octave.exe:17>for i = 1:n*m > > x = rand (2,N); > > subplot (n,m,i); > > plot (x(1,:),x(2,:)); > > end > octave.exe:18>toc > Elapsed time is 3.2813 seconds. > > cputime is surely reduced on the computer in my university (cpu is HT-pentium). > > I will test again at home. > > Regards > > Tatsuro > I will check again at home > > Regards. > > > --- Tatsuro MATSUOKA wrote: > > > Hello > > > > --- Olli Saarela wrote: > > > > > I was looking for a CPU consuming loop in the C++ code, but there might > > > actually be some in the script files. Does this help? > > > > > > *** __gnuplot_get_var__.m~ Tue Jun 9 23:22:14 2009 > > > --- __gnuplot_get_var__.m Mon Aug 3 13:52:35 2009 > > > *************** > > > *** 125,135 **** > > > fflush (ostream); > > > > > > str = {}; > > > while (isempty (str)) > > > str = char (fread (istream)'); > > > ! if (! isempty (str)) > > > str = regexp (str, "OCTAVE:.*", "match"); > > > str = str{end}(8:end); > > > endif > > > fclear (istream); > > > endwhile > > > --- 125,137 ---- > > > fflush (ostream); > > > > > > str = {}; > > > while (isempty (str)) > > > str = char (fread (istream)'); > > > ! if (isempty (str)) > > > ! sleep(0.05); > > > ! else > > > str = regexp (str, "OCTAVE:.*", "match"); > > > str = str{end}(8:end); > > > endif > > > fclear (istream); > > > endwhile > > > > > > > > > On my multicore machine the tic-toc timing is practically the same, but > > > cputime() shows a significant speed-up. > > > > > > > First > > > ! if (isempty (str)) > > > ! sleep(0.05); > > > ! else > > > > I have tested on computer in my home (cpu Celerron M 1.3GHz) > > Why 'else' is here? > > With this 'else' plot was failled. > > > > I remove 'else' and tested argument of sleep from 0.05 to 1 with task manager active. > > Octave consumed 99% cpu time while loop of this test. > > N = 100; > > n = 2; > > m = 2; > > tic > > for i = 1:n*m > > x = rand (2,N); > > subplot (n,m,i); > > plot (x(1,:),x(2,:)); > > end > > toc > > > > > > Regards > > > > Tatsuro > > > > -------------------------------------- > > Power up the Internet with Yahoo! Toolbar. > > http://pr.mail.yahoo.co.jp/toolbar/ > > _______________________________________________ > > Help-octave mailing list > > Help-octave at octave.org > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > > > -------------------------------------- > Power up the Internet with Yahoo! Toolbar. > http://pr.mail.yahoo.co.jp/toolbar/ > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From babelproofreader at gmail.com Tue Aug 4 19:46:34 2009 From: babelproofreader at gmail.com (babelproofreader) Date: Tue, 4 Aug 2009 17:46:34 -0700 (PDT) Subject: fft filtering problem revisited Message-ID: <24818893.post@talk.nabble.com> As a follow up to a query I posted earlier, http://www.nabble.com/Problem-with-using-fft-and-ifft-functions-td24588890.html, and after more reading on the subject I now have the code below, which is not quite working typprice=(high.+low.+close)./3; % check to see if there are negative prices due to backadjusted continuous prices if(min(min(typprice))<=0) backadj=(abs(min(min(typprice)))+tick); % if so, calculate an adjustment factor else backadj=0; % otherwise set adjustment factor to zero endif adjtypprice=typprice.+backadj; detrendedprice=adjtypprice; % First, detrend the data using logs logchange=log10(adjtypprice./shift(adjtypprice,1)); avelogchange=mean(logchange(2:end)); adjlogchange=logchange.-avelogchange; adjlogchange(1,1)=0.0; for i=2:n detrendedprice(i,1)=detrendedprice(i-1,1)*(10^adjlogchange(i,1)); endfor % raise length to the next power of two and pad with zeros as preparation for the fft l=2^(nextpow2(rows(detrendedprice))); diff=l-rows(detrendedprice); pad=zeros(diff,1); padded_detrendedprice=[detrendedprice;pad]; % The actual filtering in the frequency domain fouriertran=fft(padded_detrendedprice); [b,a]=butter(2,0.96); [h,w]=freqz(b,a,l,"whole"); invfouriertran=real(ifft(h.*fouriertran)); % Remove "padding" unpadded_invfouriertran=invfouriertran(1:n); % retrend fft_logchange=log10(unpadded_invfouriertran./shift(unpadded_invfouriertran,1)); adj_fft_logchange=fft_logchange.+avelogchange; adj_fft_logchange(1,1)=0.0; retrendedprice=zeros(n,1); retrendedprice(1,1)=adjtypprice(1,1); for i=2:n retrendedprice(i,1)=retrendedprice(i-1,1)*(10^adj_fft_logchange(i,1)); endfor recon_price=retrendedprice.-backadj; x=(1:n)'; A=[x,typprice,recon_price]; dlmwrite("fftchart",A) The problem is that the smoothed price, recon_price, is either above or below typprice when plotted, the difference varying depending on the second value of the function butter(2,???). Of course what I would like is for recon_price to be a smoothed version of typpprice. Can someone point out the error(s) in my code, or indeed, my approach? -- View this message in context: http://www.nabble.com/fft-filtering-problem-revisited-tp24818893p24818893.html Sent from the Octave - General mailing list archive at Nabble.com. From olaf.till at uni-jena.de Wed Aug 5 02:28:49 2009 From: olaf.till at uni-jena.de (Olaf Till) Date: Wed, 5 Aug 2009 09:28:49 +0200 Subject: Too many arguments? In-Reply-To: <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> Message-ID: <20090805072849.GA3791@olaf> On Tue, Aug 04, 2009 at 03:45:55PM +0200, Carlo de Falco wrote: > FWIW Octave 3.2.2 still accepts extra arguments without complaining. > I have no idea whether or not this will still be the case in the future... > c. Thanks anyway! Olaf From pmoulon at gmail.com Wed Aug 5 05:44:29 2009 From: pmoulon at gmail.com (FrenchLeaf) Date: Wed, 5 Aug 2009 03:44:29 -0700 (PDT) Subject: Symbolic question Message-ID: <24824620.post@talk.nabble.com> Hello, I want to resolve the following problem : Det(alpha*F1 +(1 - alpha)*F2) == a3*lambda + a2*lambda + a1 *lambda +a0 = 0 F1 and F2 are 3*3 matrix. Alpha is a single value. The problem is from the formula of the right of I can obtain the a3,a2,a1,a0 factor to compute the lambda roots. I know that is feasible in Maple, but I do not know How, and I did not have maple... I have test to find the solution with Xcas (solve), but Xcas seems cannot handle it. I have start with the following idea : f = det( (alpha* [ [a1,b1,c1] , [d1,e1,f1] , [g1,h1,i1] ]) * ( (1-alpha) * [ [a2,b2,c2] , [d2,e2,f2] , [g2,h2,i2] ] ) ); g = a3*lambda + a2*lambda + a1 *lambda +a0; => How to try to solve the system to identify the three A factor now ? Thanks in advance for your suggestion ;) Pierre. -- View this message in context: http://www.nabble.com/Symbolic-question-tp24824620p24824620.html Sent from the Octave - General mailing list archive at Nabble.com. From s.depretis at campus.unimib.it Wed Aug 5 09:05:07 2009 From: s.depretis at campus.unimib.it (Stefano de Pretis) Date: Wed, 5 Aug 2009 16:05:07 +0200 Subject: unique top title on multiple plot graphs Message-ID: Hi everybody, I can't find the way to set a unique title on graphics composed of multiple plots. To be more precise when I set the plot figure as: subplot(2,1,1) plot(x1,y1) subplot(2,2,2) plot(x2,y2) I am not able to set a unique title at the top of the figure, describing both the plots. I found the function "top_title.m" which seems to make this job but it is not compatible with octave 3.0.0, the version I'm using. Thanks everybody, cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090805/a7925822/attachment.html From chibaf at mac.com Wed Aug 5 14:17:11 2009 From: chibaf at mac.com (Fumihiro Chiba) Date: Thu, 06 Aug 2009 04:17:11 +0900 Subject: Symbolic question In-Reply-To: <24824620.post@talk.nabble.com> References: <24824620.post@talk.nabble.com> Message-ID: <9F6A3979-898F-4B53-82D1-4DBE579FE819@mac.com> Hello, Pierre Maxima may solve your problem. Introduction to Maxima: http://maxima.sourceforge.net/docs/intromax/intromax.html Matrix calculations: http://maxima.sourceforge.net/docs/intromax/intromax.html#tth_sEc6 Maxima site: http://maxima.sourceforge.net/ ----------------------- Fumihiro CHIBA On 2009/08/05, at 19:44, FrenchLeaf wrote: > > Hello, > > I want to resolve the following problem : > > Det(alpha*F1 +(1 - alpha)*F2) == a3*lambda + a2*lambda + a1 *lambda > +a0 = 0 > > F1 and F2 are 3*3 matrix. Alpha is a single value. > The problem is from the formula of the right of I can obtain the > a3,a2,a1,a0 > factor to compute the lambda roots. > > I know that is feasible in Maple, but I do not know How, and I did > not have > maple... > > I have test to find the solution with Xcas (solve), but Xcas seems > cannot > handle it. > > I have start with the following idea : > f = det( (alpha* [ [a1,b1,c1] , [d1,e1,f1] , [g1,h1,i1] ]) * ( (1- > alpha) * > [ [a2,b2,c2] , [d2,e2,f2] , [g2,h2,i2] ] ) ); > g = a3*lambda + a2*lambda + a1 *lambda +a0; > > => How to try to solve the system to identify the three A factor now ? > > Thanks in advance for your suggestion ;) > Pierre. > -- > View this message in context: http://www.nabble.com/Symbolic-question-tp24824620p24824620.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave From michael.w.coughlin at gmail.com Wed Aug 5 14:39:28 2009 From: michael.w.coughlin at gmail.com (mcoughlin) Date: Wed, 5 Aug 2009 12:39:28 -0700 (PDT) Subject: Set default font size and font face In-Reply-To: <49F59B07.5080607@apspektakel.com> References: <23251938.post@talk.nabble.com> <7C865C56-268E-4DB7-9ED1-6B257D3807DD@mac.com> <49F598F1.2010903@apspektakel.com> <130EBE69-F8A3-4A6F-B916-D47DBE5F3B4A@mac.com> <49F59B07.5080607@apspektakel.com> Message-ID: <24834596.post@talk.nabble.com> So if someone is stuck using 3.0.1 for the time being, is it impossible to fix it? Michael hadoque wrote: > > I'll try that. Thanks > > /Johan > > Ben Abbott skrev: >> >> On Apr 27, 2009, at 7:37 AM, Johan Lans wrote: >> >>> Ben Abbott skrev: >>>> >>>> On Apr 27, 2009, at 4:17 AM, hadoque wrote: >>>> >>>>> Hi I wonder how to set default font size and font face for plots. >>>>> I've managed to set default linewidth with set (0, >>>>> "defaultlinelinewidth", 2) and I guess default font is in the same >>>>> format, I just can't figure out what the default*name* . thanks a lot >>>>> / Johan >>>> >>>> The commands below should do what you want. >>>> >>>> set (0, "defaultaxesfontname", "Helvetica") >>>> set (0, "defaultaxesfontsize", 12) >>>> set (0, "defaulttextfontname", "Helvetica") >>>> set (0, "defaulttextfontsize", 12) >>>> >>>> If you have problems, let us know what version of octave you are >>>> running. >>>> >>>> Ben >>>> >>> The text part works fine, the axes part gives an error message >>> >>> warning: set: invalid property `fontname' >>> >>> warning: set: invalid property `fontsize' >>> >>> >>> I'm using octave version 3.0.1 >>> >>> /Johan >> >> 3.0.5 has just been released. I recommend you upgrade. >> >> http://www.gnu.org/software/octave/download.html >> >> Ben >> >> >> > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > -- View this message in context: http://www.nabble.com/Set-default-font-size-and-font-face-tp23251938p24834596.html Sent from the Octave - General mailing list archive at Nabble.com. From dasergatskov at gmail.com Wed Aug 5 15:10:50 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Wed, 5 Aug 2009 15:10:50 -0500 Subject: Set default font size and font face In-Reply-To: <24834596.post@talk.nabble.com> References: <23251938.post@talk.nabble.com> <7C865C56-268E-4DB7-9ED1-6B257D3807DD@mac.com> <49F598F1.2010903@apspektakel.com> <130EBE69-F8A3-4A6F-B916-D47DBE5F3B4A@mac.com> <49F59B07.5080607@apspektakel.com> <24834596.post@talk.nabble.com> Message-ID: <892b16670908051310r7be89f2agf81afe8a6b9c318@mail.gmail.com> On Wed, Aug 5, 2009 at 2:39 PM, mcoughlin wrote: > > So if someone is stuck using 3.0.1 for the time being, is it impossible to > fix it? > > Michael > You try old-fashioned way: print("myfile.eps", "-sepsc2", "-FTimes-Roman:18") that should change axis fonts in the print file (but not on scree). Dmitri. -- From tmacchant at yahoo.co.jp Wed Aug 5 15:19:10 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Thu, 6 Aug 2009 05:19:10 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <20090805003605.42043.qmail@web3814.mail.bbt.yahoo.co.jp> Message-ID: <20090805201910.94598.qmail@web3815.mail.bbt.yahoo.co.jp> Hello Great!! As you pointed out, your modification solves the slowness problem of the gnuplot of octave 3.2.0 for windows on one core cpu.!! Hello Matthias Brennwald please edit by notepad++ Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\plot\__gnuplot_get_var__.m *** 125,135 **** fflush (ostream); str = {}; while (isempty (str)) str = char (fread (istream)'); ! if (! isempty (str)) str = regexp (str, "OCTAVE:.*", "match"); str = str{end}(8:end); endif fclear (istream); endwhile *********** if (! isempty (str)) | | V if ( isempty (str)) // do not forget delete '!' sleep(0.05); else This made the first plot about 6 second and second plot about 2 seconds. This modification can be done easily by notepad++ and you can no longer feel angry for slooooow plots. Regards Tatsuro --- Tatsuro MATSUOKA wrote: > Sorry again > > if (isempty (str)) > # sleep(0.05); > > Then > N = 100; > n = 2; > m = 2; > ts=cputime() > for i = 1:n*m > x = rand (2,N); > subplot (n,m,i); > plot (x(1,:),x(2,:)); > end > cputime()-ts > > gives > about 2 seconds > > > if (isempty (str)) > sleep(0.05); > The same test gives > 0.8 seconds > > Anyway further test should be done one core computer and I will do it at home. > > Regards > > Tatsuro > --- Tatsuro MATSUOKA wrote: > > > Sorry > > > > I have manually change the code > > and > > > > ! if (isempty (str)) > > Is forgotten. > > > > octave.exe:11>for i = 1:n*m > > > x = rand (2,N); > > > subplot (n,m,i); > > > plot (x(1,:),x(2,:)); > > > end > > octave.exe:12>cputime()-ts > > ans = 0.76563 > > octave.exe:13> > > octave.exe:13>N = 100; > > octave.exe:14>n = 2; > > octave.exe:15>m = 2; > > octave.exe:16>tic > > octave.exe:17>for i = 1:n*m > > > x = rand (2,N); > > > subplot (n,m,i); > > > plot (x(1,:),x(2,:)); > > > end > > octave.exe:18>toc > > Elapsed time is 3.2813 seconds. > > > > cputime is surely reduced on the computer in my university (cpu is HT-pentium). > > > > I will test again at home. > > > > Regards > > > > Tatsuro > > I will check again at home > > > > Regards. > > > > > > --- Tatsuro MATSUOKA wrote: > > > > > Hello > > > > > > --- Olli Saarela wrote: > > > > > > > I was looking for a CPU consuming loop in the C++ code, but there might > > > > actually be some in the script files. Does this help? > > > > > > > > *** __gnuplot_get_var__.m~ Tue Jun 9 23:22:14 2009 > > > > --- __gnuplot_get_var__.m Mon Aug 3 13:52:35 2009 > > > > *************** > > > > *** 125,135 **** > > > > fflush (ostream); > > > > > > > > str = {}; > > > > while (isempty (str)) > > > > str = char (fread (istream)'); > > > > ! if (! isempty (str)) > > > > str = regexp (str, "OCTAVE:.*", "match"); > > > > str = str{end}(8:end); > > > > endif > > > > fclear (istream); > > > > endwhile > > > > --- 125,137 ---- > > > > fflush (ostream); > > > > > > > > str = {}; > > > > while (isempty (str)) > > > > str = char (fread (istream)'); > > > > ! if (isempty (str)) > > > > ! sleep(0.05); > > > > ! else > > > > str = regexp (str, "OCTAVE:.*", "match"); > > > > str = str{end}(8:end); > > > > endif > > > > fclear (istream); > > > > endwhile > > > > > > > > > > > > On my multicore machine the tic-toc timing is practically the same, but > > > > cputime() shows a significant speed-up. > > > > > > > > > > First > > > > ! if (isempty (str)) > > > > ! sleep(0.05); > > > > ! else > > > > > > I have tested on computer in my home (cpu Celerron M 1.3GHz) > > > Why 'else' is here? > > > With this 'else' plot was failled. > > > > > > I remove 'else' and tested argument of sleep from 0.05 to 1 with task manager active. > > > Octave consumed 99% cpu time while loop of this test. > > > N = 100; > > > n = 2; > > > m = 2; > > > tic > > > for i = 1:n*m > > > x = rand (2,N); > > > subplot (n,m,i); > > > plot (x(1,:),x(2,:)); > > > end > > > toc > > > > > > > > > Regards > > > > > > Tatsuro > > > > > > -------------------------------------- > > > Power up the Internet with Yahoo! Toolbar. > > > http://pr.mail.yahoo.co.jp/toolbar/ > > > _______________________________________________ > > > Help-octave mailing list > > > Help-octave at octave.org > > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > > > > > > > -------------------------------------- > > Power up the Internet with Yahoo! Toolbar. > > http://pr.mail.yahoo.co.jp/toolbar/ > > > > > -------------------------------------- > Power up the Internet with Yahoo! Toolbar. > http://pr.mail.yahoo.co.jp/toolbar/ > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From jwe at octave.org Wed Aug 5 15:35:50 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 5 Aug 2009 16:35:50 -0400 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <20090805201910.94598.qmail@web3815.mail.bbt.yahoo.co.jp> References: <20090805003605.42043.qmail@web3814.mail.bbt.yahoo.co.jp> <20090805201910.94598.qmail@web3815.mail.bbt.yahoo.co.jp> Message-ID: <19065.60710.123867.829267@segfault.lan> On 6-Aug-2009, Tatsuro MATSUOKA wrote: | Great!! | As you pointed out, your modification solves the slowness problem of the gnuplot of octave 3.2.0 for | windows on one core cpu.!! OK, I made this change, credited to Olli. Thanks, jwe From vini at ieee.org Wed Aug 5 18:40:05 2009 From: vini at ieee.org (pvfloripa) Date: Wed, 5 Aug 2009 16:40:05 -0700 (PDT) Subject: axis equal help! Message-ID: <24838073.post@talk.nabble.com> Hi Everybody, I am trying to plot a 3-D plot from several points. However, when I use the "axis equal" command, only the X and Y axis are set to the same scale, whereas Z doesn't change, making the plot look wrong. Is there any way around this? The same code works fine in Matlab. Many thanks! Paulo -- View this message in context: http://www.nabble.com/axis-equal-help%21-tp24838073p24838073.html Sent from the Octave - General mailing list archive at Nabble.com. From bpabbott at mac.com Wed Aug 5 19:04:44 2009 From: bpabbott at mac.com (Ben Abbott) Date: Wed, 05 Aug 2009 20:04:44 -0400 Subject: axis equal help! In-Reply-To: <24838073.post@talk.nabble.com> References: <24838073.post@talk.nabble.com> Message-ID: <257E4A92-50B3-4C97-B1C3-DFA1354265FA@mac.com> On Aug 5, 2009, at 7:40 PM, pvfloripa wrote: > Hi Everybody, > > I am trying to plot a 3-D plot from several points. However, when I > use the > "axis equal" command, only the X and Y axis are set to the same scale, > whereas Z doesn't change, making the plot look wrong. Is there any way > around this? > > The same code works fine in Matlab. > > Many thanks! > > Paulo Something like the following should work ... figure (1) clf surf (peaks) axis auto xl = get (gca, "xlim"); yl = get (gca, "ylim"); zl = get (gca, "zlim"); span = max ([diff(xl), diff(yl), diff(zl)]); xlim (mean (xl) + span*[-0.5, 0.5]) ylim (mean (yl) + span*[-0.5, 0.5]) zlim (mean (zl) + span*[-0.5, 0.5]) Ben From muhali at shaw.ca Wed Aug 5 19:21:44 2009 From: muhali at shaw.ca (Muhali) Date: Wed, 5 Aug 2009 17:21:44 -0700 (PDT) Subject: fieldnames(foo) vs. for [v k]=foo Message-ID: <24838400.post@talk.nabble.com> Setting octave> foo.b = pi ; foo.a = pi ; one gets octave> disp(fieldnames (foo)) { [1,1] = b [2,1] = a } but octave> for [v k] = foo, disp(k), endfor a b So `for' uses lexicographic ordering while `fieldnames' uses assignment order. Isn't that inconsequent, or at least somewhat confusing? -- View this message in context: http://www.nabble.com/fieldnames%28foo%29--vs.--for--v-k-%3Dfoo-tp24838400p24838400.html Sent from the Octave - General mailing list archive at Nabble.com. From jwe at octave.org Wed Aug 5 19:28:30 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 5 Aug 2009 20:28:30 -0400 Subject: axis equal help! In-Reply-To: <257E4A92-50B3-4C97-B1C3-DFA1354265FA@mac.com> References: <24838073.post@talk.nabble.com> <257E4A92-50B3-4C97-B1C3-DFA1354265FA@mac.com> Message-ID: <19066.9134.540070.756468@segfault.lan> On 5-Aug-2009, Ben Abbott wrote: | On Aug 5, 2009, at 7:40 PM, pvfloripa wrote: | | > Hi Everybody, | > | > I am trying to plot a 3-D plot from several points. However, when I | > use the | > "axis equal" command, only the X and Y axis are set to the same scale, | > whereas Z doesn't change, making the plot look wrong. Is there any way | > around this? | > | > The same code works fine in Matlab. | > | > Many thanks! | > | > Paulo | | Something like the following should work ... | | figure (1) | clf | surf (peaks) | axis auto | xl = get (gca, "xlim"); | yl = get (gca, "ylim"); | zl = get (gca, "zlim"); | span = max ([diff(xl), diff(yl), diff(zl)]); | xlim (mean (xl) + span*[-0.5, 0.5]) | ylim (mean (yl) + span*[-0.5, 0.5]) | zlim (mean (zl) + span*[-0.5, 0.5]) Does 3d plotting in gnuplot have a way to specify equal axes? The docs for the version I have (4.2.5) say that "set size ratio" has no effect for 3d plots, and that's what we are currently using to get equal axes. jwe From bpabbott at mac.com Wed Aug 5 20:57:57 2009 From: bpabbott at mac.com (Ben Abbott) Date: Wed, 05 Aug 2009 21:57:57 -0400 Subject: axis equal help! In-Reply-To: <19066.9134.540070.756468@segfault.lan> References: <24838073.post@talk.nabble.com> <257E4A92-50B3-4C97-B1C3-DFA1354265FA@mac.com> <19066.9134.540070.756468@segfault.lan> Message-ID: <717ADAAB-45E5-41C9-BDDA-74A59F33B45B@mac.com> On Aug 5, 2009, at 8:28 PM, John W. Eaton wrote: > On 5-Aug-2009, Ben Abbott wrote: > > | On Aug 5, 2009, at 7:40 PM, pvfloripa wrote: > | > | > Hi Everybody, > | > > | > I am trying to plot a 3-D plot from several points. However, > when I > | > use the > | > "axis equal" command, only the X and Y axis are set to the same > scale, > | > whereas Z doesn't change, making the plot look wrong. Is there > any way > | > around this? > | > > | > The same code works fine in Matlab. > | > > | > Many thanks! > | > > | > Paulo > | > | Something like the following should work ... > | > | figure (1) > | clf > | surf (peaks) > | axis auto > | xl = get (gca, "xlim"); > | yl = get (gca, "ylim"); > | zl = get (gca, "zlim"); > | span = max ([diff(xl), diff(yl), diff(zl)]); > | xlim (mean (xl) + span*[-0.5, 0.5]) > | ylim (mean (yl) + span*[-0.5, 0.5]) > | zlim (mean (zl) + span*[-0.5, 0.5]) > > Does 3d plotting in gnuplot have a way to specify equal axes? The > docs for the version I have (4.2.5) say that "set size ratio" has no > effect for 3d plots, and that's what we are currently using to get > equal axes. > > jwe I think there is a simple fix for gnuplot >4.3 (using the approach I outlined above). I haven't looked into the older gnuplot yet. However, I noticed that demo("axis",6) produces an error. I don't have the time to dig into that right now. Ben From jwe at octave.org Wed Aug 5 21:19:32 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 5 Aug 2009 22:19:32 -0400 Subject: fieldnames(foo) vs. for [v k]=foo In-Reply-To: <24838400.post@talk.nabble.com> References: <24838400.post@talk.nabble.com> Message-ID: <19066.15796.577493.109651@segfault.lan> On 5-Aug-2009, Muhali wrote: | Setting | | octave> foo.b = pi ; foo.a = pi ; | | one gets | | octave> disp(fieldnames (foo)) | { | [1,1] = b | [2,1] = a | } | | but | | octave> for [v k] = foo, disp(k), endfor | a | b | | So `for' uses lexicographic ordering while `fieldnames' uses assignment | order. Isn't that inconsequent, or at least somewhat confusing? I checked in the following change. http://hg.savannah.gnu.org/hgweb/octave/rev/ca95d991a65a BTW, it's best to report bugs on the bug at octave.org list. Thanks, jwe From jwe at octave.org Wed Aug 5 21:23:22 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 5 Aug 2009 22:23:22 -0400 Subject: Too many arguments? In-Reply-To: <20090805072849.GA3791@olaf> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> <20090805072849.GA3791@olaf> Message-ID: <19066.16026.545108.243500@segfault.lan> On 5-Aug-2009, Olaf Till wrote: | On Tue, Aug 04, 2009 at 03:45:55PM +0200, Carlo de Falco wrote: | > FWIW Octave 3.2.2 still accepts extra arguments without complaining. | > I have no idea whether or not this will still be the case in the future... | > c. | | Thanks anyway! Olaf I don't remember exactly why I chose to make Octave silently accept extra arguments. Maybe I didn't have an easy way to implement this feature at the time. In any case, some people might think this difference with Matlab is a minor bug. It would probably not be hard to make Octave generate an error in this case, so it might happen in the future. If you don't want that, then can you explain clearly why it makes sense for Octave to silently accept extra arguments that are not used? jwe From jwe at octave.org Wed Aug 5 21:26:10 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 5 Aug 2009 22:26:10 -0400 Subject: axis equal help! In-Reply-To: <717ADAAB-45E5-41C9-BDDA-74A59F33B45B@mac.com> References: <24838073.post@talk.nabble.com> <257E4A92-50B3-4C97-B1C3-DFA1354265FA@mac.com> <19066.9134.540070.756468@segfault.lan> <717ADAAB-45E5-41C9-BDDA-74A59F33B45B@mac.com> Message-ID: <19066.16194.70735.470014@segfault.lan> On 5-Aug-2009, Ben Abbott wrote: | I think there is a simple fix for gnuplot >4.3 (using the approach I | outlined above). I haven't looked into the older gnuplot yet. | | However, I noticed that demo("axis",6) produces an error. I don't see an error message and the plot it generates looks OK to me (but maybe it is wrong and I don't understand how the plot is intended to appear). What is the problem you see? jwe From jwe at octave.org Wed Aug 5 21:27:53 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 5 Aug 2009 22:27:53 -0400 Subject: printing plots in 3.2.2 In-Reply-To: References: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> <892b16670908031909o59ade1e9pe028f8152edbe0b5@mail.gmail.com> <5384153F-54EA-400F-B651-A0EE4FD860B0@mac.com> <892b16670908040542i1c17a02udfd3e09e783d8514@mail.gmail.com> Message-ID: <19066.16297.499756.760543@segfault.lan> On 4-Aug-2009, Ben Abbott wrote: | (3) Listeners should reconcile the position/outerposition/tightinset/ | activepositionproperty properties, and would avoid cropping the axes | labels when the activepositionproperty == "outerposition". | | Until the listener in (3) are in place, What is needed to make this happen? Maybe I could help, though you or someone else would probably have to provide the details of the listener functions. jwe From jwe at octave.org Wed Aug 5 21:30:52 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 5 Aug 2009 22:30:52 -0400 Subject: How can I get successive plot on octave 3.2 as was obtained in octave 3.0.x In-Reply-To: <20090804085639.14594.qmail@web3804.mail.bbt.yahoo.co.jp> References: <20090804085639.14594.qmail@web3804.mail.bbt.yahoo.co.jp> Message-ID: <19066.16476.208435.469663@segfault.lan> On 4-Aug-2009, Tatsuro MATSUOKA wrote: | Hello | | Please execute the attached on octave 3.0.x and octave 3.2.x. | | This script is demonstration of Thermal diffusive Equation in one dimension. | | In octave 3.0.x, the successive plots worked fine. | | However!! | In octave 3.2.x, the screen flashes every new plot, it is not ease to see. | In addition, in fltk back end only final graph is plotted (mingw). | | Perhaps this is due to the change in plotting routine in octave 3.2 | | How can I get the successive plots, which can be done in octave 3.0.x, on octave 3.2.x? I think the flashing problem was fixed in the main development sources by a recent change by Ben Abbott: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2009-August/012982.html I'm not sure whether his changeset is appropriate for the 3.2.x branch. jwe From tmacchant at yahoo.co.jp Wed Aug 5 22:08:42 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Thu, 6 Aug 2009 12:08:42 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <19065.60710.123867.829267@segfault.lan> Message-ID: <20090806030842.63605.qmail@web3811.mail.bbt.yahoo.co.jp> Hello Jaroslav cc. John and others Please attach this modification also to release-3.2.x ******************** # HG changeset patch # User Olli Saarela # Date 1249527729 -32400 # Node ID 3c571bd195310d4b28566d1c24e79c116b6ba11b # Parent 18b8a3aa034c6c533399e975b0f9675c9a1d9c47 diff -r 18b8a3aa034c -r 3c571bd19531 scripts/plot/__gnuplot_get_var__.m --- a/scripts/plot/__gnuplot_get_var__.m Tue Aug 04 09:55:38 2009 +0200 +++ b/scripts/plot/__gnuplot_get_var__.m Thu Aug 06 12:02:09 2009 +0900 @@ -127,7 +127,9 @@ str = {}; while (isempty (str)) str = char (fread (istream)'); - if (! isempty (str)) + if (isempty (str)) + sleep(0.05); + else str = regexp (str, "OCTAVE:.*", "match"); str = str{end}(8:end); endif ******************* Regards Tatsuro --- "John W. Eaton" wrote: > On 6-Aug-2009, Tatsuro MATSUOKA wrote: > > | Great!! > | As you pointed out, your modification solves the slowness problem of the gnuplot of octave > 3.2.0 for > | windows on one core cpu.!! > > OK, I made this change, credited to Olli. > > Thanks, > > jwe > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From vini at ieee.org Wed Aug 5 22:55:35 2009 From: vini at ieee.org (pvfloripa) Date: Wed, 5 Aug 2009 20:55:35 -0700 (PDT) Subject: axis equal help! In-Reply-To: <19066.16194.70735.470014@segfault.lan> References: <24838073.post@talk.nabble.com> <257E4A92-50B3-4C97-B1C3-DFA1354265FA@mac.com> <19066.9134.540070.756468@segfault.lan> <717ADAAB-45E5-41C9-BDDA-74A59F33B45B@mac.com> <19066.16194.70735.470014@segfault.lan> Message-ID: <24840038.post@talk.nabble.com> Hi all, Thanks for all your replies. The problem I see is that, say I have 3 line segments that form the sketch of a door, defined by 6 points: point1 = [ 0 0 0] point2 = [ 0 0 2] point3 = [ 0 0 2] point4 = [ 1 0 2] point5 = [ 1 0 2] point6 = [ 1 0 0] which correspond to the sides (points 1,2 and 5,6) and the top ( points 3,4) of the door. Instead of seeing the door in the correct proportion (ie, the height 2x the width), I see a very tall and very thin door. I will try the solutions suggested and let you know. Thanks again, Paulo John W. Eaton-3 wrote: > > On 5-Aug-2009, Ben Abbott wrote: > > | I think there is a simple fix for gnuplot >4.3 (using the approach I > | outlined above). I haven't looked into the older gnuplot yet. > | > | However, I noticed that demo("axis",6) produces an error. > > I don't see an error message and the plot it generates looks OK to > me (but maybe it is wrong and I don't understand how the plot is > intended to appear). What is the problem you see? > > jwe > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > -- View this message in context: http://www.nabble.com/axis-equal-help%21-tp24838073p24840038.html Sent from the Octave - General mailing list archive at Nabble.com. From highegg at gmail.com Thu Aug 6 00:33:34 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Thu, 6 Aug 2009 07:33:34 +0200 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <20090806030842.63605.qmail@web3811.mail.bbt.yahoo.co.jp> References: <19065.60710.123867.829267@segfault.lan> <20090806030842.63605.qmail@web3811.mail.bbt.yahoo.co.jp> Message-ID: <69d8d540908052233m6ed7768fp47468da959397894@mail.gmail.com> 2009/8/6 Tatsuro MATSUOKA : > Hello Jaroslav > cc. John and others > > Please attach this modification also to release-3.2.x > Done. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From olaf.till at uni-jena.de Thu Aug 6 03:16:39 2009 From: olaf.till at uni-jena.de (Olaf Till) Date: Thu, 6 Aug 2009 10:16:39 +0200 Subject: Too many arguments? In-Reply-To: <19066.16026.545108.243500@segfault.lan> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> <20090805072849.GA3791@olaf> <19066.16026.545108.243500@segfault.lan> Message-ID: <20090806081639.GA7984@olaf> On Wed, Aug 05, 2009 at 10:23:22PM -0400, John W. Eaton wrote: > I don't remember exactly why I chose to make Octave silently accept > extra arguments. Maybe I didn't have an easy way to implement this > feature at the time. > > In any case, some people might think this difference with Matlab is a > minor bug. It would probably not be hard to make Octave generate an > error in this case, so it might happen in the future. If you don't > want that, then can you explain clearly why it makes sense for Octave > to silently accept extra arguments that are not used? Because then a function can be called with some extra last arguments, no matter whether the called function has listed them in its header. This makes sense if it can vary which function is called, e.g. if the function to be called is configurable. If extra arguments do not cause an error, one can change the interface of the function call at the caller side without changing each existing called function. Example: In Octave-Forge, for main/optim/leasqr.m the user has to supply a user-function and may supply a second function to compute its Jacobian. If the user doesn't supply the latter, a generic function is used to estimate the Jacobian with difference quotients (dfdp.m). Now I would like to introduce maximal or minimal values for parameter estimation into leasqr.m. These maximal or minimal values should for some reason also be respected by dfdp.m. So I would like to pass an additional argument which contains the maximal or minimal values from leasqr.m to dfdp.m. But users may already have used leasqr.m before with their own Jacobian-functions, which do not have the extra argument in the interface (and BTW probably do not need to honour it anyway, since they do not compute difference quotients). If Octave does not accept extra arguments, these users have to change the interface of their functions after the interface-change in leasqr.m. Olaf From pmoulon at gmail.com Thu Aug 6 04:00:38 2009 From: pmoulon at gmail.com (FrenchLeaf) Date: Thu, 6 Aug 2009 02:00:38 -0700 (PDT) Subject: Symbolic question In-Reply-To: <9F6A3979-898F-4B53-82D1-4DBE579FE819@mac.com> References: <24824620.post@talk.nabble.com> <9F6A3979-898F-4B53-82D1-4DBE579FE819@mac.com> Message-ID: <24841044.post@talk.nabble.com> I have resolved it by using Xcas and advice of the Xcas community : The solution is to call the following line on Xcas : f := det( (lambda* [ [a1,b1,c1] , [d1,e1,f1] , [g1,h1,i1] ]) +( (1-lambda) * [ [a2,b2,c2] , [d2,e2,f2] , [g2,h2,i2] ] ) ); coeff(f,lambda,3) -> donne a_3 coeff(f,lambda,2) -> donne a_2 coeff(f,lambda,1) coeff(f,lambda,0) So after we can call a cubic solver to find the possible lambda root that constraint the system. THanks a lot for your suggestion. Pierre. -- View this message in context: http://www.nabble.com/Symbolic-question-tp24824620p24841044.html Sent from the Octave - General mailing list archive at Nabble.com. From highegg at gmail.com Thu Aug 6 04:12:37 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Thu, 6 Aug 2009 11:12:37 +0200 Subject: Symbolic question In-Reply-To: <24824620.post@talk.nabble.com> References: <24824620.post@talk.nabble.com> Message-ID: <69d8d540908060212y7a59ef6cp7642b6fcac3d2a4d@mail.gmail.com> On Wed, Aug 5, 2009 at 12:44 PM, FrenchLeaf wrote: > > Hello, > > I want to resolve the following problem : > > Det(alpha*F1 +(1 - alpha)*F2) == a3*lambda + a2*lambda + a1 *lambda +a0 = 0 > > F1 and F2 are 3*3 matrix. Alpha is a single value. > The problem is from the formula of the right of I can obtain the a3,a2,a1,a0 > factor to compute the lambda roots. > What you probably want to get (although your description is quite incomprehensible) is called the generalized eigenvalues; that means, roots of the polynomial p(alpha) = det (A - alpha*B) = 0. Here, A = F2 and B = F2 - F1. So, in Octave, you can either use alpha = eig (F2, F2 - F1); or alpha = eig ((F2 - F1) \ F2); # faster, but only works if (F2 - F1) is sufficiently regular. of course Octave is a numerical tool, so you get only numerical answers. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From carlo.defalco at gmail.com Thu Aug 6 04:39:27 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Thu, 6 Aug 2009 11:39:27 +0200 Subject: Too many arguments? In-Reply-To: <20090806081639.GA7984@olaf> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> <20090805072849.GA3791@olaf> <19066.16026.545108.243500@segfault.lan> <20090806081639.GA7984@olaf> Message-ID: On 6 Aug 2009, at 10:16, Olaf Till wrote: > On Wed, Aug 05, 2009 at 10:23:22PM -0400, John W. Eaton wrote: >> I don't remember exactly why I chose to make Octave silently accept >> extra arguments. Maybe I didn't have an easy way to implement this >> feature at the time. >> >> In any case, some people might think this difference with Matlab is a >> minor bug. It would probably not be hard to make Octave generate an >> error in this case, so it might happen in the future. If you don't >> want that, then can you explain clearly why it makes sense for Octave >> to silently accept extra arguments that are not used? > > Because then a function can be called with some extra last arguments, > no matter whether the called function has listed them in its > header. This makes sense if it can vary which function is called, > e.g. if the function to be called is configurable. If extra arguments > do not cause an error, one can change the interface of the function > call at the caller side without changing each existing called > function. > > Example: In Octave-Forge, for main/optim/leasqr.m the user has to > supply a user-function and may supply a second function to compute its > Jacobian. If the user doesn't supply the latter, a generic function is > used to estimate the Jacobian with difference quotients (dfdp.m). Now > I would like to introduce maximal or minimal values for parameter > estimation into leasqr.m. These maximal or minimal values should for > some reason also be respected by dfdp.m. So I would like to pass an > additional argument which contains the maximal or minimal values from > leasqr.m to dfdp.m. But users may already have used leasqr.m before > with their own Jacobian-functions, which do not have the extra > argument in the interface (and BTW probably do not need to honour it > anyway, since they do not compute difference quotients). If Octave > does not accept extra arguments, these users have to change the > interface of their functions after the interface-change in leasqr.m. > > Olaf Just my two cents, why don't you implement this "backward compatible" behaviour using a try/catch block? e.g.: try user_function (more, arguments, than, expected); catch warning (lasterr ()); warning ("the interface for user defined functions has changed, see package docs for details"); user_function (fewer, arguments); end This way you will not depend on the current behaviour of Octave wrt extra parameters. I cannot test it right now but I believe this would be compatible with matlab as well... HTH, c. From olaf.till at uni-jena.de Thu Aug 6 04:52:23 2009 From: olaf.till at uni-jena.de (Olaf Till) Date: Thu, 6 Aug 2009 11:52:23 +0200 Subject: Too many arguments? In-Reply-To: References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> <20090805072849.GA3791@olaf> <19066.16026.545108.243500@segfault.lan> <20090806081639.GA7984@olaf> Message-ID: <20090806095223.GA8399@olaf> On Thu, Aug 06, 2009 at 11:39:27AM +0200, Carlo de Falco wrote: > > On 6 Aug 2009, at 10:16, Olaf Till wrote: > >> On Wed, Aug 05, 2009 at 10:23:22PM -0400, John W. Eaton wrote: >>> I don't remember exactly why I chose to make Octave silently accept >>> extra arguments. Maybe I didn't have an easy way to implement this >>> feature at the time. >>> >>> In any case, some people might think this difference with Matlab is a >>> minor bug. It would probably not be hard to make Octave generate an >>> error in this case, so it might happen in the future. If you don't >>> want that, then can you explain clearly why it makes sense for Octave >>> to silently accept extra arguments that are not used? >> >> Because then a function can be called with some extra last arguments, >> no matter whether the called function has listed them in its >> header. This makes sense if it can vary which function is called, >> e.g. if the function to be called is configurable. If extra arguments >> do not cause an error, one can change the interface of the function >> call at the caller side without changing each existing called >> function. >> >> Example: In Octave-Forge, for main/optim/leasqr.m the user has to >> supply a user-function and may supply a second function to compute its >> Jacobian. If the user doesn't supply the latter, a generic function is >> used to estimate the Jacobian with difference quotients (dfdp.m). Now >> I would like to introduce maximal or minimal values for parameter >> estimation into leasqr.m. These maximal or minimal values should for >> some reason also be respected by dfdp.m. So I would like to pass an >> additional argument which contains the maximal or minimal values from >> leasqr.m to dfdp.m. But users may already have used leasqr.m before >> with their own Jacobian-functions, which do not have the extra >> argument in the interface (and BTW probably do not need to honour it >> anyway, since they do not compute difference quotients). If Octave >> does not accept extra arguments, these users have to change the >> interface of their functions after the interface-change in leasqr.m. >> >> Olaf > > Just my two cents, > why don't you implement this "backward compatible" behaviour using a > try/catch block? > e.g.: > > try > user_function (more, arguments, than, expected); > catch > warning (lasterr ()); > warning ("the interface for user defined functions has changed, see > package docs for details"); > user_function (fewer, arguments); > end I thought of that, but the called function again calls another user function, which can be quite complicated and can cause errors. These errors would also be caught by the try/catch block. This complicates their debugging. A solution could be to detect in the catch block where the error came from and decide what to do. If necessary, all error messages must be passed to the user (but lasterr does not return all). I do not think this is feasible. Olaf From highegg at gmail.com Thu Aug 6 05:10:55 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Thu, 6 Aug 2009 12:10:55 +0200 Subject: Too many arguments? In-Reply-To: <19066.16026.545108.243500@segfault.lan> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> <20090805072849.GA3791@olaf> <19066.16026.545108.243500@segfault.lan> Message-ID: <69d8d540908060310y643b43c2hc80a819124693ef0@mail.gmail.com> On Thu, Aug 6, 2009 at 4:23 AM, John W. Eaton wrote: > On ?5-Aug-2009, Olaf Till wrote: > > | On Tue, Aug 04, 2009 at 03:45:55PM +0200, Carlo de Falco wrote: > | > FWIW Octave 3.2.2 still accepts extra arguments without complaining. > | > I have no idea whether or not this will still be the case in the future... > | > c. > | > | Thanks anyway! Olaf > > I don't remember exactly why I chose to make Octave silently accept > extra arguments. ?Maybe I didn't have an easy way to implement this > feature at the time. > > In any case, some people might think this difference with Matlab is a > minor bug. ?It would probably not be hard to make Octave generate an > error in this case, so it might happen in the future. ?If you don't > want that, then can you explain clearly why it makes sense for Octave > to silently accept extra arguments that are not used? > just my 4 cents :) 1. The presence of an extra argument can be used as a flag (think what qr does), while the actual value is not needed anywhere (and hence needs not be named). It's not very pretty usage, but possible. 2. Excess output arguments are also ignored silently (is this the same in Matlab?). 3. Most, if not all, functions already include checks for nargin, so giving excess arguments generates an error anyway; however, you'd take away the possibility to customize the message. 4. I think you're sometimes being too pessimistic about how pedantic may "some people" be about Matlab compatibility. If this difference actually breaks someone's code, that code must be really crazy. And as you say, it would be trivial to change, so let's just wait until, if ever, the need arises. cheers -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From olaf.till at uni-jena.de Thu Aug 6 05:59:51 2009 From: olaf.till at uni-jena.de (Olaf Till) Date: Thu, 6 Aug 2009 12:59:51 +0200 Subject: Too many arguments? In-Reply-To: <69d8d540908060310y643b43c2hc80a819124693ef0@mail.gmail.com> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> <20090805072849.GA3791@olaf> <19066.16026.545108.243500@segfault.lan> <69d8d540908060310y643b43c2hc80a819124693ef0@mail.gmail.com> Message-ID: <20090806105951.GA8543@olaf> On Thu, Aug 06, 2009 at 12:10:55PM +0200, Jaroslav Hajek wrote: > 3. Most, if not all, functions already include checks for nargin, so > giving excess arguments generates an error anyway; however, you'd take It was not addressed to me, but let me throw in that I had simply overlooked that. This argument shows that changing the interface to a user function with an extra variable would not be, as I thought, a clean solution, even if Octave kept allowing extra variables in the future. So my argument (other branch of this thread) for keeping Octaves behavior gets invalid. Sorry, should have thought of this before. Olaf From matthias at brennwald.org Thu Aug 6 06:04:09 2009 From: matthias at brennwald.org (Matthias Brennwald) Date: Thu, 6 Aug 2009 13:04:09 +0200 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: References: Message-ID: <6E1D3B20-040A-4A69-9FDB-488C02FB30D4@brennwald.org> On Aug 6, 2009, at 2:28 AM, help-octave-request at octave.org wrote: > Hello Matthias Brennwald > > please edit by notepad++ > Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\plot\__gnuplot_get_var__.m > > *** 125,135 **** > fflush (ostream); > > str = {}; > while (isempty (str)) > str = char (fread (istream)'); > ! if (! isempty (str)) > str = regexp (str, "OCTAVE:.*", "match"); > str = str{end}(8:end); > endif > fclear (istream); > endwhile > > *********** > if (! isempty (str)) > | > | > V > if ( isempty (str)) // do not forget delete '!' > sleep(0.05); > else > > This made the first plot about 6 second and second plot about 2 > seconds. > This modification can be done easily by notepad++ and you can no > longer feel angry for slooooow plots. Great, this fixed the issue. Multiplots now work at about the same speed on Windows XP as on the Mac oder Linux. Thanks Matthias ---- Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 17 03 From bpabbott at mac.com Thu Aug 6 06:54:08 2009 From: bpabbott at mac.com (Ben Abbott) Date: Thu, 06 Aug 2009 07:54:08 -0400 Subject: printing plots in 3.2.2 In-Reply-To: <19066.16297.499756.760543@segfault.lan> References: <892b16670908022233jf40617anabf08e6fafdd0741@mail.gmail.com> <892b16670908031909o59ade1e9pe028f8152edbe0b5@mail.gmail.com> <5384153F-54EA-400F-B651-A0EE4FD860B0@mac.com> <892b16670908040542i1c17a02udfd3e09e783d8514@mail.gmail.com> <19066.16297.499756.760543@segfault.lan> Message-ID: <63D0C2A3-43A9-43EB-8AA9-31CF1676AE50@mac.com> On Aug 5, 2009, at 10:27 PM, John W. Eaton wrote: > On 4-Aug-2009, Ben Abbott wrote: > > | (3) Listeners should reconcile the position/outerposition/ > tightinset/ > | activepositionproperty properties, and would avoid cropping the axes > | labels when the activepositionproperty == "outerposition". > | > | Until the listener in (3) are in place, > > What is needed to make this happen? Maybe I could help, though you > or someone else would probably have to provide the details of the > listener functions. > > jwe Its been a while since I looked at the. So I may get some details wrong, but ... (1) Octave needs to take responsibility over the positioning of the ticklabels and axeslabels. (2) A method to needed to determine the extents of text objects ("extent" is a property). (3) When the axes ticklabels, axeslabels, title, position, or outerposition are changed, the tightinset property needs to be updated. This requires that the extents of the text objects are known. (4) For activepositionproperty == outerposition; when the position or tightinset changes, verify the position+tightinset does not extend beyond the outerposition box. If it does, implicitly modify the position property to compensate. (5) For activepositionproperty == position; when the outerposition or tightinset changes, verify the outerposition-tightinset does not encroach into the position box. If it does, implicitly modify the outerposition property to compensate. I suspect using approximations for the first two would work rather well in this instance. To implicitly set the position or outerposition properties, a pair of new properties (__position__, __outerposition__) could be added when the user can read buy not modify. I'll divert to another area needing work, as it may make sense to start there. (1) Matlab's addproperty function is unrelated to Octave's. Matlab's addproperty adds a custom property to the COM object. I think this is a windows only thing. (2) What Matlab has that is equivalent is setappdata, getappdata, isappdata, and rmappdata. Which appear (to me) to create a property (called AppData?) of type structure whose fields correspond to the "appdata" properties for that object (I'm not describing this very well, but I hope you get the idea). (3) Perhaps it would make sense to create another property of type structure called InternalData (for ex), which contains all the internal properties such as __backend__, etc. In early 2008, I had experimented with an implementation using m- files, but decided that was not the proper approach as the listeners need to be added at a lower level. If I have some time this weekend, I'll dig out that old code and see what its status is. If it is, more or less, operational it may help to understand the remaining details. Ben From bpabbott at mac.com Thu Aug 6 06:56:14 2009 From: bpabbott at mac.com (Ben Abbott) Date: Thu, 06 Aug 2009 07:56:14 -0400 Subject: How can I get successive plot on octave 3.2 as was obtained in octave 3.0.x In-Reply-To: <19066.16476.208435.469663@segfault.lan> References: <20090804085639.14594.qmail@web3804.mail.bbt.yahoo.co.jp> <19066.16476.208435.469663@segfault.lan> Message-ID: <62387232-4AB0-410C-B10A-8DB35C54FC7E@mac.com> On Aug 5, 2009, at 10:30 PM, John W. Eaton wrote: > On 4-Aug-2009, Tatsuro MATSUOKA wrote: > > | Hello > | > | Please execute the attached on octave 3.0.x and octave 3.2.x. > | > | This script is demonstration of Thermal diffusive Equation in one > dimension. > | > | In octave 3.0.x, the successive plots worked fine. > | > | However!! > | In octave 3.2.x, the screen flashes every new plot, it is not ease > to see. > | In addition, in fltk back end only final graph is plotted (mingw). > | > | Perhaps this is due to the change in plotting routine in octave 3.2 > | > | How can I get the successive plots, which can be done in octave > 3.0.x, on octave 3.2.x? > > I think the flashing problem was fixed in the main development sources > by a recent change by Ben Abbott: > > https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2009-August/012982.html > > I'm not sure whether his changeset is appropriate for the 3.2.x > branch. > > jwe The scripts/plot stuff only recently diverged, so I think it could be applied directly to the 3.2.x branch. Ben From bpabbott at mac.com Thu Aug 6 06:57:37 2009 From: bpabbott at mac.com (Ben Abbott) Date: Thu, 06 Aug 2009 07:57:37 -0400 Subject: How can I get successive plot on octave 3.2 as was obtained in octave 3.0.x In-Reply-To: <62387232-4AB0-410C-B10A-8DB35C54FC7E@mac.com> References: <20090804085639.14594.qmail@web3804.mail.bbt.yahoo.co.jp> <19066.16476.208435.469663@segfault.lan> <62387232-4AB0-410C-B10A-8DB35C54FC7E@mac.com> Message-ID: On Aug 6, 2009, at 7:56 AM, Ben Abbott wrote: > On Aug 5, 2009, at 10:30 PM, John W. Eaton wrote: > >> On 4-Aug-2009, Tatsuro MATSUOKA wrote: >> >> | Hello >> | >> | Please execute the attached on octave 3.0.x and octave 3.2.x. >> | >> | This script is demonstration of Thermal diffusive Equation in one >> dimension. >> | >> | In octave 3.0.x, the successive plots worked fine. >> | >> | However!! >> | In octave 3.2.x, the screen flashes every new plot, it is not ease >> to see. >> | In addition, in fltk back end only final graph is plotted (mingw). >> | >> | Perhaps this is due to the change in plotting routine in octave 3.2 >> | >> | How can I get the successive plots, which can be done in octave >> 3.0.x, on octave 3.2.x? >> >> I think the flashing problem was fixed in the main development >> sources >> by a recent change by Ben Abbott: >> >> https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2009-August/012982.html >> >> I'm not sure whether his changeset is appropriate for the 3.2.x >> branch. >> >> jwe > > The scripts/plot stuff only recently diverged, so I think it could be > applied directly to the 3.2.x branch. > > Ben I just noticed that Jaroslav has already transplanted it. Ben From bpabbott at mac.com Thu Aug 6 07:03:26 2009 From: bpabbott at mac.com (Ben Abbott) Date: Thu, 06 Aug 2009 08:03:26 -0400 Subject: axis equal help! In-Reply-To: <19066.16194.70735.470014@segfault.lan> References: <24838073.post@talk.nabble.com> <257E4A92-50B3-4C97-B1C3-DFA1354265FA@mac.com> <19066.9134.540070.756468@segfault.lan> <717ADAAB-45E5-41C9-BDDA-74A59F33B45B@mac.com> <19066.16194.70735.470014@segfault.lan> Message-ID: On Aug 5, 2009, at 10:26 PM, John W. Eaton wrote: > On 5-Aug-2009, Ben Abbott wrote: > > | I think there is a simple fix for gnuplot >4.3 (using the approach I > | outlined above). I haven't looked into the older gnuplot yet. > | > | However, I noticed that demo("axis",6) produces an error. > > I don't see an error message and the plot it generates looks OK to > me (but maybe it is wrong and I don't understand how the plot is > intended to appear). What is the problem you see? > > jwe You are correct. I deleted my axis.m and pulled a fresh copy, and the error is gone. Ben From michael.martins at desy.de Thu Aug 6 04:51:14 2009 From: michael.martins at desy.de (Michael Martins) Date: Thu, 6 Aug 2009 11:51:14 +0200 Subject: Too many arguments? In-Reply-To: References: <20090804113547.GA7628@olaf> <20090806081639.GA7984@olaf> Message-ID: <200908061151.14524.michael.martins@desy.de> Am Donnerstag 06 August 2009 11:39:27 schrieb Carlo de Falco: > On 6 Aug 2009, at 10:16, Olaf Till wrote: > > On Wed, Aug 05, 2009 at 10:23:22PM -0400, John W. Eaton wrote: > >> I don't remember exactly why I chose to make Octave silently accept > >> extra arguments. Maybe I didn't have an easy way to implement this > >> feature at the time. > >> > >> In any case, some people might think this difference with Matlab is a > >> minor bug. It would probably not be hard to make Octave generate an > >> error in this case, so it might happen in the future. If you don't > >> want that, then can you explain clearly why it makes sense for Octave > >> to silently accept extra arguments that are not used? > > > > Because then a function can be called with some extra last arguments, > > no matter whether the called function has listed them in its > > header. This makes sense if it can vary which function is called, > > e.g. if the function to be called is configurable. If extra arguments > > do not cause an error, one can change the interface of the function > > call at the caller side without changing each existing called > > function. > > > > Example: In Octave-Forge, for main/optim/leasqr.m the user has to > > supply a user-function and may supply a second function to compute its > > Jacobian. If the user doesn't supply the latter, a generic function is > > used to estimate the Jacobian with difference quotients (dfdp.m). Now > > I would like to introduce maximal or minimal values for parameter > > estimation into leasqr.m. These maximal or minimal values should for > > some reason also be respected by dfdp.m. So I would like to pass an > > additional argument which contains the maximal or minimal values from > > leasqr.m to dfdp.m. But users may already have used leasqr.m before > > with their own Jacobian-functions, which do not have the extra > > argument in the interface (and BTW probably do not need to honour it > > anyway, since they do not compute difference quotients). If Octave > > does not accept extra arguments, these users have to change the > > interface of their functions after the interface-change in leasqr.m. > > > > Olaf > > Just my two cents, > why don't you implement this "backward compatible" behaviour using a > try/catch block? > e.g.: > > try > user_function (more, arguments, than, expected); > catch > warning (lasterr ()); > warning ("the interface for user defined functions has changed, see > package docs for details"); > user_function (fewer, arguments); > end > > This way you will not depend on the current behaviour of Octave wrt > extra parameters. > I cannot test it right now but I believe this would be compatible with > matlab as well... > HTH, > c. The current behavior of octave makes more sence then the matlab behavior; this is at least my opinion. Why should very usefull things change, only to be compatible with matlab. One should not include all disadvantages of matlab. Michael -- |\ /| PD Dr. Michael Martins, Universitaet Hamburg | \/ | Institut fuer Experimentalphysik Tel.: +49-40-8998-3121 | |\/| Luruper Chaussee 149 | | | D-22761 Hamburg Email: Michael.Martins at desy.de From wlmd888 at yahoo.com Thu Aug 6 13:52:53 2009 From: wlmd888 at yahoo.com (david) Date: Thu, 6 Aug 2009 11:52:53 -0700 (PDT) Subject: eigs.m problem in Octave 3.2.2 Message-ID: <560202.3368.qm@web45514.mail.sp1.yahoo.com> Hi, I installed Octave 3.2.2, when I do: help eigs, I can see its help information as below, but when I use it, it shows: octave:16> a=[1 2 3;4 5 6;7 8 9]; octave:17> eigs(a) error: eigs: not available in this version of Octave octave:15> help eigs `eigs' is a function from the file /usr/local/libexec/octave/3.2.2/oct/i686-pc-linux-gnu/e igs.oct -- Loadable Function: D = eigs (A) -- Loadable Function: D = eigs (A, K) -- Loadable Function: D = eigs (A, K, SIGMA) -- Loadable Function: D = eigs (A, K, SIGMA,OPTS) ...... Does anyone know what is the problem? Is Octave 3.2.2 already built with ARPACK package? Thanks a lot. From gregory.barendt at gmail.com Thu Aug 6 13:56:41 2009 From: gregory.barendt at gmail.com (Gregory Barendt) Date: Thu, 6 Aug 2009 14:56:41 -0400 Subject: Compiling 3.2.2 on Ubuntu 9.04 Message-ID: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> Has anyone successfully compiled 3.2.2 on Ubuntu 9.04? I'm getting errors during make: ./DLD-FUNCTIONS/fltk_backend.cc: In member function ?virtual void OpenGL_fltk::draw_overlay()?: ./DLD-FUNCTIONS/fltk_backend.cc:145: error: ?gluOrtho2D? was not declared in this scope make[2]: *** [pic/fltk_backend.o] Error 1 make[2]: Leaving directory `/usr/local/src/octave-3.2.2/src' make[1]: *** [src] Error 2 make[1]: Leaving directory `/usr/local/src/octave-3.2.2' make: *** [all] Error 2 No errors during configure, just these warnings: configure: WARNING: cannot determine how to obtain linking information from f77 configure: WARNING: qrupdate not found. The QR & Cholesky updating functions will be slow. configure: WARNING: qrupdate not found. The QR & Cholesky updating functions will be slow. configure: WARNING: GraphicsMagick++ config script not found. Assuming GraphicsMagic++ library and header files are missing, so imread will not be fully functional Any advice would be greatly appreciated. Thanks, Greg From tmacchant at yahoo.co.jp Thu Aug 6 14:50:05 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Fri, 7 Aug 2009 04:50:05 +0900 (JST) Subject: eigs.m problem in Octave 3.2.2 In-Reply-To: <560202.3368.qm@web45514.mail.sp1.yahoo.com> Message-ID: <20090806195005.69773.qmail@web3815.mail.bbt.yahoo.co.jp> Hello I have built octave-3.2.2 on MinGW( Windows) octave.exe:13> n = 20; octave.exe:14> k = 4; octave.exe:15> A = sparse([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),1:n,-ones(1,n-2)]); octave.exe:16> d1 = eigs (A, k) d1 = 19.407 18.407 18.096 17.096 For my binary, eigs.oct works correct. There is no 'eigs.m ' in octave 3.2. The problem is not issue of octave 3.2.2 itself. Perhaps you download your 0ctave 3.2.2 binaries from the package managing place on your linux distribution. If my guess is true, please ask at the ML of the application distribution site. If you have built your octave by yourself, please show the kind of linux distribution (Redhat, Debial etc.) and show configuration at the build process. Regards Tatsuro --- david wrote: > > Hi, > > I installed Octave 3.2.2, when I do: help eigs, I can see its help information as below, but > when I use it, it shows: > > octave:16> a=[1 2 3;4 5 6;7 8 9]; > octave:17> eigs(a) > error: eigs: not available in this version of Octave > > > octave:15> help eigs > `eigs' is a function from the file /usr/local/libexec/octave/3.2.2/oct/i686-pc-linux-gnu/e > igs.oct > > -- Loadable Function: D = eigs (A) > -- Loadable Function: D = eigs (A, K) > -- Loadable Function: D = eigs (A, K, SIGMA) > -- Loadable Function: D = eigs (A, K, SIGMA,OPTS) > ...... > > > Does anyone know what is the problem? Is Octave 3.2.2 already built with ARPACK package? > > Thanks a lot. > > > > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From szabi-11 at mailinator.com Thu Aug 6 14:56:50 2009 From: szabi-11 at mailinator.com (szabi-11) Date: Thu, 6 Aug 2009 12:56:50 -0700 (PDT) Subject: Octave vs. Matlab speed difference, any suggestions? Message-ID: <24853287.post@talk.nabble.com> Hi all! I need to multiply and sum up 3 dimensional matrices. I noticed that my script run way slower on octave. I traced the problem to the actual multiplication of the matrices. For example take the following script: --snip -- Q=rand(256,256,10); W=rand(256,256,10); tic for ind=1:10; Q(:,:,ind).*W(:,:,ind); end toc --snip-- On a machine having both matlab ( Version 7.5.0.338 (R2007b)) and octave (3.0.5 configured for "x86_64-redhat-linux-gnu") the average timings from a few runs are matlab: 0.0086 seconds octave: 0.3350 seconds Naturally my question is, why? On a separate machine (on which I have administrative rights) I checked what difference makes if I install an sse2 optimized ATLAS-package instead of the general one. The octave results improved roughly 10%. -Szabi -- View this message in context: http://www.nabble.com/Octave-vs.-Matlab-speed-difference%2C-any-suggestions--tp24853287p24853287.html Sent from the Octave - General mailing list archive at Nabble.com. From jwe at octave.org Thu Aug 6 15:06:34 2009 From: jwe at octave.org (John W. Eaton) Date: Thu, 6 Aug 2009 16:06:34 -0400 Subject: Octave vs. Matlab speed difference, any suggestions? In-Reply-To: <24853287.post@talk.nabble.com> References: <24853287.post@talk.nabble.com> Message-ID: <19067.14282.544272.615417@segfault.lan> On 6-Aug-2009, szabi-11 wrote: | I need to multiply and sum up 3 dimensional matrices. I noticed that my | script run way slower on octave. I traced the problem to the actual | multiplication of the matrices. For example take the following script: | | --snip -- | Q=rand(256,256,10); | W=rand(256,256,10); | | tic | for ind=1:10; | Q(:,:,ind).*W(:,:,ind); | end | toc | --snip-- | | On a machine having both matlab ( Version 7.5.0.338 (R2007b)) and octave | (3.0.5 configured for "x86_64-redhat-linux-gnu") the average timings from a | few runs are | | matlab: 0.0086 seconds | octave: 0.3350 seconds | | Naturally my question is, why? Most likely, you are measuring the difference in speed of array indexing. In 3.0.x, Octave created temporary variables for slices like Q(:,:,ind). In 3.2.x, array slices are handled more efficiently. For example, Octave 3.0.5 on my system runs your example in about .95 seconds, and Octave 3.2.2 on the same system runs it in about .03 seconds. So I'd recommend upgrading to 3.2.2 and running your test again. | On a separate machine (on which I have administrative rights) I checked what | difference makes if I install an sse2 optimized ATLAS-package instead of the | general one. The octave results improved roughly 10%. That's surprising, since I don't think any BLAS routines are used when computing element-by-element array products. jwe From tomdean at speakeasy.org Thu Aug 6 15:27:41 2009 From: tomdean at speakeasy.org (Thomas D. Dean) Date: Thu, 06 Aug 2009 13:27:41 -0700 Subject: Compiling 3.2.2 on Ubuntu 9.04 In-Reply-To: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> References: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> Message-ID: <1249590461.4429.0.camel@asus> On Thu, 2009-08-06 at 14:56 -0400, Gregory Barendt wrote: > Has anyone successfully compiled 3.2.2 on Ubuntu 9.04? I'm getting > errors during make: I just finished. No errors. tomdean From jwe at octave.org Thu Aug 6 16:08:41 2009 From: jwe at octave.org (John W. Eaton) Date: Thu, 6 Aug 2009 17:08:41 -0400 Subject: Too many arguments? In-Reply-To: <69d8d540908060310y643b43c2hc80a819124693ef0@mail.gmail.com> References: <20090804113547.GA7628@olaf> <1249386555.3875.56.camel@sh-t400> <420ba0760908040456v7128bf7bm30c91a410652f03@mail.gmail.com> <20090804122454.GB8268@olaf> <420ba0760908040643o7ab6acb1uacd3b25aea82a472@mail.gmail.com> <420ba0760908040645k1e359028nb576847659e10354@mail.gmail.com> <20090805072849.GA3791@olaf> <19066.16026.545108.243500@segfault.lan> <69d8d540908060310y643b43c2hc80a819124693ef0@mail.gmail.com> Message-ID: <19067.18009.140926.863477@segfault.lan> On 6-Aug-2009, Jaroslav Hajek wrote: | 1. The presence of an extra argument can be used as a flag (think what | qr does), while the actual value is not needed anywhere (and hence | needs not be named). It's not very pretty usage, but possible. I think in most cases where something like this is done, the argument is named, but you are right that it is possible (at least in Octave) to just check to see if an extra argument is present using nargin, even if the argument doesn't appear in the parameter list. So, OK. | 2. Excess output arguments are also ignored silently (is this the same | in Matlab?). I think so. | 3. Most, if not all, functions already include checks for nargin, so | giving excess arguments generates an error anyway; however, you'd take | away the possibility to customize the message. OK. | 4. I think you're sometimes being too pessimistic about how pedantic | may "some people" be about Matlab compatibility. If this difference | actually breaks someone's code, that code must be really crazy. And as | you say, it would be trivial to change, so let's just wait until, if | ever, the need arises. It's fine with me to leave the behavior as it is. I was just thinking that some people might want the automatic check for too many arguments, so we might see this as a bug report/feature request in the future, and I wanted to know what reasons other people could see for keeping the current behavior. At the spot where this condition would be checked, perhaps we should put a comment saying that the present behavior is intentional, so that someone doesn't add it later in response to some feature request? Thanks, jwe From storrsjm at email.uc.edu Thu Aug 6 16:19:44 2009 From: storrsjm at email.uc.edu (Judd Storrs) Date: Thu, 6 Aug 2009 17:19:44 -0400 Subject: Compiling 3.2.2 on Ubuntu 9.04 In-Reply-To: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> References: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> Message-ID: I haven't built 3.2.2 yet, but those errors look like what I got when I started to compile the development sources on 9.04. You can try: sudo apt-get build-dep octave3.0 sudo apt-get install libftgl-dev You also need to get qrupdate somehow. You can build it yourself from sources (it isn't too hard) or grab the deb's from Debian (this is what I did). The debian packages are called libqrupdate1 and libqrupdate-dev. Hope this helps, --judd On Thu, Aug 6, 2009 at 2:56 PM, Gregory Barendt wrote: > Has anyone successfully compiled 3.2.2 on Ubuntu 9.04? I'm getting > errors during make: > > ./DLD-FUNCTIONS/fltk_backend.cc: In member function ?virtual void > OpenGL_fltk::draw_overlay()?: > ./DLD-FUNCTIONS/fltk_backend.cc:145: error: ?gluOrtho2D? was not > declared in this scope > make[2]: *** [pic/fltk_backend.o] Error 1 > make[2]: Leaving directory `/usr/local/src/octave-3.2.2/src' > make[1]: *** [src] Error 2 > make[1]: Leaving directory `/usr/local/src/octave-3.2.2' > make: *** [all] Error 2 > > No errors during configure, just these warnings: > > configure: WARNING: cannot determine how to obtain linking information from > f77 > configure: WARNING: qrupdate not found. The QR & Cholesky updating > functions will be slow. > configure: WARNING: qrupdate not found. The QR & Cholesky updating > functions will be slow. > configure: WARNING: GraphicsMagick++ config script not found. Assuming > GraphicsMagic++ library and header files are missing, so imread will > not be fully functional > > Any advice would be greatly appreciated. > > Thanks, > Greg > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090806/979c9f47/attachment.html From tomdean at speakeasy.org Thu Aug 6 17:27:52 2009 From: tomdean at speakeasy.org (Thomas D. Dean) Date: Thu, 06 Aug 2009 15:27:52 -0700 Subject: Compiling 3.2.2 on Ubuntu 9.04 In-Reply-To: References: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> Message-ID: <1249597672.4429.6.camel@asus> On Thu, 2009-08-06 at 17:19 -0400, Judd Storrs wrote: > qrupdate I don't seem to have qrupdate installed. Octave 3.2.2 built and installed Ok. Seems to run Ok. In the past, I installed octave with apt-get. I use gnuplot. I will repeat the build with script. tomdean From storrsjm at email.uc.edu Thu Aug 6 17:45:47 2009 From: storrsjm at email.uc.edu (Judd Storrs) Date: Thu, 6 Aug 2009 18:45:47 -0400 Subject: Compiling 3.2.2 on Ubuntu 9.04 In-Reply-To: <1249597672.4429.6.camel@asus> References: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> <1249597672.4429.6.camel@asus> Message-ID: On Thu, 2009-08-06 at 17:19 -0400, Judd Storrs wrote: > You also need to get qrupdate somehow. Sorry... I don't think installing qrupdate is required. Octave should run fine without it. I should have typed "can" instead of "need". --judd On Thu, Aug 6, 2009 at 6:27 PM, Thomas D. Dean wrote: > On Thu, 2009-08-06 at 17:19 -0400, Judd Storrs wrote: > > qrupdate > > I don't seem to have qrupdate installed. Octave 3.2.2 built and > installed Ok. Seems to run Ok. > > In the past, I installed octave with apt-get. > > I use gnuplot. > > I will repeat the build with script. > > tomdean > > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090806/848faaee/attachment.html From gregory.barendt at gmail.com Thu Aug 6 19:03:46 2009 From: gregory.barendt at gmail.com (Gregory Barendt) Date: Thu, 6 Aug 2009 20:03:46 -0400 Subject: Compiling 3.2.2 on Ubuntu 9.04 In-Reply-To: References: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> Message-ID: <19ade2d80908061703h2c0faa1cqd6df719f0792013a@mail.gmail.com> I didn't install qrupdate, but I did the other two and that did the trick. Thanks for all of your help, Greg On Thu, Aug 6, 2009 at 5:19 PM, Judd Storrs wrote: > I haven't built 3.2.2 yet, but those errors look like what I got when I > started to compile the development sources on 9.04. You can try: > > sudo apt-get build-dep octave3.0 > sudo apt-get install libftgl-dev > > You also need to get qrupdate somehow. You can build it yourself from > sources (it isn't too hard) or grab the deb's from Debian (this is what I > did). The debian packages are called libqrupdate1 and libqrupdate-dev. > > Hope this helps, > > --judd > > > > > On Thu, Aug 6, 2009 at 2:56 PM, Gregory Barendt > wrote: >> >> Has anyone successfully compiled 3.2.2 on Ubuntu 9.04? I'm getting >> errors during make: >> >> ./DLD-FUNCTIONS/fltk_backend.cc: In member function ?virtual void >> OpenGL_fltk::draw_overlay()?: >> ./DLD-FUNCTIONS/fltk_backend.cc:145: error: ?gluOrtho2D? was not >> declared in this scope >> make[2]: *** [pic/fltk_backend.o] Error 1 >> make[2]: Leaving directory `/usr/local/src/octave-3.2.2/src' >> make[1]: *** [src] Error 2 >> make[1]: Leaving directory `/usr/local/src/octave-3.2.2' >> make: *** [all] Error 2 >> >> No errors during configure, just these warnings: >> >> configure: WARNING: cannot determine how to obtain linking information >> from f77 >> configure: WARNING: qrupdate not found. The QR & Cholesky updating >> functions will be slow. >> configure: WARNING: qrupdate not found. The QR & Cholesky updating >> functions will be slow. >> configure: WARNING: GraphicsMagick++ config script not found. Assuming >> GraphicsMagic++ library and header files are missing, so imread will >> not be fully functional >> >> Any advice would be greatly appreciated. >> >> Thanks, >> Greg >> >> _______________________________________________ >> Help-octave mailing list >> Help-octave at octave.org >> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > From tomdean at speakeasy.org Thu Aug 6 19:27:40 2009 From: tomdean at speakeasy.org (Thomas D. Dean) Date: Thu, 06 Aug 2009 17:27:40 -0700 Subject: Compiling 3.2.2 on Ubuntu 9.04 In-Reply-To: <19ade2d80908061703h2c0faa1cqd6df719f0792013a@mail.gmail.com> References: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> <19ade2d80908061703h2c0faa1cqd6df719f0792013a@mail.gmail.com> Message-ID: <1249604860.4429.33.camel@asus> On Thu, 2009-08-06 at 20:03 -0400, Gregory Barendt wrote: I did the configure and build with a script. The only strange things I saw was a missing, expected failure and eigs.cc may have no tests. #make check ... src/DLD-FUNCTIONS/dmperm.cc ......................... PASS 5/5 src/DLD-FUNCTIONS/eig.cc ............................ PASS 20/20 src/DLD-FUNCTIONS/eigs.cc ........................... src/DLD-FUNCTIONS/fft.cc ............................ PASS 19/19 src/DLD-FUNCTIONS/fft2.cc ........................... PASS 4/4 ... test_unwind.m ....................................... PASS 2/2 test_while.m ........................................ PASS 5/5 Summary: PASS 5600 FAIL 0 There was 1 expected failure (see fntests.log for details). ... And, from fntests.log, ... >>>>> processing /home/tomdean/Math/Octave/octave-3.2.2/scripts/testfun/test.m ***** xtest error("This test is known to fail") !!!!! known failure This test is known to fail>>>>> processing /home/tomdean/Math/Octave/octave-3.2.2/scripts/time/addtodate.m >>>>> processing /home/tomdean/Math/Octave/octave-3.2.2/scripts/time/asctime.m ... Did someone fix the test and not fix the expectancy? From tmacchant at yahoo.co.jp Thu Aug 6 19:28:07 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Fri, 7 Aug 2009 09:28:07 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <69d8d540908052233m6ed7768fp47468da959397894@mail.gmail.com> Message-ID: <20090807002808.44779.qmail@web3803.mail.bbt.yahoo.co.jp> Hello --- Jaroslav Hajek wrote: > 2009/8/6 Tatsuro MATSUOKA : > > Hello Jaroslav > > cc. John and others > > > > Please attach this modification also to release-3.2.x > > > > Done. I went to http://hg.tw-math.de/release-3-2-x and found description Preparation repository for releases of the 3.2 series owner Jaroslav Hajek last change Tue, 04 Aug 2009 09:55:38 +0200 The last change was at Aug. 4. Did I mistake in finding correct address of release-3-2-x for Mercurial ? Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From highegg at gmail.com Fri Aug 7 00:30:46 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Fri, 7 Aug 2009 07:30:46 +0200 Subject: Octave vs. Matlab speed difference, any suggestions? In-Reply-To: <19067.14282.544272.615417@segfault.lan> References: <24853287.post@talk.nabble.com> <19067.14282.544272.615417@segfault.lan> Message-ID: <69d8d540908062230o2a8b6bcbi6f228052e61dbcdd@mail.gmail.com> On Thu, Aug 6, 2009 at 10:06 PM, John W. Eaton wrote: > On ?6-Aug-2009, szabi-11 wrote: > > | I need to multiply and sum up 3 dimensional matrices. I noticed that my > | script run way slower on octave. I traced the problem to the actual > | multiplication of the matrices. For example take the following script: > | > | --snip -- > | Q=rand(256,256,10); > | W=rand(256,256,10); > | > | tic > | for ind=1:10; > | ? ? ? ? Q(:,:,ind).*W(:,:,ind); > | end > | toc > | --snip-- > | > | On a machine having both matlab ( Version 7.5.0.338 (R2007b)) and octave > | (3.0.5 configured for "x86_64-redhat-linux-gnu") the average timings from a > | few runs are > | > | matlab: 0.0086 seconds > | octave: 0.3350 seconds > | > | Naturally my question is, why? > > Most likely, you are measuring the difference in speed of array > indexing. ?In 3.0.x, Octave created temporary variables for slices > like Q(:,:,ind). ?In 3.2.x, array slices are handled more efficiently. > For example, Octave 3.0.5 on my system runs your example in about .95 > seconds, and Octave 3.2.2 on the same system runs it in about .03 > seconds. ?So I'd recommend upgrading to 3.2.2 and running your test > again. > It may be not just the liboctave indexing part; the sizes are small enough so that the interpreter overhead may also play its role. Still, I'd expect major improvement from switching to 3.2.x. > | On a separate machine (on which I have administrative rights) I checked what > | difference makes if I install an sse2 optimized ATLAS-package instead of the > | general one. The octave results improved roughly 10%. > > That's surprising, since I don't think any BLAS routines are used when > computing element-by-element array products. > Apparently, then, the error of your measurements is at least 0.03s, because BLAS has simply nothing to do with this operation (if there's really .* and not *). tic/toc are only realistic if you try your measurements on an unloaded machine. You may also use cputime. I would suggest increasing the size of matrices and the number of loop cycles. If you'd like to compare the speed of Octave vs. Matlab, the "benchmark" package might be of interest: http://octave.sourceforge.net/benchmark/index.html benchmark_index measures the speed of array indexing. The package is written with care to allow running on Matlab unchanged (it's just m-files). Some 5 months ago Andreas Romeyke compared the BE version of Octave with Matlab 7.6 on his machine; the result was that Octave mostly won the benchmark. I would, of course, love to see more benchmarks (for instance with more recent versions), but you should remember: 1. for us developers, benchmarking the bleeding edge version is the most valuable. older versions may lack some improvements, and benchmarking anything as ancient as 3.0.x is simply pointless for us (though of course it may be still worth for you, if you're stuck with it). 2. the benchmark package uses tic/toc rather than cputime, which may have a fairly coarse resolution (for instance, on my machine, the resolution seems to be 0.004s at best and may be far worse. If you have a single-core machine, you must stop as much background processes as possible, otherwise you may get very misleading results. for dual core machine, usually one core gets the Octave process (which keeps up to 100% CPU usage during the run of the benchmark) and the other core handles other processes, so the result is not that bad; still, I would avoid browsing flash pages or the like. 3. do not expect miracles from Octave, which is not developed by any million dollar company. If you want it to be improved, contribute or donate. cheers -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From highegg at gmail.com Fri Aug 7 00:33:06 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Fri, 7 Aug 2009 07:33:06 +0200 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <20090807002808.44779.qmail@web3803.mail.bbt.yahoo.co.jp> References: <69d8d540908052233m6ed7768fp47468da959397894@mail.gmail.com> <20090807002808.44779.qmail@web3803.mail.bbt.yahoo.co.jp> Message-ID: <69d8d540908062233k4059e688gb259e3a8324e3ec7@mail.gmail.com> 2009/8/7 Tatsuro MATSUOKA : > Hello > > --- Jaroslav Hajek ?wrote: > >> 2009/8/6 Tatsuro MATSUOKA : >> > Hello Jaroslav >> > cc. John and others >> > >> > Please attach this modification also to release-3.2.x >> > >> >> Done. > > I went to > > http://hg.tw-math.de/release-3-2-x > > and found > description ? ? Preparation repository for releases of the 3.2 series > owner ? Jaroslav Hajek > last change ? ? Tue, 04 Aug 2009 09:55:38 +0200 > > The last change was at Aug. 4. > > Did I mistake in finding correct address of release-3-2-x for Mercurial ? > > Regards > > Tatsuro No. I'm just often forgetting to synchronize the repo with my copy. It's up now. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From jolgin.main at gmail.com Fri Aug 7 00:45:04 2009 From: jolgin.main at gmail.com (jolgin.main) Date: Thu, 06 Aug 2009 23:45:04 -0600 Subject: Convert Octave .m file to an executable Message-ID: <4A7BBF60.2020504@gmail.com> Greetings: I'm working in Octave, and was wondering if there is a way to construct a stand-alone, executable file (i.e. a.out file). I know that mablab uses the "mcc " to do so, but was wondering if Octave has that capability. Thank you for your help. Sincerely, John -- John G. Olgin Geophysics Doctoral Student - Physics Instructor University of Texas at El Paso - El Paso Community College 500 W. University - 919 Hunter El Paso El Paso, TX 79968 - El Paso, TX 79915 915-383-5934 jolgin at gmail.com jolgin at cc.epcc.edu URL:http://academics.utep.edu/Default.aspx?tabid=55612 From jolgin.main at gmail.com Fri Aug 7 00:55:40 2009 From: jolgin.main at gmail.com (jolgin.main) Date: Thu, 06 Aug 2009 23:55:40 -0600 Subject: Convert Octave ".m" file to executable file (i.e. a.out) Message-ID: <4A7BC1DC.7040202@gmail.com> Greetings: I'm working in Octave, and was wondering if there is a way to construct a stand-alone, executable file (i.e. a.out file). I know that mablab uses the "mcc " to do so, but was wondering if Octave has that capability. Thank you for your help. Sincerely, John -- John G. Olgin Geophysics Doctoral Student - Physics Instructor University of Texas at El Paso - El Paso Community College 500 W. University - 919 Hunter El Paso El Paso, TX 79968 - El Paso, TX 79915 915-383-5934 jolgin at gmail.com jolgin at cc.epcc.edu URL:http://academics.utep.edu/Default.aspx?tabid=55612 From tmacchant at yahoo.co.jp Fri Aug 7 00:56:33 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Fri, 7 Aug 2009 14:56:33 +0900 (JST) Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: <69d8d540908062233k4059e688gb259e3a8324e3ec7@mail.gmail.com> Message-ID: <20090807055634.20268.qmail@web3814.mail.bbt.yahoo.co.jp> Hello --- Jaroslav Hajek wrote: > > Did I mistake in finding correct address of release-3-2-x for Mercurial ? > > No. I'm just often forgetting to synchronize the repo with my copy. It's up now. > I have confirmed. Thanks!! Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From highegg at gmail.com Fri Aug 7 00:57:14 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Fri, 7 Aug 2009 07:57:14 +0200 Subject: Convert Octave .m file to an executable In-Reply-To: <4A7BBF60.2020504@gmail.com> References: <4A7BBF60.2020504@gmail.com> Message-ID: <69d8d540908062257p3c62161fy5a1efc3abf03c7b8@mail.gmail.com> On Fri, Aug 7, 2009 at 7:45 AM, jolgin.main wrote: > Greetings: > > I'm working in Octave, and was wondering if there is a way to construct > a stand-alone, executable file (i.e. a.out file). ?I know that mablab > uses the "mcc " to do so, but was wondering if Octave has that > capability. ?Thank you for your help. > > Sincerely, > > John No, it doesn't. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From rob at utk.edu Fri Aug 7 10:05:51 2009 From: rob at utk.edu (Rob Mahurin) Date: Fri, 7 Aug 2009 11:05:51 -0400 Subject: Convert Octave .m file to an executable In-Reply-To: <4A7BBF60.2020504@gmail.com> References: <4A7BBF60.2020504@gmail.com> Message-ID: On Aug 7, 2009, at 1:45 AM, jolgin.main wrote: > I'm working in Octave, and was wondering if there is a way to > construct > a stand-alone, executable file (i.e. a.out file). I know that mablab > uses the "mcc " to do so, but was wondering if Octave has that > capability. Thank you for your help. If you begin your .m file with #!/usr/bin/octave -q (or wherever your Octave lives, if not /usr/bin), and set the executable permission bit, then you can run the file from the command line. This is more like shell script or a perl script than a standalone executable. Writing an "occ" would be a big project. Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu From olli.saarela at gmail.com Fri Aug 7 12:24:29 2009 From: olli.saarela at gmail.com (Olli Saarela) Date: Fri, 7 Aug 2009 20:24:29 +0300 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW Message-ID: Hello, Grepping for "fclear" in Octave scripts brought up a corresponding CPU-intensive loop in __gnuplot_ginput__.m. I haven't grepped Octave Forge for this. Thank you for your co-operation on this. Tatsuro's detective work facilitated the diagnosis of the slow-down. Best regards, Olli 2009-08-07 Olli Saarela * plot/__gnuplot_ginput__.m: If read fails to return data, sleep before trying again. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090807/97489d2f/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: __gnuplot_ginput__.diff Type: application/octet-stream Size: 389 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090807/97489d2f/attachment.obj From jwe at octave.org Fri Aug 7 12:47:23 2009 From: jwe at octave.org (John W. Eaton) Date: Fri, 7 Aug 2009 13:47:23 -0400 Subject: Plotting with 3.2.0 on Windows is SLOOOOOOWWWW In-Reply-To: References: Message-ID: <19068.26795.600472.194191@segfault.lan> On 7-Aug-2009, Olli Saarela wrote: | Grepping for "fclear" in Octave scripts brought up a corresponding | CPU-intensive loop in __gnuplot_ginput__.m. I haven't grepped Octave Forge | for this. | | Thank you for your co-operation on this. Tatsuro's detective work | facilitated the diagnosis of the slow-down. | | Best regards, | Olli | | 2009-08-07 Olli Saarela | | * plot/__gnuplot_ginput__.m: If read fails to return data, sleep | before trying again. I made this change, credited to you. In the future, please send bug reports and patches to the bug at octave.org list. It would also help if you could create changesets using mercurial, but that is not essential. Thanks, jwe From jwe at octave.org Fri Aug 7 12:50:18 2009 From: jwe at octave.org (John W. Eaton) Date: Fri, 7 Aug 2009 13:50:18 -0400 Subject: Compiling 3.2.2 on Ubuntu 9.04 In-Reply-To: <1249604860.4429.33.camel@asus> References: <19ade2d80908061156m338b1b5cta1f40987a308a476@mail.gmail.com> <19ade2d80908061703h2c0faa1cqd6df719f0792013a@mail.gmail.com> <1249604860.4429.33.camel@asus> Message-ID: <19068.26970.189849.391159@segfault.lan> On 6-Aug-2009, Thomas D. Dean wrote: | On Thu, 2009-08-06 at 20:03 -0400, Gregory Barendt wrote: | I did the configure and build with a script. | | The only strange things I saw was a missing, expected failure and | eigs.cc may have no tests. | | #make check | ... | src/DLD-FUNCTIONS/dmperm.cc ......................... PASS 5/5 | src/DLD-FUNCTIONS/eig.cc ............................ PASS 20/20 | src/DLD-FUNCTIONS/eigs.cc ........................... | src/DLD-FUNCTIONS/fft.cc ............................ PASS 19/19 | src/DLD-FUNCTIONS/fft2.cc ........................... PASS 4/4 | ... | test_unwind.m ....................................... PASS 2/2 | test_while.m ........................................ PASS 5/5 | Summary: | PASS 5600 | FAIL 0 | There was 1 expected failure (see fntests.log for details). | ... | | And, from fntests.log, | | ... | >>>>> | processing /home/tomdean/Math/Octave/octave-3.2.2/scripts/testfun/test.m | ***** xtest error("This test is known to fail") | !!!!! known failure | This test is known to fail>>>>> | processing /home/tomdean/Math/Octave/octave-3.2.2/scripts/time/addtodate.m | >>>>> | processing /home/tomdean/Math/Octave/octave-3.2.2/scripts/time/asctime.m | ... | | Did someone fix the test and not fix the expectancy? The idea of that test is to test the xtest function itself. So even if every test passes, there will always be one "expected failure". jwe From jwe at octave.org Fri Aug 7 12:55:21 2009 From: jwe at octave.org (John W. Eaton) Date: Fri, 7 Aug 2009 13:55:21 -0400 Subject: octave error In-Reply-To: <902312120908030013w4d3f7918iaea858f443f41d10@mail.gmail.com> References: <902312120908030013w4d3f7918iaea858f443f41d10@mail.gmail.com> Message-ID: <19068.27273.892967.527028@segfault.lan> On 3-Aug-2009, Nuncio M wrote: | Hi octavians, | While compiling the script I got the following error | | error: octave_base_value::array_value(): wrong type argument `complex | matrix' | error: evaluating if command near line 29, column 2 | error: evaluating for command near line 8, column 2 | error: near line 57 of file `/home/nuncio/data/nodc/osd/file.m' | | following is the script | | addpath("/home/nuncio/matandoct/oceans") | addpath("/home/nuncio/matandoct/seawater_ver3_2") | | ext='.txt'; | prefix1='file_'; | prefix2='file_splint_'; | prefix3='file_brfr_'; | for i=2410:2414 | l=i; | mid=int2str(l); | infilename=[prefix1,mid,ext]; | oufilename1=[prefix2,mid,ext]; | oufilename2=[prefix3,mid,ext]; | PR=1000.0; | xx=load(infilename); | mnth=xx(:,1); | dday=xx(:,2); | yyear=xx(:,3); | llon=xx(:,4); | llat=xx(:,5); | lev=xx(:,6); | tem=xx(:,7); | sal=xx(:,8); | disp(infilename); | lev_n=[0:50]*2+1; | sz=length(lev_n); | sz1=length(lev); | disp(lev(sz1)) | if ((length(lev) >= 5) && (lev(sz1) > 80.0)) | disp(infilename); | tem_int=interp1(lev,tem,lev_n,'spline','extrap'); | sal_int=interp1(lev,sal,lev_n,'spline','extrap'); | S=sal_int; | T=tem_int; | P=lev_n; | bf=bvfreq(S,T,P); | nsqd=bf.*bf; | dens= sw_dens(S,T,P); | pden=sw_pden(S,T,P,PR); | % writing tem and salinity to file--------- | fid=fopen(oufilename1,"wt"); | fprintf(fid,'%5.1f %3.1f %3.1f %7.2f %7.2f\n',vertcat(yyear(1),\ | mnth(1),dday(1),llon(1),llat(1))) | fprintf(fid,'%5.1f %9.3f %9.3f %10.3f \n',vertcat(lev_n,tem_int,\ | sal_int,dens)); | fclose(fid); | % -------------------------------------- | % Writing brufre tofile | fid=fopen(oufilename2,"wt"); | fprintf(fid,'%5.1f %3.1f %3.1f %7.2f %7.2f\n',vertcat(yyear(1),\ | mnth(1),dday(1),llon(1),llat(1))) | fprintf(fid,'%5.1f %9.3f\n',\ | vertcat(lev_n(1:50),nsqd)); | fclose(fid) | % -------------------------------------- | endif | endfor Is this script /home/nuncio/data/nodc/osd/file.m? Where is line 57? Unless you omitted some lines, it is at the end of the script, which makes no sense. If you post a complete example, including the data files you are using when you see the error, then someone might be able to help you. Otherwise, I think you will have to debug this problem yourself. jwe From jwe at octave.org Fri Aug 7 12:57:41 2009 From: jwe at octave.org (John W. Eaton) Date: Fri, 7 Aug 2009 13:57:41 -0400 Subject: overloading the global new/delete operator in octave In-Reply-To: <1249307131.4878.1.camel@localhost> References: <920085.24526.qm@web35204.mail.mud.yahoo.com> <1249307131.4878.1.camel@localhost> Message-ID: <19068.27413.390086.246371@segfault.lan> On 3-Aug-2009, Soeren Sonnenburg wrote: | On Mon, 2009-08-03 at 00:13 -0700, Sergei Steshenko wrote: | > | > | > --- On Sun, 8/2/09, Soeren Sonnenburg wrote: | > | > > From: Soeren Sonnenburg | > > Subject: overloading the global new/delete operator in octave | > > To: "Octave users list" | > > Date: Sunday, August 2, 2009, 11:45 AM | > > Dear all, | > > | > > I am a bit puzzled why my overloaded global new[] operator | > > does not | > > become effective when building a octave extension (it works | > > with | > > python/matlab though)... | [...] | > It's probably a (wrong) long shot, but try | > | > fprintf(stderr, "test\n"); | > | > - you know, (un)buffered output. Experimentally stdout sometimes takes a | > lot of time/output to get flushed. | | That was not the cause (and I still don't know what could potentially | cause it). However, I managed to create a an isolated toy example which | works just fine :-) So there could be a problem related to interactions | between the two libraries I link against (which in fact implement this | overloading...). Anyway working isolated example follows: If you post a complete example that demonstrates the problem, maybe someone can help. I'm not sure how we are supposed to help debug a problem when you post an example that doesn't show the problem. :-) jwe From jwe at octave.org Fri Aug 7 13:03:25 2009 From: jwe at octave.org (John W. Eaton) Date: Fri, 7 Aug 2009 14:03:25 -0400 Subject: conditional expr operator in Octave? In-Reply-To: <69d8d540907301202n777551cft96c585209d1758f9@mail.gmail.com> References: <69d8d540907290218h1d730a5cpdc0edcc75e4cebe8@mail.gmail.com> <19056.27238.950130.245970@segfault.lan> <69d8d540907300445q4ff6c19av1e57c81bc98ba0cc@mail.gmail.com> <19057.60208.486625.191199@segfault.lan> <69d8d540907301202n777551cft96c585209d1758f9@mail.gmail.com> Message-ID: <19068.27757.993258.627095@segfault.lan> On 30-Jul-2009, Jaroslav Hajek wrote: | On Thu, Jul 30, 2009 at 8:49 PM, John W. Eaton wrote: | > On 30-Jul-2009, Jaroslav Hajek wrote: | > | > | OK, I'm dropping it; instead, I implemented the "merge" function aka | > | Fortran 90 (which I needed for some time) and slightly extended the | > | scalar mask case to allow arbitrary (even non-array) values. | > | http://hg.savannah.gnu.org/hgweb/octave/rev/833109a9f37f | > | | > | merge (mask, tval, fval) | > | can now be used instead of mask ? tval : fval (except that it does not | > | short-circuit). | > | > The name "merge" doesn't seem very intuitive to me. ?What about using | > "ifelse" instead? | > | | I borrowed the name from Fortran 90. It makes sense if you think of | the array usage: it merges the two arrays, tval and fval, according to | mask. I just realized that this function can actually be used instead | of the conditional operator. | I have no problem calling it ifelse instead, but merge also makes good | sense. OTOH, "ifelse" is probably less likely to clash with anything | else ("merge" can suit many functions), so perhaps it is a better | name. Yes, I was thinking about the scalar case when I suggested ifelse. Thinking about how it works for vectors, I can understand why merge is an appropriate name. And, given the way the function actually works, ifelse could be misleading. For example, I would think of ifelse (COND, X, Y) returning X if COND is true in an overall sense (like the condition of an IF statement), and Y if it is false. So maybe merge is the better name. jwe From muhali at shaw.ca Fri Aug 7 19:06:10 2009 From: muhali at shaw.ca (Muhali) Date: Fri, 7 Aug 2009 17:06:10 -0700 (PDT) Subject: passing parameters to fzero, fsolve? Message-ID: <24873660.post@talk.nabble.com> Is there an easy way to pass parameters to fzero or fsolve? So far I had used fzero from octave-forge where you can pass parameters, but that seems broken currently (missing fsolve_options function) and I would like to switch to the octave version anyway. Muhali -- View this message in context: http://www.nabble.com/passing-parameters-to-fzero%2C-fsolve--tp24873660p24873660.html Sent from the Octave - General mailing list archive at Nabble.com. From shermanj at umd.edu Fri Aug 7 20:04:01 2009 From: shermanj at umd.edu (James Sherman Jr.) Date: Fri, 7 Aug 2009 21:04:01 -0400 Subject: passing parameters to fzero, fsolve? In-Reply-To: <24873660.post@talk.nabble.com> References: <24873660.post@talk.nabble.com> Message-ID: <6800c3890908071804q21e0add7p3ce4e3a268cc5e9a@mail.gmail.com> I'm not quite sure what you're asking here. Octave forge functions are just packages that add additional functions on to standard octave, it doesn't replace any functions as far as I know. On Fri, Aug 7, 2009 at 8:06 PM, Muhali wrote: > > Is there an easy way to pass parameters to fzero or fsolve? > > So far I had used fzero from octave-forge where you can pass parameters, but > that seems broken currently (missing fsolve_options function) and I would > like to switch to the octave version anyway. > > Muhali > > -- > View this message in context: http://www.nabble.com/passing-parameters-to-fzero%2C-fsolve--tp24873660p24873660.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > From xaerochina at gmail.com Fri Aug 7 20:16:34 2009 From: xaerochina at gmail.com (Chengqi Chang) Date: Sat, 08 Aug 2009 09:16:34 +0800 Subject: Convert Octave .m file to an executable (Rob Mahurin) In-Reply-To: References: Message-ID: > I'm working in Octave, and was wondering if there is a way to construct > a stand-alone, executable file (i.e. a.out file). I know that mablab > uses the "mcc " to do so, but was wondering if Octave has that > capability. Thank you for your help. According to : http://www.gnu.org/software/octave/FAQ.html#MATLAB-compatibility "Compiler On a related point, there is no Octave compiler, and so you can't convert your Octave code into a binary for additional speed or distribution. There is an example of how to do this at http://www.stud.tu-ilmenau.de/~rueckn/, but this is a very early example code and would need lots of work to complete it." Best Regards! --------------------------- Sincerely Yours Chengqi Chang China Center for Economic Research Mail: XaeroChina at Gmail.com Personal Website: http://macro2.cn From highegg at gmail.com Fri Aug 7 23:21:19 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Sat, 8 Aug 2009 06:21:19 +0200 Subject: passing parameters to fzero, fsolve? In-Reply-To: <24873660.post@talk.nabble.com> References: <24873660.post@talk.nabble.com> Message-ID: <69d8d540908072121g1b6aaad2h961c0468fa993b94@mail.gmail.com> On Sat, Aug 8, 2009 at 2:06 AM, Muhali wrote: > > Is there an easy way to pass parameters to fzero or fsolve? > > So far I had used fzero from octave-forge where you can pass parameters, but > that seems broken currently (missing fsolve_options function) and I would > like to switch to the octave version anyway. > > Muhali > Type help fzero help optimset cheers -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From nuncio.m at gmail.com Sat Aug 8 00:06:19 2009 From: nuncio.m at gmail.com (Nuncio M) Date: Sat, 8 Aug 2009 10:36:19 +0530 Subject: octave error In-Reply-To: <902312120908030013w4d3f7918iaea858f443f41d10@mail.gmail.com> References: <902312120908030013w4d3f7918iaea858f443f41d10@mail.gmail.com> Message-ID: <902312120908072206g4dd5caf3v60625d0c91490e69@mail.gmail.com> On Mon, Aug 3, 2009 at 12:43 PM, Nuncio M wrote: > Hi octavians, > While compiling the script I got the following error > > error: octave_base_value::array_value(): wrong type argument `complex > matrix' > error: evaluating if command near line 29, column 2 > error: evaluating for command near line 8, column 2 > error: near line 57 of file `/home/nuncio/data/nodc/osd/file.m' > > following is the script > > addpath("/home/nuncio/matandoct/oceans") > addpath("/home/nuncio/matandoct/seawater_ver3_2") > > ext='.txt'; > prefix1='file_'; > prefix2='file_splint_'; > prefix3='file_brfr_'; > for i=2410:2414 > l=i; > mid=int2str(l); > infilename=[prefix1,mid,ext]; > oufilename1=[prefix2,mid,ext]; > oufilename2=[prefix3,mid,ext]; > PR=1000.0; > xx=load(infilename); > mnth=xx(:,1); > dday=xx(:,2); > yyear=xx(:,3); > llon=xx(:,4); > llat=xx(:,5); > lev=xx(:,6); > tem=xx(:,7); > sal=xx(:,8); > disp(infilename); > lev_n=[0:50]*2+1; > sz=length(lev_n); > sz1=length(lev); > disp(lev(sz1)) > if ((length(lev) >= 5) && (lev(sz1) > 80.0)) > disp(infilename); > tem_int=interp1(lev,tem,lev_n,'spline','extrap'); > sal_int=interp1(lev,sal,lev_n,'spline','extrap'); > S=sal_int; > T=tem_int; > P=lev_n; > bf=bvfreq(S,T,P); > nsqd=bf.*bf; > dens= sw_dens(S,T,P); > pden=sw_pden(S,T,P,PR); > % writing tem and salinity to file--------- > fid=fopen(oufilename1,"wt"); > fprintf(fid,'%5.1f %3.1f %3.1f %7.2f %7.2f\n',vertcat(yyear(1),\ > mnth(1),dday(1),llon(1),llat(1))) > fprintf(fid,'%5.1f %9.3f %9.3f %10.3f \n',vertcat(lev_n,tem_int,\ > sal_int,dens)); > fclose(fid); > % -------------------------------------- > % Writing brufre tofile > fid=fopen(oufilename2,"wt"); > fprintf(fid,'%5.1f %3.1f %3.1f %7.2f %7.2f\n',vertcat(yyear(1),\ > mnth(1),dday(1),llon(1),llat(1))) > fprintf(fid,'%5.1f %9.3f\n',\ > vertcat(lev_n(1:50),nsqd)); > fclose(fid) > % -------------------------------------- > endif > endfor > > > -- > Nuncio.M > Research Scientist > National Center for Antarctic and Ocean research > Head land Sada > Vasco da Gamma > Goa-403804 > -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090808/8f0513f8/attachment.html From nuncio.m at gmail.com Sat Aug 8 00:10:54 2009 From: nuncio.m at gmail.com (Nuncio M) Date: Sat, 8 Aug 2009 10:40:54 +0530 Subject: octave error In-Reply-To: <902312120908072206g4dd5caf3v60625d0c91490e69@mail.gmail.com> References: <902312120908030013w4d3f7918iaea858f443f41d10@mail.gmail.com> <902312120908072206g4dd5caf3v60625d0c91490e69@mail.gmail.com> Message-ID: <902312120908072210k3ecfb414v3d43d88fb5ef8736@mail.gmail.com> 57th line is the endfor line i think Iam pasting one of the files i get this error. When I tried with this file alone I got the meggasge that I ve not installed UMFPACK. I installed UMFPACK rpms again I ran the code but octave STILL SAYS UMF pack is not installed. here is the example file 4.0 7.0 2008.0 41.51 -51.20 16.850 3.0070 31.6220 4.0 7.0 2008.0 41.51 -51.20 19.830 2.9980 32.4490 4.0 7.0 2008.0 41.51 -51.20 24.780 2.9980 32.4500 4.0 7.0 2008.0 41.51 -51.20 29.740 2.9970 32.4520 4.0 7.0 2008.0 41.51 -51.20 34.690 2.9960 32.4520 4.0 7.0 2008.0 41.51 -51.20 39.650 2.9890 32.4540 4.0 7.0 2008.0 41.51 -51.20 44.600 2.9960 32.4560 4.0 7.0 2008.0 41.51 -51.20 49.560 2.9830 32.4580 4.0 7.0 2008.0 41.51 -51.20 54.520 2.9820 32.4560 4.0 7.0 2008.0 41.51 -51.20 59.470 2.9860 32.4560 4.0 7.0 2008.0 41.51 -51.20 64.430 2.9720 32.4570 4.0 7.0 2008.0 41.51 -51.20 69.380 2.9750 32.4570 4.0 7.0 2008.0 41.51 -51.20 74.340 2.9680 32.4580 4.0 7.0 2008.0 41.51 -51.20 79.290 2.9620 32.4490 4.0 7.0 2008.0 41.51 -51.20 84.240 2.9440 32.5340 4.0 7.0 2008.0 41.51 -51.20 89.200 2.9400 32.5680 4.0 7.0 2008.0 41.51 -51.20 94.150 2.9190 32.7620 4.0 7.0 2008.0 41.51 -51.20 99.110 2.8860 32.8840 4.0 7.0 2008.0 41.51 -51.20 104.060 2.7920 33.0470 4.0 7.0 2008.0 41.51 -51.20 109.020 2.7470 33.2910 On Sat, Aug 8, 2009 at 10:36 AM, Nuncio M wrote: > > > On Mon, Aug 3, 2009 at 12:43 PM, Nuncio M wrote: > >> Hi octavians, >> While compiling the script I got the following error >> >> error: octave_base_value::array_value(): wrong type argument `complex >> matrix' >> error: evaluating if command near line 29, column 2 >> error: evaluating for command near line 8, column 2 >> error: near line 57 of file `/home/nuncio/data/nodc/osd/file.m' >> >> following is the script >> >> addpath("/home/nuncio/matandoct/oceans") >> addpath("/home/nuncio/matandoct/seawater_ver3_2") >> >> ext='.txt'; >> prefix1='file_'; >> prefix2='file_splint_'; >> prefix3='file_brfr_'; >> for i=2410:2414 >> l=i; >> mid=int2str(l); >> infilename=[prefix1,mid,ext]; >> oufilename1=[prefix2,mid,ext]; >> oufilename2=[prefix3,mid,ext]; >> PR=1000.0; >> xx=load(infilename); >> mnth=xx(:,1); >> dday=xx(:,2); >> yyear=xx(:,3); >> llon=xx(:,4); >> llat=xx(:,5); >> lev=xx(:,6); >> tem=xx(:,7); >> sal=xx(:,8); >> disp(infilename); >> lev_n=[0:50]*2+1; >> sz=length(lev_n); >> sz1=length(lev); >> disp(lev(sz1)) >> if ((length(lev) >= 5) && (lev(sz1) > 80.0)) >> disp(infilename); >> tem_int=interp1(lev,tem,lev_n,'spline','extrap'); >> sal_int=interp1(lev,sal,lev_n,'spline','extrap'); >> S=sal_int; >> T=tem_int; >> P=lev_n; >> bf=bvfreq(S,T,P); >> nsqd=bf.*bf; >> dens= sw_dens(S,T,P); >> pden=sw_pden(S,T,P,PR); >> % writing tem and salinity to file--------- >> fid=fopen(oufilename1,"wt"); >> fprintf(fid,'%5.1f %3.1f %3.1f %7.2f %7.2f\n',vertcat(yyear(1),\ >> mnth(1),dday(1),llon(1),llat(1))) >> fprintf(fid,'%5.1f %9.3f %9.3f %10.3f \n',vertcat(lev_n,tem_int,\ >> sal_int,dens)); >> fclose(fid); >> % -------------------------------------- >> % Writing brufre tofile >> fid=fopen(oufilename2,"wt"); >> fprintf(fid,'%5.1f %3.1f %3.1f %7.2f %7.2f\n',vertcat(yyear(1),\ >> mnth(1),dday(1),llon(1),llat(1))) >> fprintf(fid,'%5.1f %9.3f\n',\ >> vertcat(lev_n(1:50),nsqd)); >> fclose(fid) >> % -------------------------------------- >> endif >> endfor >> >> >> -- >> Nuncio.M >> Research Scientist >> National Center for Antarctic and Ocean research >> Head land Sada >> Vasco da Gamma >> Goa-403804 >> > > > > -- > Nuncio.M > Research Scientist > National Center for Antarctic and Ocean research > Head land Sada > Vasco da Gamma > Goa-403804 > -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090808/00a72a44/attachment.html From lindnerben at gmx.net Wed Aug 5 08:23:56 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Wed, 05 Aug 2009 15:23:56 +0200 Subject: regarding imread in Octave-3.2.0_i686-pc-mingw32_gcc-4.3.0 In-Reply-To: <182560548.4693241247554377017.JavaMail.root@rmail320> References: <182560548.4693241247554377017.JavaMail.root@rmail320> Message-ID: <4A7987EC.4040309@gmx.net> Suren Singh Gahlawat wrote: > Hi, > > I previously used to work with matlab. Just shifted to octave. I work in the domain of image processing. I couldn't figure out about how to read the image. It is giving the following error > >> i = imread('sunset.jpg'); > error: imread: invalid image file: Magick++ exception: Magick: Unable to access configuration file (magic.mgk) reported > by d:/files/admin/octaveforge_svn/trunk/octave-forge/admin/Windows/mingw32/graphicsmagick/GraphicsMagick-1.3.3/magick/bl > ob.c:1824 (GetConfigureBlob) > error: called from: > error: C:\Octave\3.2.0_gcc-4.3.0\share\octave\3.2.0\m\image\imread.m at line 74, column 7 > octave-3.2.0.exe:3:C:\Octave > > I manually tried to put magic.mgk at certain places but doesnt work still. I even downloaded the image module build 1.0.10 but was not able to do using that too. > > Please respond. > This is a known problem which will be fixed in the next octave/mingw32 release. benjamin From nuovodna at gmail.com Sat Aug 8 12:32:40 2009 From: nuovodna at gmail.com (Carletto Rossi) Date: Sat, 8 Aug 2009 19:32:40 +0200 Subject: How to solve a Delay Differential Equation Message-ID: <1a403ba70908081032p51af0b4g9a92874ba815f5d3@mail.gmail.com> Hi, i have to solve an equation like this ds/dt = f(t, s(t-10*DELTA t)) where DELTA t is the time step or time unit. It' s a sort of discrete delay as wikipedia definition says http://en.wikipedia.org/wiki/Delay_differential_equation This equation is a part of a system of ordinary differential equation. On two variables of this system there is this delay. Thanks in advance CR -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090808/d80d1309/attachment.html From muhali at shaw.ca Sat Aug 8 17:23:40 2009 From: muhali at shaw.ca (Muhali) Date: Sat, 8 Aug 2009 15:23:40 -0700 (PDT) Subject: passing parameters to fzero, fsolve? In-Reply-To: <69d8d540908072121g1b6aaad2h961c0468fa993b94@mail.gmail.com> References: <24873660.post@talk.nabble.com> <69d8d540908072121g1b6aaad2h961c0468fa993b94@mail.gmail.com> Message-ID: <24882658.post@talk.nabble.com> Jaroslav Hajek-2 wrote: > > On Sat, Aug 8, 2009 at 2:06 AM, Muhali wrote: >> >> Is there an easy way to pass parameters to fzero or fsolve? >> >> So far I had used fzero from octave-forge where you can pass parameters, >> but >> that seems broken currently (missing fsolve_options function) and I would >> like to switch to the octave version anyway. >> >> Muhali >> > > Type > help fzero > help optimset > I meant parameters to the function to be optimized, not options for the optimization. -- View this message in context: http://www.nabble.com/passing-parameters-to-fzero%2C-fsolve--tp24873660p24882658.html Sent from the Octave - General mailing list archive at Nabble.com. From shermanj at umd.edu Sat Aug 8 20:10:48 2009 From: shermanj at umd.edu (James Sherman Jr.) Date: Sat, 8 Aug 2009 21:10:48 -0400 Subject: passing parameters to fzero, fsolve? In-Reply-To: <24882658.post@talk.nabble.com> References: <24873660.post@talk.nabble.com> <69d8d540908072121g1b6aaad2h961c0468fa993b94@mail.gmail.com> <24882658.post@talk.nabble.com> Message-ID: <6800c3890908081810i1195a603pa08b6fdadeee8a8f@mail.gmail.com> It might help if you post what you're currently doing and why you find what you're currently doing hard/undesirable. Then, we may be able to offer some better help. From muhali at shaw.ca Sun Aug 9 01:55:35 2009 From: muhali at shaw.ca (Muhali) Date: Sat, 8 Aug 2009 23:55:35 -0700 (PDT) Subject: passing parameters to fzero, fsolve? In-Reply-To: <6800c3890908081810i1195a603pa08b6fdadeee8a8f@mail.gmail.com> References: <24873660.post@talk.nabble.com> <69d8d540908072121g1b6aaad2h961c0468fa993b94@mail.gmail.com> <24882658.post@talk.nabble.com> <6800c3890908081810i1195a603pa08b6fdadeee8a8f@mail.gmail.com> Message-ID: <24884689.post@talk.nabble.com> James Sherman Jr.-2 wrote: > > It might help if you post what you're currently doing and why you find > what you're currently doing hard/undesirable. Then, we may be able to > offer some better help. > ok, here is an example: octave:1> function y = foo(x, p) > y = log(x+p) - 1 ; > endfunction octave:2> p = 1 ; octave:3> options.abstol = 1e-2 ; octave:4> fzero("foo", 1, options) error: `p' undefined near line 2 column 11 error: evaluating argument list element number 1 error: evaluating argument list element number 1 error: called from: error: foo at line 2, column 3 error: /home/gerd/loc/octave-3.2/share/octave/3.2.2/m/optimization/fzero.m at line 105, column 6 octave:4> fzero("foo", 1, options, p) error: Invalid call to fzero. Correct usage is: -- Function File: [X, FVAL, INFO, OUTPUT] = fzero (FUN, X0, OPTIONS) Additional help for built-in functions and operators is available in the on-line version of the manual. Use the command `doc ' to search the manual index. Help and information about Octave is also available on the WWW at http://www.octave.org and via the help at octave.org mailing list. octave:4> pkg load optim octave:5> fzero("foo", [-5 5], options, p) ans = -2.5195 -- View this message in context: http://www.nabble.com/passing-parameters-to-fzero%2C-fsolve--tp24873660p24884689.html Sent from the Octave - General mailing list archive at Nabble.com. From highegg at gmail.com Sun Aug 9 02:14:01 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Sun, 9 Aug 2009 09:14:01 +0200 Subject: passing parameters to fzero, fsolve? In-Reply-To: <24884689.post@talk.nabble.com> References: <24873660.post@talk.nabble.com> <69d8d540908072121g1b6aaad2h961c0468fa993b94@mail.gmail.com> <24882658.post@talk.nabble.com> <6800c3890908081810i1195a603pa08b6fdadeee8a8f@mail.gmail.com> <24884689.post@talk.nabble.com> Message-ID: <69d8d540908090014n11921866q93b0a9a418eebf00@mail.gmail.com> On Sun, Aug 9, 2009 at 8:55 AM, Muhali wrote: > > > James Sherman Jr.-2 wrote: >> >> It might help if you post what you're currently doing and why you find >> what you're currently doing hard/undesirable. ?Then, we may be able to >> offer some better help. >> > > ok, here is an example: > > octave:1> function y = foo(x, p) >> y = log(x+p) - 1 ; >> endfunction > octave:2> p = 1 ; > octave:3> options.abstol = 1e-2 ; > octave:4> fzero("foo", 1, options) > error: `p' undefined near line 2 column 11 > error: evaluating argument list element number 1 > error: evaluating argument list element number 1 > error: called from: > error: ? foo at line 2, column 3 > error: ? /home/gerd/loc/octave-3.2/share/octave/3.2.2/m/optimization/fzero.m > at line 105, column 6 > octave:4> fzero("foo", 1, options, p) > error: Invalid call to fzero. ?Correct usage is: > > ?-- Function File: [X, FVAL, INFO, OUTPUT] = fzero (FUN, X0, OPTIONS) > > > Additional help for built-in functions and operators is > available in the on-line version of the manual. ?Use the command > `doc ' to search the manual index. > > Help and information about Octave is also available on the WWW > at http://www.octave.org and via the help at octave.org > mailing list. > octave:4> pkg load optim > octave:5> fzero("foo", [-5 5], options, p) > ans = -2.5195 > Octave's fsolve, fzero and fminunc do not support passing additional arguments this way, and I think it is considered deprecated even by MathWorks. As of now, I have no intentions to add the support. The "modern" way is to construct a function handle: fzero (@(x) foo (x, p), [-5, 5], options) function handles are more general and powerful tool to accomplish the goal, and they require no special code support in each function you need. another possibility is to use global shared variables. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From nuncio.m at gmail.com Mon Aug 10 00:38:01 2009 From: nuncio.m at gmail.com (Nuncio M) Date: Mon, 10 Aug 2009 11:08:01 +0530 Subject: file closing Message-ID: <902312120908092238o4d5f042ev64878ba77d54be79@mail.gmail.com> Hi all, How to close a file opened with 'load' command, like load myfile.txt Thank you nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090810/73f12318/attachment.html From highegg at gmail.com Mon Aug 10 00:50:37 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Mon, 10 Aug 2009 07:50:37 +0200 Subject: file closing In-Reply-To: <902312120908092238o4d5f042ev64878ba77d54be79@mail.gmail.com> References: <902312120908092238o4d5f042ev64878ba77d54be79@mail.gmail.com> Message-ID: <69d8d540908092250n7b37e574m1e4a75aac79aa456@mail.gmail.com> On Mon, Aug 10, 2009 at 7:38 AM, Nuncio M wrote: > Hi all, > ???????? How to close a file opened with 'load' command, like > load myfile.txt > Thank you > nuncio > There is no need. The file should be closed automatically upon completion of the load command. hth -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From j.schreiber at email.de Mon Aug 10 07:33:01 2009 From: j.schreiber at email.de (J Schreiber) Date: Mon, 10 Aug 2009 14:33:01 +0200 Subject: dataaspectratio Message-ID: <4A80137D.3010808@email.de> Hi, I would like to get plots where y and x axis have the same scale. this works in matlab, unfortunately not in octave, both win and linux. The ratio depends on the size of the figure window. the following plot does fill the figure window, after the set command the plot is centered in to the middle vertically, (although the get says, that it had 1 1 1 before) the same when figurewindow is higher than wide. octave:14> plot(rand(3)) octave:15> get(gca,'dataaspectratio') ans = 1 1 1 octave:16> set(gca,'dataaspectratio',[1 1 1]) octave:17> ver ---------------------------------------------------------------------- GNU Octave Version 3.0.0 GNU Octave License: GNU General Public License Operating System: Linux 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 ---------------------------------------------------------------------- best regards J?rg Schreiber -------------- next part -------------- A non-text attachment was scrubbed... Name: octaveplotaspectratio.jpg Type: image/jpeg Size: 26046 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090810/33eb36ed/attachment-0001.jpg From todd.davidson at selexgalileo.com Mon Aug 10 03:48:39 2009 From: todd.davidson at selexgalileo.com (Davidson, Todd (SELEX GALILEO, UK)) Date: Mon, 10 Aug 2009 09:48:39 +0100 Subject: Starting Octave Message-ID: Umm... feeling kind of silly, here. I've downloaded Octave 3.2.2, but can't run it, because I can't find a .exe file. How do I start up the program? I'm just using it as a MATLAB alternative for a university project. Thanks, Todd SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090810/5d16a5e7/attachment.html From matthias at brennwald.org Mon Aug 10 09:24:07 2009 From: matthias at brennwald.org (Matthias Brennwald) Date: Mon, 10 Aug 2009 16:24:07 +0200 Subject: Loading ASCII data files quickly Message-ID: Dear all I've got a few data files with a short header followed by two colums of data (see example below). The header data is marked by '*' signs, like this: ------------------------------ * TMD data written by MATAA on 10-Aug-2009 15:37:39 * MSW, 0 deg., no filter 0 -6.49888e-08 1.04167e-05 -1.77097e-07 2.08333e-05 2.53872e-07 3.125e-05 9.02216e-07 4.16667e-05 1.13457e-06 5.20833e-05 6.72286e-07 6.25e-05 -1.5686e-07 7.29167e-05 -6.71451e-07 8.33333e-05 -5.46739e-07 9.375e-05 -7.39792e-08 0.000104167 1.52549e-07 0.000114583 -9.41797e-08 . . . ------------------------------ I tried to read line by line using fgetl(...) into a string. If the line starts with an '*', it is treated as header line. Otherwise it is transformed into numbers using str2num(...). This line-by-line procedure works, but is too slow for large files. I believe it would be much more efficient to read only the header lines using this method, and then use a file command that loads the rest of the data in one step. Any hints or ideas how I can do this? Matthias ---- Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 17 03 From individ at acc.umu.se Mon Aug 10 09:23:32 2009 From: individ at acc.umu.se (David Grundberg) Date: Mon, 10 Aug 2009 16:23:32 +0200 Subject: Starting Octave In-Reply-To: References: Message-ID: <4A802D64.2020400@acc.umu.se> Davidson, Todd (SELEX GALILEO, UK) wrote: > Umm... feeling kind of silly, here. > > I've downloaded Octave 3.2.2, but can't run it, because I can't find a > .exe file. How do I start up the program? I'm just using it as a > MATLAB alternative for a university project. > > Thanks, > Todd > SELEX Sensors and Airborne Systems Limited > Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL > A company registered in England & Wales. Company no. 02426132 > ******************************************************************** > This email and any attachments are confidential to the intended > recipient and may also be privileged. If you are not the intended > recipient please delete it from your system and notify the sender. > You should not copy it or use it for any purpose nor disclose or > distribute its contents to any other person. > ******************************************************************** > What package are you using? My best guess it that you have downloaded the sources. I suggest going to octave.org, choose Download in the menubar and read the Windows section. David From dastew at sympatico.ca Mon Aug 10 09:43:39 2009 From: dastew at sympatico.ca (dastew at sympatico.ca) Date: Mon, 10 Aug 2009 14:43:39 +0000 Subject: Starting Octave In-Reply-To: References: Message-ID: Subject: Starting Octave Date: Mon, 10 Aug 2009 09:48:39 +0100 From: todd.davidson at selexgalileo.com To: help at octave.org Umm... feeling kind of silly, here. I've downloaded Octave 3.2.2, but can't run it, because I can't find a .exe file. How do I start up the program? I'm just using it as a MATLAB alternative for a university project. Thanks, Todd Tell us more: What OS are you using? Where and how did you get Octave? Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090810/0b63f4ce/attachment.html From tlange at gwdg.de Mon Aug 10 09:58:02 2009 From: tlange at gwdg.de (Torsten Lange) Date: Mon, 10 Aug 2009 16:58:02 +0200 Subject: Loading ASCII data files quickly In-Reply-To: References: Message-ID: <200908101658.02904.tlange@gwdg.de> Hi Mathias, if you don't need to extract e.g. the time from the headers you may - as a simple work around - add a comment to the header lines using sed by system call before you read the files using load()? This usually is my approach. Sorry, I don't have much expertise in octave's capabilities to do these jobs. Torsten Am Montag, 10. August 2009 16:24:07 schrieb Matthias Brennwald: > Dear all > > I've got a few data files with a short header followed by two colums > of data (see example below). The header data is marked by '*' signs, > like this: > > ------------------------------ > * TMD data written by MATAA on 10-Aug-2009 15:37:39 > * MSW, 0 deg., no filter > 0 -6.49888e-08 > 1.04167e-05 -1.77097e-07 > 2.08333e-05 2.53872e-07 > 3.125e-05 9.02216e-07 > 4.16667e-05 1.13457e-06 > 5.20833e-05 6.72286e-07 > 6.25e-05 -1.5686e-07 > 7.29167e-05 -6.71451e-07 > 8.33333e-05 -5.46739e-07 > 9.375e-05 -7.39792e-08 > 0.000104167 1.52549e-07 > 0.000114583 -9.41797e-08 > . > . > . > ------------------------------ > > I tried to read line by line using fgetl(...) into a string. If the > line starts with an '*', it is treated as header line. Otherwise it is > transformed into numbers using str2num(...). This line-by-line > procedure works, but is too slow for large files. I believe it would > be much more efficient to read only the header lines using this > method, and then use a file command that loads the rest of the data in > one step. Any hints or ideas how I can do this? > > Matthias > > > ---- > Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 > 17 03 > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave From Potorti at isti.cnr.it Mon Aug 10 10:02:03 2009 From: Potorti at isti.cnr.it (Francesco Potorti`) Date: Mon, 10 Aug 2009 17:02:03 +0200 Subject: Loading ASCII data files quickly In-Reply-To: References: Message-ID: >I've got a few data files with a short header followed by two colums >of data (see example below). The header data is marked by '*' signs, >like this: > >------------------------------ >* TMD data written by MATAA on 10-Aug-2009 15:37:39 >* MSW, 0 deg., no filter >0 -6.49888e-08 >1.04167e-05 -1.77097e-07 >2.08333e-05 2.53872e-07 >3.125e-05 9.02216e-07 >4.16667e-05 1.13457e-06 Have you tried dlmread? -- Francesco Potort? (ricercatore) Voice: +39 050 315 3058 (op.2111) ISTI - Area della ricerca CNR Fax: +39 050 315 2040 via G. Moruzzi 1, I-56124 Pisa Email: Potorti at isti.cnr.it (entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/ From C.Ellenberger at gmx.net Mon Aug 10 10:03:29 2009 From: C.Ellenberger at gmx.net (Christoph Ellenberger) Date: Mon, 10 Aug 2009 17:03:29 +0200 Subject: Loading ASCII data files quickly In-Reply-To: References: Message-ID: <20090810150329.289170@gmx.net> I usually use sed to straighten the data and then do the load thing.... something like: cmd=['sed -n -e "/^ *[0-9]/p" ' fname ">" Tfname]; if (system(cmd,1)) error("Fehler 1"); end xx=load(Tfname); where fname is the filename and tfname is some temporary filename which I remove afterword with.... cmd=["rm " Tfname]; if (system(cmd,1)) error("Fehler 4"); end but this depends on what structure do you want afterward. I sometimes have the coulumnames in the file as well and create a cellarray with the datapoints called Data.X, Data.Y etc. as well. Hope this helps Christoph -------- Original-Nachricht -------- > Datum: Mon, 10 Aug 2009 16:24:07 +0200 > Von: Matthias Brennwald > An: help at octave.org > Betreff: Loading ASCII data files quickly > Dear all > > I've got a few data files with a short header followed by two colums > of data (see example below). The header data is marked by '*' signs, > like this: > > ------------------------------ > * TMD data written by MATAA on 10-Aug-2009 15:37:39 > * MSW, 0 deg., no filter > 0 -6.49888e-08 > 1.04167e-05 -1.77097e-07 > 2.08333e-05 2.53872e-07 > 3.125e-05 9.02216e-07 > 4.16667e-05 1.13457e-06 > 5.20833e-05 6.72286e-07 > 6.25e-05 -1.5686e-07 > 7.29167e-05 -6.71451e-07 > 8.33333e-05 -5.46739e-07 > 9.375e-05 -7.39792e-08 > 0.000104167 1.52549e-07 > 0.000114583 -9.41797e-08 > . > . > . > ------------------------------ > > I tried to read line by line using fgetl(...) into a string. If the > line starts with an '*', it is treated as header line. Otherwise it is > transformed into numbers using str2num(...). This line-by-line > procedure works, but is too slow for large files. I believe it would > be much more efficient to read only the header lines using this > method, and then use a file command that loads the rest of the data in > one step. Any hints or ideas how I can do this? > > Matthias > > > ---- > Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 > 17 03 > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From matthias at brennwald.org Mon Aug 10 10:24:42 2009 From: matthias at brennwald.org (Matthias Brennwald) Date: Mon, 10 Aug 2009 17:24:42 +0200 Subject: Loading ASCII data files quickly In-Reply-To: <20090810150329.289170@gmx.net> References: <20090810150329.289170@gmx.net> Message-ID: On Aug 10, 2009, at 5:03 PM, Christoph Ellenberger wrote: > I usually use sed to straighten the data and then do the load > thing.... > something like: > > cmd=['sed -n -e "/^ *[0-9]/p" ' fname ">" Tfname]; > if (system(cmd,1)) > error("Fehler 1"); > end > > xx=load(Tfname); > > > where fname is the filename and tfname is some temporary filename > which I remove afterword with.... > > cmd=["rm " Tfname]; > if (system(cmd,1)) > error("Fehler 4"); > end > > but this depends on what structure do you want afterward. I > sometimes have the coulumnames in the file as well and create a > cellarray with the datapoints called Data.X, Data.Y etc. as well. > > Hope this helps > Christoph Ok, but this requires sed to be available. My code needs to work with non-unixy machines, too. ---- Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 17 03 From michael at grossbach.org Mon Aug 10 11:09:09 2009 From: michael at grossbach.org (Michael Grossbach) Date: Mon, 10 Aug 2009 18:09:09 +0200 Subject: Loading ASCII data files quickly In-Reply-To: References: <20090810150329.289170@gmx.net> Message-ID: <4A804625.4070604@grossbach.org> Matthias Brennwald wrote: > On Aug 10, 2009, at 5:03 PM, Christoph Ellenberger wrote: > >> I usually use sed to straighten the data and then do the load >> thing.... >> something like: >> >> cmd=['sed -n -e "/^ *[0-9]/p" ' fname ">" Tfname]; >> if (system(cmd,1)) >> error("Fehler 1"); >> end >> >> xx=load(Tfname); >> >> >> where fname is the filename and tfname is some temporary filename >> which I remove afterword with.... >> >> cmd=["rm " Tfname]; >> if (system(cmd,1)) >> error("Fehler 4"); >> end >> >> but this depends on what structure do you want afterward. I >> sometimes have the coulumnames in the file as well and create a >> cellarray with the datapoints called Data.X, Data.Y etc. as well. >> >> Hope this helps >> Christoph > > Ok, but this requires sed to be available. My code needs to work with > non-unixy machines, too. > Try reading the header lines using fgetl and the rest of the data with fscanf. Not tested: function tdm = tdmread(path2tdmfile) [fid, msg] = fopen(path2tdmfile, 'r'); if fid < 3, error(msg), endif first = fgetl(fid); second = fgetl(fid); data = fscanf(fid, '%f%f', Inf) tdm = struct('header', {first; second}, 'data', data); fclose(fid); HTH, Michael From matthias at brennwald.org Mon Aug 10 10:44:54 2009 From: matthias at brennwald.org (Matthias Brennwald) Date: Mon, 10 Aug 2009 17:44:54 +0200 Subject: Help-octave Digest, Vol 41, Issue 22 In-Reply-To: References: Message-ID: On Aug 10, 2009, at 5:32 PM, help-octave-request at octave.org wrote: > Message: 6 > Date: Mon, 10 Aug 2009 17:02:03 +0200 > From: Francesco Potorti` > Subject: Re: Loading ASCII data files quickly > To: Matthias Brennwald > Cc: help at octave.org > Message-ID: > Content-Type: text/plain; charset=utf-8 > >> I've got a few data files with a short header followed by two colums >> of data (see example below). The header data is marked by '*' signs, >> like this: >> >> ------------------------------ >> * TMD data written by MATAA on 10-Aug-2009 15:37:39 >> * MSW, 0 deg., no filter >> 0 -6.49888e-08 >> 1.04167e-05 -1.77097e-07 >> 2.08333e-05 2.53872e-07 >> 3.125e-05 9.02216e-07 >> 4.16667e-05 1.13457e-06 > > Have you tried dlmread? Uhm, I just did. I put my example data from my original message into a text file (~/Desktop/testy.txt) and tried the following: ------ octave:56> dlmread ('~/Desktop/testy.txt'); error: dlmread: unable to open file `~/Desktop/testy.txt' octave:56> dlmread ('~/Desktop/testy.txt',' ',2,0); error: dlmread: unable to open file `~/Desktop/testy.txt' octave:56> ------ What am I doing wrong? Matthias -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090810/fc997546/attachment.html From jwe at octave.org Mon Aug 10 11:17:47 2009 From: jwe at octave.org (John W. Eaton) Date: Mon, 10 Aug 2009 12:17:47 -0400 Subject: dataaspectratio In-Reply-To: <4A80137D.3010808@email.de> References: <4A80137D.3010808@email.de> Message-ID: <19072.18475.808165.476800@segfault.lan> On 10-Aug-2009, J Schreiber wrote: | I would like to get plots where y and x axis have the same scale. | | this works in matlab, unfortunately not in octave, both win and linux. | | The ratio depends on the size of the figure window. | | the following plot does fill the figure window, after the set command | the plot is centered in to the middle vertically, | | (although the get says, that it had 1 1 1 before) | | the same when figurewindow is higher than wide. | | | | | octave:14> plot(rand(3)) | octave:15> get(gca,'dataaspectratio') | ans = | | 1 1 1 | | octave:16> set(gca,'dataaspectratio',[1 1 1]) | octave:17> ver | ---------------------------------------------------------------------- | GNU Octave Version 3.0.0 I'd recommend upgrading to 3.2.2. jwe From jwe at octave.org Mon Aug 10 11:19:49 2009 From: jwe at octave.org (John W. Eaton) Date: Mon, 10 Aug 2009 12:19:49 -0400 Subject: octave error In-Reply-To: <902312120908072210k3ecfb414v3d43d88fb5ef8736@mail.gmail.com> References: <902312120908030013w4d3f7918iaea858f443f41d10@mail.gmail.com> <902312120908072206g4dd5caf3v60625d0c91490e69@mail.gmail.com> <902312120908072210k3ecfb414v3d43d88fb5ef8736@mail.gmail.com> Message-ID: <19072.18597.786910.743885@segfault.lan> On 8-Aug-2009, Nuncio M wrote: | 57th line is the endfor line i think Iam pasting one of the files i get this | error. When I tried with this file alone I got the meggasge that I ve not | installed UMFPACK. I installed UMFPACK rpms again I ran the code but octave | STILL SAYS UMF pack is not installed. | here is the example file Did you compile Octave yourself? If you did not have UMFPACK installed when you ran Octave's configure script, it won't be used. So if you later install UMFPACK, you will need to reconfigure and compile Octave to be able to use it. jwe From todd.davidson at selexgalileo.com Mon Aug 10 09:48:12 2009 From: todd.davidson at selexgalileo.com (Davidson, Todd (SELEX GALILEO, UK)) Date: Mon, 10 Aug 2009 15:48:12 +0100 Subject: Starting Octave In-Reply-To: <4A802D64.2020400@acc.umu.se> References: <4A802D64.2020400@acc.umu.se> Message-ID: Yeah, that'd do it. I just followed the first link, and so downloaded the .tar.gz :S Thanks for your help! T -----Original Message----- From: David Grundberg [mailto:individ at acc.umu.se] Sent: 10 August 2009 15:24 To: Davidson, Todd (SELEX GALILEO, UK) Cc: Subject: Re: Starting Octave *** WARNING *** This message has originated outside your organisation, either from an external partner or the Global Internet. Keep this in mind if you answer this message. Davidson, Todd (SELEX GALILEO, UK) wrote: > Umm... feeling kind of silly, here. > > I've downloaded Octave 3.2.2, but can't run it, because I can't find a > .exe file. How do I start up the program? I'm just using it as a > MATLAB alternative for a university project. > > Thanks, > Todd > SELEX Sensors and Airborne Systems Limited > Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL > A company registered in England & Wales. Company no. 02426132 > ******************************************************************** > This email and any attachments are confidential to the intended > recipient and may also be privileged. If you are not the intended > recipient please delete it from your system and notify the sender. > You should not copy it or use it for any purpose nor disclose or > distribute its contents to any other person. > ******************************************************************** > What package are you using? My best guess it that you have downloaded the sources. I suggest going to octave.org, choose Download in the menubar and read the Windows section. David From macy at sfo.com Mon Aug 10 12:48:32 2009 From: macy at sfo.com (macy at sfo.com) Date: Mon, 10 Aug 2009 10:48:32 -0700 (PDT) Subject: Loading ASCII data files quickly In-Reply-To: References: <20090810150329.289170@gmx.net> Message-ID: <1562.66.81.42.52.1249926512.squirrel@cp01.sfo.com> > Ok, but this requires sed to be available. My code needs to work with > non-unixy machines, too. > > > ---- > Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 > 17 03 > You say a 'few' files? I just strip off the headers with a text editor: Notepad, Wordpad, Scilab, etc and then name the stripped file something simple like d.txt Then read in d.txt, convert to the variable names I really wanted, then save the variables using octave with the new name as .bin file so it's faster next time. Only works well if it is a 'few' files. Else, bite my tongue, try python, it's awesome at file manipulations pre-octave use. Robert From rob at utk.edu Mon Aug 10 13:36:34 2009 From: rob at utk.edu (Rob Mahurin) Date: Mon, 10 Aug 2009 14:36:34 -0400 Subject: Help-octave Digest, Vol 41, Issue 22 In-Reply-To: References: Message-ID: <90285A7D-2A0C-466F-84EF-5CE4244E21B9@utk.edu> On Aug 10, 2009, at 11:44 AM, Matthias Brennwald wrote: > On Aug 10, 2009, at 5:32 PM, help-octave-request at octave.org wrote: >> Have you tried dlmread? > > Uhm, I just did. I put my example data from my original message > into a text file (~/Desktop/testy.txt) and tried the following: > > ------ > octave:56> dlmread ('~/Desktop/testy.txt'); > error: dlmread: unable to open file `~/Desktop/testy.txt' > octave:56> dlmread ('~/Desktop/testy.txt',' ',2,0); > error: dlmread: unable to open file `~/Desktop/testy.txt' > octave:56> > ------ > > What am I doing wrong? On my system, dlmread doesn't expand tildes: > octave:6> dlmread ("~/tmp.txt") > error: dlmread: unable to open file `~/tmp.txt' > octave:6> dlmread ("/Users/rob/tmp.txt") > ans = [...] Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu From Allen.Windhorn at emerson.com Mon Aug 10 13:49:40 2009 From: Allen.Windhorn at emerson.com (Allen.Windhorn at emerson.com) Date: Mon, 10 Aug 2009 13:49:40 -0500 Subject: Loading ASCII data files quickly In-Reply-To: <1562.66.81.42.52.1249926512.squirrel@cp01.sfo.com> Message-ID: -----Original Message----- From: macy at sfo.com [mailto:macy at sfo.com] > Ok, but this requires sed to be available. My code needs to work with > non-unixy machines, too. Anyway you can easily get a copy of sed for a Windows machine, and it's probably already installed on newer Macs. Thought about edlin but it doesn't have a batch mode. You can do "edlin foo.txt References: <20090810150329.289170@gmx.net> Message-ID: <200908102100.26450.c.ellenberger@gmx.net> On Monday 10 August 2009 17.24:42 Matthias Brennwald wrote: > On Aug 10, 2009, at 5:03 PM, Christoph Ellenberger wrote: > > I usually use sed to straighten the data and then do the load > > thing.... > > something like: > > > > cmd=['sed -n -e "/^ *[0-9]/p" ' fname ">" Tfname]; > > if (system(cmd,1)) > > error("Fehler 1"); > > end > > > > xx=load(Tfname); > > > > > > where fname is the filename and tfname is some temporary filename > > which I remove afterword with.... > > > > cmd=["rm " Tfname]; > > if (system(cmd,1)) > > error("Fehler 4"); > > end > > > > but this depends on what structure do you want afterward. I > > sometimes have the coulumnames in the file as well and create a > > cellarray with the datapoints called Data.X, Data.Y etc. as well. > > > > Hope this helps > > Christoph > > Ok, but this requires sed to be available. My code needs to work with > non-unixy machines, too. Actually this is code I use on a windows machine, because sed is available there as well :). I tested this with the sourceforge versions 3.0.5 MSVC and the newer 3.2.0 mingw. works like a charm. > > ---- > Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 > 17 03 From jwe at octave.org Mon Aug 10 14:19:22 2009 From: jwe at octave.org (John W. Eaton) Date: Mon, 10 Aug 2009 15:19:22 -0400 Subject: Help-octave Digest, Vol 41, Issue 22 In-Reply-To: <90285A7D-2A0C-466F-84EF-5CE4244E21B9@utk.edu> References: <90285A7D-2A0C-466F-84EF-5CE4244E21B9@utk.edu> Message-ID: <19072.29370.244623.274014@segfault.lan> On 10-Aug-2009, Rob Mahurin wrote: | On Aug 10, 2009, at 11:44 AM, Matthias Brennwald wrote: | > On Aug 10, 2009, at 5:32 PM, help-octave-request at octave.org wrote: | >> Have you tried dlmread? | > | > Uhm, I just did. I put my example data from my original message | > into a text file (~/Desktop/testy.txt) and tried the following: | > | > ------ | > octave:56> dlmread ('~/Desktop/testy.txt'); | > error: dlmread: unable to open file `~/Desktop/testy.txt' | > octave:56> dlmread ('~/Desktop/testy.txt',' ',2,0); | > error: dlmread: unable to open file `~/Desktop/testy.txt' | > octave:56> | > ------ | > | > What am I doing wrong? | | On my system, dlmread doesn't expand tildes: | | > octave:6> dlmread ("~/tmp.txt") | > error: dlmread: unable to open file `~/tmp.txt' | > octave:6> dlmread ("/Users/rob/tmp.txt") | > ans = [...] I checked in the following change. http://hg.savannah.gnu.org/hgweb/octave/rev/56e850e3b06f Thanks, jwe From matthias at brennwald.org Mon Aug 10 15:42:15 2009 From: matthias at brennwald.org (Matthias Brennwald) Date: Mon, 10 Aug 2009 22:42:15 +0200 Subject: Loading ASCII data files quickly In-Reply-To: <4A8045DC.1050403@grossbach.org> References: <20090810150329.289170@gmx.net> <4A8045DC.1050403@grossbach.org> Message-ID: <17ED811C-552C-4395-886C-E3F7891AD114@brennwald.org> On Aug 10, 2009, at 6:07 PM, Michael Grossbach wrote: > Matthias Brennwald wrote: >> On Aug 10, 2009, at 5:03 PM, Christoph Ellenberger wrote: >>> I usually use sed to straighten the data and then do the load >>> thing.... >>> something like: >>> >>> cmd=['sed -n -e "/^ *[0-9]/p" ' fname ">" Tfname]; >>> if (system(cmd,1)) >>> error("Fehler 1"); >>> end >>> >>> xx=load(Tfname); >>> >>> >>> where fname is the filename and tfname is some temporary filename >>> which I remove afterword with.... >>> >>> cmd=["rm " Tfname]; >>> if (system(cmd,1)) >>> error("Fehler 4"); >>> end >>> >>> but this depends on what structure do you want afterward. I >>> sometimes have the coulumnames in the file as well and create a >>> cellarray with the datapoints called Data.X, Data.Y etc. as well. >>> >>> Hope this helps >>> Christoph >> Ok, but this requires sed to be available. My code needs to work >> with non-unixy machines, too. > > Try reading the header lines using fgetl and the rest of the data > with fscanf. > Not tested: > function tdm = tdmread(path2tdmfile) > [fid, msg] = fopen(path2tdmfile, 'r'); > if fid < 3, error(msg), endif > first = fgetl(fid); > second = fgetl(fid); > data = fscanf(fid, '%f%f', Inf) > tdm = struct('header', {first; second}, 'data', data); > fclose(fid); > > HTH, Michael This does the trick, thanks. The only thing I needed to add was to reshape the 'data' variable to 2 columns (the above yields a one- column variable). Thanks Matthias ---- Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 17 03 From matthias at brennwald.org Mon Aug 10 15:44:48 2009 From: matthias at brennwald.org (Matthias Brennwald) Date: Mon, 10 Aug 2009 22:44:48 +0200 Subject: Loading ASCII data files quickly In-Reply-To: <90285A7D-2A0C-466F-84EF-5CE4244E21B9@utk.edu> References: <90285A7D-2A0C-466F-84EF-5CE4244E21B9@utk.edu> Message-ID: On Aug 10, 2009, at 8:36 PM, Rob Mahurin wrote: > On my system, dlmread doesn't expand tildes: Urgh, yep, that was the problem. Is this a bug or a feature? I added a tilde_expand(...) command, now dlmread works as expected. Matthias From sergstesh at yahoo.com Tue Aug 11 04:08:10 2009 From: sergstesh at yahoo.com (Sergei Steshenko) Date: Tue, 11 Aug 2009 02:08:10 -0700 (PDT) Subject: Loading ASCII data files quickly In-Reply-To: Message-ID: <796703.98490.qm@web35203.mail.mud.yahoo.com> --- On Mon, 8/10/09, Matthias Brennwald wrote: > From: Matthias Brennwald > Subject: Loading ASCII data files quickly > To: help at octave.org > Date: Monday, August 10, 2009, 7:24 AM > Dear all > > I've got a few data files with a short header followed by > two colums? > of data (see example below). The header data is marked by > '*' signs,? > like this: > > ------------------------------ > * TMD data written by MATAA on 10-Aug-2009 15:37:39 > * MSW, 0 deg., no filter > 0??? -6.49888e-08 > 1.04167e-05??? -1.77097e-07 > 2.08333e-05??? 2.53872e-07 > 3.125e-05??? 9.02216e-07 > 4.16667e-05??? 1.13457e-06 > 5.20833e-05??? 6.72286e-07 > 6.25e-05??? -1.5686e-07 > 7.29167e-05??? -6.71451e-07 > 8.33333e-05??? -5.46739e-07 > 9.375e-05??? -7.39792e-08 > 0.000104167??? 1.52549e-07 > 0.000114583??? -9.41797e-08 > . > . > . > ------------------------------ > > I tried to read line by line using fgetl(...) into a > string. If the? > line starts with an '*', it is treated as header line. > Otherwise it is? > transformed into numbers using str2num(...). This > line-by-line? > procedure works, but is too slow for large files. I believe > it would? > be much more efficient to read only the header lines using > this? > method, and then use a file command that loads the rest of > the data in? > one step. Any hints or ideas how I can do this? > > Matthias > > > ---- > Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, > +41 44 364? > 17 03 > > There is Perl for many systems, including Windows. And 'grep'. For a simple case like this 'grep' is sufficient to get rid of header. Regards, Sergei. From daniel at priewasser.net Tue Aug 11 06:08:43 2009 From: daniel at priewasser.net (Daniel Priewasser) Date: Tue, 11 Aug 2009 13:08:43 +0200 Subject: VertexLabeling Message-ID: <5964D9F9-8A9C-43C2-BFC8-E3A165CF6EAC@priewasser.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I use Octave to plot trees using the treeplot command. Is it possible to enable some kind of vertex labeling? Something like Matlab does automatically and Mathematica has as parameter "VertexLabeling -> True", to show the vertex name as labels. Thanks in advance, Daniel. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkqBUTsACgkQoRBKmNv19iva6QCeMs7ySgWbFaKYUSNHa7ja9WLr chcAnAuZeOkaErbcPGrhRhMWvPK1h7I+ =x21b -----END PGP SIGNATURE----- From daniel.priewasser at gmail.com Tue Aug 11 04:14:26 2009 From: daniel.priewasser at gmail.com (Daniel Priewasser) Date: Tue, 11 Aug 2009 11:14:26 +0200 Subject: VertexLabeling Message-ID: <7bfb19950908110214q29604604oef49d37953f55e37@mail.gmail.com> Hello, I use Octave to plot trees using the treeplot command. Is it possible to enable some kind of vertex labeling? Something like Matlab does automatically and Mathematica has as parameter "VertexLabeling -> True", to show the vertex name as labels. Thanks in advance, Daniel. From rob at utk.edu Tue Aug 11 11:11:08 2009 From: rob at utk.edu (Rob Mahurin) Date: Tue, 11 Aug 2009 12:11:08 -0400 Subject: Loading ASCII data files quickly In-Reply-To: References: <90285A7D-2A0C-466F-84EF-5CE4244E21B9@utk.edu> Message-ID: <246FC9FC-40BF-4C36-8BDA-70136C6FB8A7@utk.edu> On Aug 10, 2009, at 4:44 PM, Matthias Brennwald wrote: > On Aug 10, 2009, at 8:36 PM, Rob Mahurin wrote: >> On my system, dlmread doesn't expand tildes: > > Urgh, yep, that was the problem. Is this a bug or a feature? I added a > tilde_expand(...) command, now dlmread works as expected. A bug, fixed in the development sources. Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu From bare at www.roboticresearch.com Tue Aug 11 12:55:10 2009 From: bare at www.roboticresearch.com (Justin Bare) Date: Tue, 11 Aug 2009 13:55:10 -0400 (EDT) Subject: Exporting a variable to the global workspace from a C++ function Message-ID: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> Hi, I am writing a function in C++ that will be called from Octave (using the information found at http://octave.sourceforge.net/doxygen/html/annotated.html). I want the function to create a variable inside the function and export it to the global workspace so that it can be used as a normal variable in the global workspace. Is there a kind of export function in the C++/Octave interface to do this? Thanks for the help. Justin -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 From jwe at octave.org Tue Aug 11 14:47:54 2009 From: jwe at octave.org (John W. Eaton) Date: Tue, 11 Aug 2009 15:47:54 -0400 Subject: Exporting a variable to the global workspace from a C++ function In-Reply-To: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> Message-ID: <19073.51946.981971.36817@segfault.lan> On 11-Aug-2009, Justin Bare wrote: | I am writing a function in C++ that will be called from Octave (using the | information found at | http://octave.sourceforge.net/doxygen/html/annotated.html). I want the | function to create a variable inside the function and export it to the | global workspace so that it can be used as a normal variable in the global | workspace. Is there a kind of export function in the C++/Octave interface | to do this? | Thanks for the help. Look at the set_global_value function declared in variables.h. jwe From mwooten at PLANSYS.COM Wed Aug 12 08:14:19 2009 From: mwooten at PLANSYS.COM (Wooten, Mike R.) Date: Wed, 12 Aug 2009 09:14:19 -0400 Subject: Octave Installation problem? References: Message-ID: <35FA32CC669D9B49ACFA7CDC13F5EBBF4461AD@RESEX01A.planningsystems.local> I just installed Octave version 3.2.2 I did the configure and make steps and got the message: Octave successfully built. Now choose from the following: ./run-octave - to run in place to test before installing make check - to run the tests make install - to install When I run run-octave, I get: ./run-octave Segmentation fault I'm installing on a linux system using Fedora 2.6.15 (an older version I know) Michael R Wooten Senior Programmer/Analyst QinetiQ North America Technology Solutions Group 115 Christian Ln Slidell, LA 70458 Work: (985) 639-3531 www.qinetiq-na.com -------------------------------------------------------------------- CONFIDENTIALITY NOTE: This transmission is intended solely for the use of the individual(s) to whom it is addressed and may contain information that is privileged, confidential, or otherwise exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or an authorized representative of the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying of or taking of any action in reliance upon this communication is strictly prohibited. If you have received this communication in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply e-mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090812/4c74ab48/attachment.html From highegg at gmail.com Wed Aug 12 08:22:17 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Wed, 12 Aug 2009 15:22:17 +0200 Subject: Octave Installation problem? In-Reply-To: <35FA32CC669D9B49ACFA7CDC13F5EBBF4461AD@RESEX01A.planningsystems.local> References: <35FA32CC669D9B49ACFA7CDC13F5EBBF4461AD@RESEX01A.planningsystems.local> Message-ID: <69d8d540908120622h209bf1b9o46f876a2e894ee5@mail.gmail.com> On Wed, Aug 12, 2009 at 3:14 PM, Wooten, Mike R. wrote: > > I just installed Octave version 3.2.2 > I did the configure and make steps and got the message: > > Octave successfully built.? Now choose from the following: > ./run-octave - to run in place to test before installing > make check - to run the tests > make install - to install > > When I run run-octave, I get: > ./run-octave > Segmentation fault > > I'm installing on a linux system using Fedora 2.6.15 (an older version I > know) > A miscompilation, most likely. Try ./run-octave -g or ./run-octave -valgrind (if you have gdb/valgrind installed) to check out what crashes. Also, please share your config.log (it's huge so best use pastebin or something similar). regards -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From bare at www.roboticresearch.com Wed Aug 12 07:59:30 2009 From: bare at www.roboticresearch.com (Justin Bare) Date: Wed, 12 Aug 2009 08:59:30 -0400 (EDT) Subject: Exporting a variable to the global workspace from a C++ function In-Reply-To: <19073.51946.981971.36817@segfault.lan> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> Message-ID: <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> I tried the function you gave me in this way inside a C++ function: string c = "x"; const string& cref = c; octave_value x = 9; const octave_value& xref = x; cout << cref << endl; cout << xref.int_value() << endl; set_global_value(cref, xref); cout << get_global_value("x").int_value() << endl; Which prints out this in Octave: x 9 9 But what I want to do is create the variable x in this C++ function and send it to the global workspace so that when I type "x" in the octave command line it will give me "x = 9" instead of "error: `x' undefined near line 39 column 1" Is there a way to do this? Thanks. Justin -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 > On 11-Aug-2009, Justin Bare wrote: > > | I am writing a function in C++ that will be called from Octave (using > the > | information found at > | http://octave.sourceforge.net/doxygen/html/annotated.html). I want the > | function to create a variable inside the function and export it to the > | global workspace so that it can be used as a normal variable in the > global > | workspace. Is there a kind of export function in the C++/Octave > interface > | to do this? > | Thanks for the help. > > Look at the set_global_value function declared in variables.h. > > jwe > -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 From highegg at gmail.com Wed Aug 12 08:44:00 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Wed, 12 Aug 2009 15:44:00 +0200 Subject: Exporting a variable to the global workspace from a C++ function In-Reply-To: <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> Message-ID: <69d8d540908120644l5334f13ds7066fe78740e41ed@mail.gmail.com> On Wed, Aug 12, 2009 at 2:59 PM, Justin Bare wrote: > I tried the function you gave me in this way inside a C++ function: > ? ?string c = "x"; > ? ?const string& cref = c; > ? ?octave_value x = 9; > ? ?const octave_value& xref = x; > > ? ?cout << cref << endl; > ? ?cout << xref.int_value() << endl; > > ? ?set_global_value(cref, xref); > ? ?cout << get_global_value("x").int_value() << endl; > > Which prints out this in Octave: > x > 9 > 9 > > But what I want to do is create the variable x in this C++ function and > send it to the global workspace so that when I type "x" in the octave > command line it will give me "x = 9" instead of "error: `x' undefined near > line 39 column 1" > > Is there a way to do this? > Thanks. > > Justin > Global variables are not by default visible from any workspaces; they need to be imported using the "global command". One possibility to do this completely from C++, using the 3.2.x API is (not actually tested): symbol_table::global_varref ("name") = value; symbol_table::set_scope (symbol_table::top_scope); // only needed if called from m-file function symbol_table::insert ("name").mark_global (); // will overwrite local variable if exists! another option is to call eval("global x;"), but that needs to invoke the parser and is thus slower. hth -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From bare at www.roboticresearch.com Wed Aug 12 09:40:01 2009 From: bare at www.roboticresearch.com (Justin Bare) Date: Wed, 12 Aug 2009 10:40:01 -0400 (EDT) Subject: Exporting a variable to the global workspace from a C++ function In-Reply-To: <69d8d540908120644l5334f13ds7066fe78740e41ed@mail.gmail.com> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> <69d8d540908120644l5334f13ds7066fe78740e41ed@mail.gmail.com> Message-ID: <53248.64.32.223.179.1250088001.squirrel@www.roboticresearch.com> I tried this as you suggested: symbol_table::global_varref("x") = 9; symbol_table::set_scope(symbol_table::top_scope); symbol_table::insert("x").mark_global(); but I get compiler errors that say: readbuf.cpp:29: error: ?global_varref? is not a member of ?symbol_table? readbuf.cpp:30: error: ?set_scope? is not a member of ?symbol_table? readbuf.cpp:30: error: ?top_scope? is not a member of ?symbol_table? readbuf.cpp:31: error: ?insert? is not a member of ?symbol_table? even though I have included the Octave/C++ library How do I make this compile? > On Wed, Aug 12, 2009 at 2:59 PM, Justin > Bare wrote: >> I tried the function you gave me in this way inside a C++ function: >> ? ?string c = "x"; >> ? ?const string& cref = c; >> ? ?octave_value x = 9; >> ? ?const octave_value& xref = x; >> >> ? ?cout << cref << endl; >> ? ?cout << xref.int_value() << endl; >> >> ? ?set_global_value(cref, xref); >> ? ?cout << get_global_value("x").int_value() << endl; >> >> Which prints out this in Octave: >> x >> 9 >> 9 >> >> But what I want to do is create the variable x in this C++ function and >> send it to the global workspace so that when I type "x" in the octave >> command line it will give me "x = 9" instead of "error: `x' undefined >> near >> line 39 column 1" >> >> Is there a way to do this? >> Thanks. >> >> Justin >> > > Global variables are not by default visible from any workspaces; they > need to be imported using the "global command". > > One possibility to do this completely from C++, using the 3.2.x API is > (not actually tested): > > symbol_table::global_varref ("name") = value; > symbol_table::set_scope (symbol_table::top_scope); // only needed if > called from m-file function > symbol_table::insert ("name").mark_global (); // will overwrite local > variable if exists! > > another option is to call eval("global x;"), but that needs to invoke > the parser and is thus slower. > > hth > > -- > RNDr. Jaroslav Hajek > computing expert & GNU Octave developer > Aeronautical Research and Test Institute (VZLU) > Prague, Czech Republic > url: www.highegg.matfyz.cz > -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 From bare at www.roboticresearch.com Wed Aug 12 10:18:27 2009 From: bare at www.roboticresearch.com (Justin Bare) Date: Wed, 12 Aug 2009 11:18:27 -0400 (EDT) Subject: Exporting a variable to the global workspace from a C++ function In-Reply-To: <19074.55127.558115.732846@segfault.lan> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> <69d8d540908120644l5334f13ds7066fe78740e41ed@mail.gmail.com> <53248.64.32.223.179.1250088001.squirrel@www.roboticresearch.com> <19074.55127.558115.732846@segfault.lan> Message-ID: <40034.64.32.223.179.1250090307.squirrel@www.roboticresearch.com> Thank you! I am new to Octave and, yes, I was not aware of how to access the global variable from the prompt. > On 12-Aug-2009, Justin Bare wrote: > > | I tried this as you suggested: > | > | symbol_table::global_varref("x") = 9; > | symbol_table::set_scope(symbol_table::top_scope); > | symbol_table::insert("x").mark_global(); > | > | but I get compiler errors that say: > | > | readbuf.cpp:29: error: ?global_varref? is not a member of > ?symbol_table? > | readbuf.cpp:30: error: ?set_scope? is not a member of ?symbol_table? > | readbuf.cpp:30: error: ?top_scope? is not a member of ?symbol_table? > | readbuf.cpp:31: error: ?insert? is not a member of ?symbol_table? > | > | even though I have included the Octave/C++ library > | > | How do I make this compile? > > Your earlier method of using set_global_value was the right way to > install a global variable. But I think you are confused about how to > access globals from the interpreter prompt. > | > | > On Wed, Aug 12, 2009 at 2:59 PM, Justin > | > Bare wrote: > | >> I tried the function you gave me in this way inside a C++ function: > | >> ,A (B ,A (Bstring c = "x"; > | >> ,A (B ,A (Bconst string& cref = c; > | >> ,A (B ,A (Boctave_value x = 9; > | >> ,A (B ,A (Bconst octave_value& xref = x; > | >> > | >> ,A (B ,A (Bcout << cref << endl; > | >> ,A (B ,A (Bcout << xref.int_value() << endl; > | >> > | >> ,A (B ,A (Bset_global_value(cref, xref); > | >> ,A (B ,A (Bcout << get_global_value("x").int_value() << endl; > | >> > | >> Which prints out this in Octave: > | >> x > | >> 9 > | >> 9 > | >> > | >> But what I want to do is create the variable x in this C++ function > and > | >> send it to the global workspace so that when I type "x" in the octave > | >> command line it will give me "x = 9" instead of "error: `x' undefined > | >> near > | >> line 39 column 1" > | >> > | >> Is there a way to do this? > > At the command line, type > > global x > x > > then you should see "9". > > If you want to install a variable in the base workspace (so you don't > have to declare the variable global to access it at the interpreter > prompt) then I don't think there is a C++ function in Octave to do > this. It's not a normal thing to want to do, so I'd ask why do you > think you want to do this? Why not simply have your function compute > a value and return it? > > jwe > -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 From dastew at sympatico.ca Wed Aug 12 22:23:48 2009 From: dastew at sympatico.ca (dastew at sympatico.ca) Date: Thu, 13 Aug 2009 03:23:48 +0000 Subject: using save command In-Reply-To: <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> Message-ID: I have a function that I want to pass a partial file mane to and the form up the complete file name as follows: fname="f10" and latter ffname = [fname ".txt"] now I want to use the save command save -ascii ffname a but it makes a file name called ffname and I wanted a file called f10.txt How do I use save when the file name is in a variable? Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/6e01035f/attachment.html From kanan.saurabh at gmail.com Wed Aug 12 22:33:14 2009 From: kanan.saurabh at gmail.com (Kanan Saurabh) Date: Thu, 13 Aug 2009 11:33:14 +0800 Subject: mac os octave does not plot Message-ID: <259C6509-D459-4EBD-9A55-B78A1CA8C2D6@gmail.com> Hi, I was using an earlier version of octave on my mac and it plotted figures quite well. Now I have downloaded the most recent installation and just replaced the original apps with the new ones. Octave no longer plots figures for me. It takes in the plot command, gives no errors and does not open an xterm. Is there some setting I should be doing? Please help! Regards, Kanan -- Kanan Saurabh 28 38' 39.28" N 77 25' 35.65" E From gregory.barendt at gmail.com Wed Aug 12 22:37:15 2009 From: gregory.barendt at gmail.com (Gregory Barendt) Date: Wed, 12 Aug 2009 23:37:15 -0400 Subject: mac os octave does not plot In-Reply-To: <259C6509-D459-4EBD-9A55-B78A1CA8C2D6@gmail.com> References: <259C6509-D459-4EBD-9A55-B78A1CA8C2D6@gmail.com> Message-ID: <19ade2d80908122037o646cd2bav7d67c59643baefe5@mail.gmail.com> Hi Kanan, I had this problem a little while back and was able to solve it by downloading and installing AquaTerm (http://sourceforge.net/projects/aquaterm/). Hope that helps, Greg On Wed, Aug 12, 2009 at 11:33 PM, Kanan Saurabh wrote: > Hi, > I was using an earlier version of octave on my mac and it plotted > figures quite well. > Now I have downloaded the most recent installation and just replaced > the original apps with the new ones. Octave no longer plots figures > for me. It takes in the plot command, gives no errors and does not > open an xterm. > Is there some setting I should be doing? > > Please help! > Regards, > Kanan > -- > Kanan Saurabh > 28 38' 39.28" N 77 25' 35.65" E > > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > From shermanj at umd.edu Wed Aug 12 22:38:19 2009 From: shermanj at umd.edu (James Sherman Jr.) Date: Wed, 12 Aug 2009 23:38:19 -0400 Subject: using save command In-Reply-To: References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> Message-ID: <6800c3890908122038j32577f54j4489e96e73b060e1@mail.gmail.com> You have to use the function form of save, save(ffname, "ascii", a); I'm just doing this off of memory, so the syntax maybe slightly off. Type "help save" should do the trick. On Wed, Aug 12, 2009 at 11:23 PM, wrote: > > I have a function that I want to pass a partial file mane to and the form up > the complete file name as follows: > > > fname="f10" > > and latter > > > ffname = [fname ".txt"] > > > now I want to use the save command > > save? -ascii? ffname? a > > but it makes a file name called?? ffname > and I wanted a file called f10.txt > > How do I use save when the file name is in a variable? > > Doug > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > From kanan.saurabh at gmail.com Wed Aug 12 22:43:50 2009 From: kanan.saurabh at gmail.com (Kanan Saurabh) Date: Thu, 13 Aug 2009 11:43:50 +0800 Subject: mac os octave does not plot In-Reply-To: <19ade2d80908122037o646cd2bav7d67c59643baefe5@mail.gmail.com> References: <259C6509-D459-4EBD-9A55-B78A1CA8C2D6@gmail.com> <19ade2d80908122037o646cd2bav7d67c59643baefe5@mail.gmail.com> Message-ID: <80E53A85-018C-4DD3-9C03-98AFFF49E9B6@gmail.com> Hey Greg, THANK YOU!! It worked! Cheers, Kanan On Aug 13, 2009, at 11:37 AM, Gregory Barendt wrote: > Hi Kanan, > > I had this problem a little while back and was able to solve it by > downloading and installing AquaTerm > (http://sourceforge.net/projects/aquaterm/). > > Hope that helps, > > Greg > > On Wed, Aug 12, 2009 at 11:33 PM, Kanan Saurabh > wrote: >> Hi, >> I was using an earlier version of octave on my mac and it plotted >> figures quite well. >> Now I have downloaded the most recent installation and just replaced >> the original apps with the new ones. Octave no longer plots figures >> for me. It takes in the plot command, gives no errors and does not >> open an xterm. >> Is there some setting I should be doing? >> >> Please help! >> Regards, >> Kanan >> -- >> Kanan Saurabh >> 28 38' 39.28" N 77 25' 35.65" E >> >> >> >> _______________________________________________ >> Help-octave mailing list >> Help-octave at octave.org >> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave >> -- Kanan Saurabh 28 38' 39.28" N 77 25' 35.65" E From dastew at sympatico.ca Wed Aug 12 22:53:19 2009 From: dastew at sympatico.ca (dastew at sympatico.ca) Date: Thu, 13 Aug 2009 03:53:19 +0000 Subject: using save command In-Reply-To: <6800c3890908122038j32577f54j4489e96e73b060e1@mail.gmail.com> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> <6800c3890908122038j32577f54j4489e96e73b060e1@mail.gmail.com> Message-ID: Thank you > Date: Wed, 12 Aug 2009 23:38:19 -0400 > Subject: Re: using save command > From: shermanj at umd.edu > To: dastew at sympatico.ca > CC: help-octave at octave.org > > You have to use the function form of save, > > save(ffname, "ascii", a); > > I'm just doing this off of memory, so the syntax maybe slightly off. > Type "help save" should do the trick. > > On Wed, Aug 12, 2009 at 11:23 PM, wrote: > > > > I have a function that I want to pass a partial file mane to and the form up > > the complete file name as follows: > > > > > > fname="f10" > > > > and latter > > > > > > ffname = [fname ".txt"] > > > > > > now I want to use the save command > > > > save -ascii ffname a > > > > but it makes a file name called ffname > > and I wanted a file called f10.txt > > > > How do I use save when the file name is in a variable? > > > > Doug > > > > > > _______________________________________________ > > Help-octave mailing list > > Help-octave at octave.org > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/e33b0e4a/attachment.html From shrutidogra.phy at gmail.com Wed Aug 12 23:32:58 2009 From: shrutidogra.phy at gmail.com (shruti dogra) Date: Thu, 13 Aug 2009 10:02:58 +0530 Subject: Accessing octave-core Message-ID: Dear all, I was running a program in octave which took more than 40 hours yet it was not over, because of some other reasons I pressed (cntrl + c) to break the process. But instead of getting the results so far, I got the following message "Press Control-C again to abort. ^C panic: Interrupt -- stopping myself... ^C attempting to save variables to `octave-core'... save to `octave-core' complete " Can anybody help telling how to access "octave-core" or any other way to regain the data. Thank you in advance. Sincerely, Shruti -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/c249e839/attachment.html From jwe at octave.org Wed Aug 12 23:53:37 2009 From: jwe at octave.org (John W. Eaton) Date: Thu, 13 Aug 2009 00:53:37 -0400 Subject: Accessing octave-core In-Reply-To: References: Message-ID: <19075.40017.869394.944376@segfault.lan> On 13-Aug-2009, shruti dogra wrote: | Dear all, | I was running a program in octave which took more than 40 hours yet | it was not over, because of some other reasons I pressed (cntrl + c) to | break the process. But instead of getting the results so far, I got the | following message | "Press Control-C again to abort. | ^C | panic: Interrupt -- stopping myself... | ^C | attempting to save variables to `octave-core'... | save to `octave-core' complete " | Can anybody help telling how to access "octave-core" or any other way | to regain the data. The octave-core file contains the variables from the top-level workspace, saved with the equivalent of Octave's "save" function. You should be able to load it with "load octave-core". jwe From shrutidogra.phy at gmail.com Thu Aug 13 01:07:25 2009 From: shrutidogra.phy at gmail.com (shruti dogra) Date: Thu, 13 Aug 2009 11:37:25 +0530 Subject: Accessing octave-core Message-ID: Thanks for the concern. I tried writing " load octave-core" there is no error but nothing is displayed, octave just procedes for the next command. I tried to open directly the "octave-core" file, saved in the same folder in which I was working but that file is in some low level language and can't be read. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/23df5263/attachment.html From jwe at octave.org Thu Aug 13 01:20:18 2009 From: jwe at octave.org (John W. Eaton) Date: Thu, 13 Aug 2009 02:20:18 -0400 Subject: Accessing octave-core In-Reply-To: References: Message-ID: <19075.45218.518315.89949@segfault.lan> On 13-Aug-2009, shruti dogra wrote: | I tried writing " load octave-core" there is no error but nothing is | displayed, octave just procedes for the next command. If the file contains any variables, they are loaded into your current workspace. To get a list of the variables that are loaded, use who or whos after loading the file. jwe From highegg at gmail.com Thu Aug 13 01:19:26 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Thu, 13 Aug 2009 08:19:26 +0200 Subject: Accessing octave-core In-Reply-To: References: Message-ID: <69d8d540908122319x1a717ac7y3be0a15443964f74@mail.gmail.com> On Thu, Aug 13, 2009 at 8:07 AM, shruti dogra wrote: > ? Thanks for the concern. > I tried writing " load octave-core" there is no error but nothing is > displayed, octave just procedes for the next command. Well, that is expected. I wonder; did you even bothered to read "help load"? After load succeeds, all the variables successfully saved in octave-core prior to the crash should be again loaded in the current scope. Just type "who" and you should see them. If there aren't any, then Octave probably didn't manage to save anything prior to crashing. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From anandaram_mn at yahoo.com Thu Aug 13 02:03:49 2009 From: anandaram_mn at yahoo.com (Prof M. N. Anandaram) Date: Thu, 13 Aug 2009 00:03:49 -0700 (PDT) Subject: Loading ASCII data files quickly In-Reply-To: <17ED811C-552C-4395-886C-E3F7891AD114@brennwald.org> References: <20090810150329.289170@gmx.net> <4A8045DC.1050403@grossbach.org> <17ED811C-552C-4395-886C-E3F7891AD114@brennwald.org> Message-ID: <417200.36184.qm@web65701.mail.ac4.yahoo.com> Hello: Ineed help to read? a long datafile (produced by fortran) of which the following is a sample: Its 5 columns are separated by single spacing but many blanks have minus signs also! ----------------------------------------------------- %Model no?? 1? Age =? 0.000 Gyr????????????????????????????????????????????????? %????? 2482??????? 15??????? 25?????? 210 ? ?6.099804898E+10 5.737968142E-11 ?4.263896084E+03 1.075125032E+03-3.921649350E-09 ?7.091014190E-01? 2.728385055E+33 6.643099358E-03? 0.000000000E+00 1.642454464E+00 ?3.898655209E-01 1.006586011E+00 1.660402559E+08 8.786761647E-01 3.104463343E+03 ?0.000000000E+00 1.962800000E-02-3.650469325E+07 0.000000000E+00 0.000000000E+00 ?0.000000000E+00 0.000000000E+00 0.000000000E+00 4.587748349E-03 9.782398920E-03 ?6.099764772E+10 5.734173867E-11 4.264186105E+03 1.132813429E+03 4.132080236E-09 ?7.091014190E-01 2.728385055E+33 6.929622832E-03 0.000000000E+00 1.643060192E+00 ?3.901287825E-01 1.006268590E+00 1.658643758E+08 8.786761647E-01 3.104635028E+03 ?0.000000000E+00 1.962800000E-02-3.610343816E+07 0.000000000E+00 0.000000000E+00 ?0.000000000E+00 0.000000000E+00 0.000000000E+00 4.587748349E-03 9.782398920E-03 ?6.099724280E+10 5.730138513E-11 4.264507760E+03 1.194167602E+03 4.355834394E-09 ?7.091014190E-01 2.728385055E+33 7.231427131E-03 0.000000000E+00 1.643677166E+00 ?3.903977435E-01 1.005974269E+00 1.656907498E+08 8.786761647E-01 3.104782331E+03 ?0.000000000E+00 1.962800000E-02-3.569851372E+07 0.000000000E+00 0.000000000E+00 ------------------------------------------------------ When I used the tdmread() program (see far below) on this file it responds by: >D:\Octave\bin\octave.exe -q "tdmread.m" ? parse error near line 1 of file D:\Octave\fgong_l9bi_d_01s_01.m ? syntax error >>>? 6.099804898E+10 5.737968142E-11 4.263896084E+03 1.075125032E+03-3.921649350E-09 ?????????????????????????????????? ^ error: evaluating assignment expression near line 1, column 5 error: near line 1 of file `tdmread.m' >Exit code: 1 Can any one please help ? It is imp that - sign be read with attached number also. Anandaram ========================================================================== ----- Original Message ---- From: Matthias Brennwald To: help at octave.org Sent: Tuesday, August 11, 2009 2:12:15 AM Subject: Re: Loading ASCII data files quickly On Aug 10, 2009, at 6:07 PM, Michael Grossbach wrote: > function tdm = tdmread(path2tdmfile) > [fid, msg] = fopen(path2tdmfile, 'r'); > if fid < 3, error(msg), endif > first = fgetl(fid); > second = fgetl(fid); > data = fscanf(fid, '%f%f', Inf) > tdm = struct('header', {first; second}, 'data', data); > fclose(fid); > > HTH, Michael _______________________________________________ Help-octave mailing list Help-octave at octave.org https://www-old.cae.wisc.edu/mailman/listinfo/help-octave From highegg at gmail.com Thu Aug 13 02:15:04 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Thu, 13 Aug 2009 09:15:04 +0200 Subject: Loading ASCII data files quickly In-Reply-To: <417200.36184.qm@web65701.mail.ac4.yahoo.com> References: <20090810150329.289170@gmx.net> <4A8045DC.1050403@grossbach.org> <17ED811C-552C-4395-886C-E3F7891AD114@brennwald.org> <417200.36184.qm@web65701.mail.ac4.yahoo.com> Message-ID: <69d8d540908130015v3b4d544cre9531cebc88a8d9a@mail.gmail.com> On Thu, Aug 13, 2009 at 9:03 AM, Prof M. N. Anandaram wrote: > Hello: > Ineed help to read? a long datafile (produced by fortran) of which the following is a sample: > Its 5 columns are separated by single spacing but many blanks have minus signs also! > ----------------------------------------------------- > %Model no?? 1? Age =? 0.000 Gyr > %????? 2482??????? 15??????? 25?????? 210 > > ?6.099804898E+10 5.737968142E-11 ?4.263896084E+03 1.075125032E+03-3.921649350E-09 > ?7.091014190E-01? 2.728385055E+33 6.643099358E-03? 0.000000000E+00 1.642454464E+00 > ?3.898655209E-01 1.006586011E+00 1.660402559E+08 8.786761647E-01 3.104463343E+03 > ?0.000000000E+00 1.962800000E-02-3.650469325E+07 0.000000000E+00 0.000000000E+00 > ?0.000000000E+00 0.000000000E+00 0.000000000E+00 4.587748349E-03 9.782398920E-03 > ?6.099764772E+10 5.734173867E-11 4.264186105E+03 1.132813429E+03 4.132080236E-09 > ?7.091014190E-01 2.728385055E+33 6.929622832E-03 0.000000000E+00 1.643060192E+00 > ?3.901287825E-01 1.006268590E+00 1.658643758E+08 8.786761647E-01 3.104635028E+03 > ?0.000000000E+00 1.962800000E-02-3.610343816E+07 0.000000000E+00 0.000000000E+00 > ?0.000000000E+00 0.000000000E+00 0.000000000E+00 4.587748349E-03 9.782398920E-03 > ?6.099724280E+10 5.730138513E-11 4.264507760E+03 1.194167602E+03 4.355834394E-09 > ?7.091014190E-01 2.728385055E+33 7.231427131E-03 0.000000000E+00 1.643677166E+00 > ?3.903977435E-01 1.005974269E+00 1.656907498E+08 8.786761647E-01 3.104782331E+03 > ?0.000000000E+00 1.962800000E-02-3.569851372E+07 0.000000000E+00 0.000000000E+00 > ------------------------------------------------------ > When I used the tdmread() program (see far below) on this file it responds by: > >>D:\Octave\bin\octave.exe -q "tdmread.m" > ? parse error near line 1 of file D:\Octave\fgong_l9bi_d_01s_01.m > ? syntax error >>>>? 6.099804898E+10 5.737968142E-11 4.263896084E+03 1.075125032E+03-3.921649350E-09 > ?????????????????????????????????? ^ > error: evaluating assignment expression near line 1, column 5 > error: near line 1 of file `tdmread.m' >>Exit code: 1 > > Can any one please help ? It is imp that - sign be read with attached number also. > > Anandaram Michael's code works for me with your sample data; you are not using it properly. You should start Octave prompt and the invoke the function with the file name as an argument. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From Andreas.Stahel at bfh.ch Thu Aug 13 02:58:01 2009 From: Andreas.Stahel at bfh.ch (Andreas Stahel) Date: Thu, 13 Aug 2009 09:58:01 +0200 Subject: grab.cc under WIN* Message-ID: <4A83C789.9050009@bfh.ch> Dear Octave group I am a very frequent Octave user, but only with Linux. The"old"grab.cc to gather data points from the screen has shown to be very useful. Now I have a friend using Windows only. Thanks to the great effort of the developers Octave is running nicely under Win* now.. I could not get grab() to work though, using the most recent Win binary from octave forge. Did somebody else succeed with grab() reading data, nor only from a gnuplot window? With best regards Andreas Stahel -- Andreas Stahel E-Mail: Andreas.Stahel@[ANTI-SPAM]bfh.ch Mathematics, BFH-TI Phone: ++41 +32 32 16 258 Quellgasse 21 Fax: ++41 +32 321 500 CH-2501 Biel WWW: http://prof.ti.bfh.ch/sha1/ Switzerland From sergstesh at yahoo.com Thu Aug 13 05:56:38 2009 From: sergstesh at yahoo.com (Sergei Steshenko) Date: Thu, 13 Aug 2009 03:56:38 -0700 (PDT) Subject: Accessing octave-core In-Reply-To: <19075.40017.869394.944376@segfault.lan> Message-ID: <559480.25828.qm@web35205.mail.mud.yahoo.com> --- On Wed, 8/12/09, John W. Eaton wrote: > From: John W. Eaton > Subject: Accessing octave-core > To: "shruti dogra" > Cc: help-octave at octave.org > Date: Wednesday, August 12, 2009, 9:53 PM > On 13-Aug-2009, shruti dogra wrote: > > | Dear all, > |? ? ? ? I was running a program in > octave which took more than 40 hours yet > | it was not over, because of some other reasons I pressed > (cntrl + c) to > | break the process. But instead of getting the results so > far, I got the > | following message > | "Press Control-C again to abort. > | ^C > | panic: Interrupt -- stopping myself... > | ^C > | attempting to save variables to `octave-core'... > | save to `octave-core' complete " > |? ? ? ? Can anybody help telling how > to access "octave-core" or any other way > | to regain the data. > > The octave-core file contains the variables from the > top-level > workspace, saved with the equivalent of Octave's "save" > function.? You > should be able to load it with "load octave-core". > > jwe I would first back up the existing 'octave-core'. Regards, Sergei. From bpabbott at mac.com Thu Aug 13 06:09:17 2009 From: bpabbott at mac.com (Ben Abbott) Date: Thu, 13 Aug 2009 07:09:17 -0400 Subject: mac os octave does not plot In-Reply-To: <80E53A85-018C-4DD3-9C03-98AFFF49E9B6@gmail.com> References: <259C6509-D459-4EBD-9A55-B78A1CA8C2D6@gmail.com> <19ade2d80908122037o646cd2bav7d67c59643baefe5@mail.gmail.com> <80E53A85-018C-4DD3-9C03-98AFFF49E9B6@gmail.com> Message-ID: <8E10DA45-9219-43F7-9728-27CEE0E67FD3@mac.com> You can also use x11 for plotting by ... setenv ("GNUTERM", "x11") Ben On Aug 12, 2009, at 11:43 PM, Kanan Saurabh wrote: > Hey Greg, > THANK YOU!! > It worked! > > Cheers, > Kanan > > On Aug 13, 2009, at 11:37 AM, Gregory Barendt wrote: > >> Hi Kanan, >> >> I had this problem a little while back and was able to solve it by >> downloading and installing AquaTerm >> (http://sourceforge.net/projects/aquaterm/). >> >> Hope that helps, >> >> Greg >> >> On Wed, Aug 12, 2009 at 11:33 PM, Kanan Saurabh>> wrote: >>> Hi, >>> I was using an earlier version of octave on my mac and it plotted >>> figures quite well. >>> Now I have downloaded the most recent installation and just replaced >>> the original apps with the new ones. Octave no longer plots figures >>> for me. It takes in the plot command, gives no errors and does not >>> open an xterm. >>> Is there some setting I should be doing? >>> >>> Please help! >>> Regards, >>> Kanan >>> -- >>> Kanan Saurabh >>> 28 38' 39.28" N 77 25' 35.65" E >>> >>> >>> >>> _______________________________________________ >>> Help-octave mailing list >>> Help-octave at octave.org >>> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave >>> > > -- > Kanan Saurabh > 28 38' 39.28" N 77 25' 35.65" E > > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave From wlmd888 at yahoo.com Thu Aug 13 07:43:57 2009 From: wlmd888 at yahoo.com (david) Date: Thu, 13 Aug 2009 05:43:57 -0700 (PDT) Subject: nancov.m missing Message-ID: <528651.72846.qm@web45503.mail.sp1.yahoo.com> Hi, I did not find the function nancov.m in Octave-forge statistics toolbox, does anyone know where to get this function? Thank you very much! David From soren at hauberg.org Thu Aug 13 07:53:05 2009 From: soren at hauberg.org (=?ISO-8859-1?Q?S=F8ren?= Hauberg) Date: Thu, 13 Aug 2009 14:53:05 +0200 Subject: nancov.m missing In-Reply-To: <528651.72846.qm@web45503.mail.sp1.yahoo.com> References: <528651.72846.qm@web45503.mail.sp1.yahoo.com> Message-ID: <1250167985.4461.31.camel@sh-t400> tor, 13 08 2009 kl. 05:43 -0700, skrev david: > I did not find the function nancov.m in Octave-forge statistics toolbox, does anyone know where to get this function? We don't have such a function at the moment, though I think we should. The problem is that there are several ways of skipping the NaN's, and it's not clear which is the best one. The attached function circulated on the Octave-Forge list sometime ago. It implements two different algorithms. The documentation is not complete so you'll have to look at the code to see what it does. S?ren -------------- next part -------------- A non-text attachment was scrubbed... Name: nancov.m Type: text/x-objcsrc Size: 4524 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/a9fb0907/attachment-0001.bin From highegg at gmail.com Thu Aug 13 07:58:45 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Thu, 13 Aug 2009 14:58:45 +0200 Subject: nancov.m missing In-Reply-To: <1250167985.4461.31.camel@sh-t400> References: <528651.72846.qm@web45503.mail.sp1.yahoo.com> <1250167985.4461.31.camel@sh-t400> Message-ID: <69d8d540908130558w748619c3g2431fbe94f9f1e23@mail.gmail.com> On Thu, Aug 13, 2009 at 2:53 PM, S?ren Hauberg wrote: > tor, 13 08 2009 kl. 05:43 -0700, skrev david: >> ? ?I did not find the function nancov.m in Octave-forge statistics toolbox, does anyone know where to get this function? > > We don't have such a function at the moment, though I think we should. > The problem is that there are several ways of skipping the NaN's, and > it's not clear which is the best one. > > The attached function circulated on the Octave-Forge list sometime ago. > It implements two different algorithms. The documentation is not > complete so you'll have to look at the code to see what it does. > I should add that this was this was the ultimate version that skipped NAs rather than NaNs. A NaN-skipping procedure (i.e. treat all NaNs as missing data) would be somewhat simpler. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From dastew at sympatico.ca Thu Aug 13 09:34:47 2009 From: dastew at sympatico.ca (dastew at sympatico.ca) Date: Thu, 13 Aug 2009 14:34:47 +0000 Subject: using save command In-Reply-To: References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> <6800c3890908122038j32577f54j4489e96e73b060e1@mail.gmail.com> Message-ID: From: dastew at sympatico.ca To: shermanj at umd.edu Subject: RE: using save command Date: Thu, 13 Aug 2009 03:53:19 +0000 CC: help-octave at octave.org Thank you > Date: Wed, 12 Aug 2009 23:38:19 -0400 > Subject: Re: using save command > From: shermanj at umd.edu > To: dastew at sympatico.ca > CC: help-octave at octave.org > > You have to use the function form of save, > > save(ffname, "ascii", a); I am running Ubuntu 9.04 and the latest octave that ubuntu knows about: GNU Octave Version 3.0.1 GNU Octave License: GNU General Public License Operating System: Linux 2.6.28-14-generic #47-Ubuntu SMP Sat Jul 25 00:28:35 UTC 2009 i686 I doesn't seem to know about the function version of save I wonder if someone would make a new ubuntu version of octave. PS I have made up my 100 different files the brute force way -- 100 scripts! So I am not stuck. Doug > > I'm just doing this off of memory, so the syntax maybe slightly off. > Type "help save" should do the trick. > > On Wed, Aug 12, 2009 at 11:23 PM, wrote: > > > > I have a function that I want to pass a partial file mane to and the form up > > the complete file name as follows: > > > > > > fname="f10" > > > > and latter > > > > > > ffname = [fname ".txt"] > > > > > > now I want to use the save command > > > > save -ascii ffname a > > > > but it makes a file name called ffname > > and I wanted a file called f10.txt > > > > How do I use save when the file name is in a variable? > > > > Doug > > > > > > _______________________________________________ > > Help-octave mailing list > > Help-octave at octave.org > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/ff922902/attachment.html From bare at www.roboticresearch.com Thu Aug 13 09:53:32 2009 From: bare at www.roboticresearch.com (Justin Bare) Date: Thu, 13 Aug 2009 10:53:32 -0400 (EDT) Subject: Error with Cell element access Message-ID: <40218.64.32.223.179.1250175212.squirrel@www.roboticresearch.com> I get the error "conversion from ?int? to non-scalar type ?dim_vector? requested" on the line that says "cell_data(v) = var;" in the following code. I have included the octave library and Cell.h. Cell cell_data(dim_vector(numVars)); for(int v = 0; v < numVars; v++){ int dataLength = myData.arrayVars[names[v]][0].size(); NDArray var = NDArray(dim_vector(numTimeSteps, dataLength)); for (int t = 0; t < numTimeSteps; t++){ for(int i = 0; i < dataLength; i++){ var(t, i) = myData.arrayVars[names[v]][t][i]; } } cell_data(v) = var; } Any ideas? -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 From bare at www.roboticresearch.com Thu Aug 13 10:29:33 2009 From: bare at www.roboticresearch.com (Justin Bare) Date: Thu, 13 Aug 2009 11:29:33 -0400 (EDT) Subject: Error with dim_vector Message-ID: <34944.64.32.223.179.1250177373.squirrel@www.roboticresearch.com> The following C++ code gives me the runtime error "undefined symbol: _Z4data10dim_vector" at the line "data(dim_vector(v)) = Cell((octave_value)var);" Any ideas? int numVars = myData.arrayVars.size(); string_vector names; names.resize(numVars); for(int i = 0; i < numVars; i++){ names[i] = myData.varNames[i]; } int numTimeSteps = myData.arrayVars[names[0]].size(); Cell data(dim_vector(numVars)); for(int v = 0; v < numVars; v++){ int dataLength = myData.arrayVars[names[v]][0].size(); NDArray var = NDArray(dim_vector(numTimeSteps, dataLength)); for (int t = 0; t < numTimeSteps; t++){ for(int i = 0; i < dataLength; i++){ var(t, i) = myData.arrayVars[names[v]][t][i]; } } data(dim_vector(v)) = Cell((octave_value)var); } Thanks for the help -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 From jwe at octave.org Thu Aug 13 10:45:22 2009 From: jwe at octave.org (John W. Eaton) Date: Thu, 13 Aug 2009 11:45:22 -0400 Subject: Error with dim_vector In-Reply-To: <34944.64.32.223.179.1250177373.squirrel@www.roboticresearch.com> References: <34944.64.32.223.179.1250177373.squirrel@www.roboticresearch.com> Message-ID: <19076.13586.554422.254048@segfault.lan> On 13-Aug-2009, Justin Bare wrote: | The following C++ code gives me the runtime error "undefined symbol: | _Z4data10dim_vector" at the line "data(dim_vector(v)) = | Cell((octave_value)var);" Any ideas? | | int numVars = myData.arrayVars.size(); | | string_vector names; | names.resize(numVars); | for(int i = 0; i < numVars; i++){ | names[i] = myData.varNames[i]; | | } | | | int numTimeSteps = myData.arrayVars[names[0]].size(); | | Cell data(dim_vector(numVars)); | | | for(int v = 0; v < numVars; v++){ | int dataLength = myData.arrayVars[names[v]][0].size(); | | NDArray var = NDArray(dim_vector(numTimeSteps, dataLength)); | for (int t = 0; t < numTimeSteps; t++){ | for(int i = 0; i < dataLength; i++){ | var(t, i) = myData.arrayVars[names[v]][t][i]; | | } | } | data(dim_vector(v)) = Cell((octave_value)var); | } The expression dim_vector(v) constructs a dim_vector object from v. Octave's dim_vector objects are for defining dimensions, not indexing. jwe From christy1865 at yahoo.com Thu Aug 13 10:57:41 2009 From: christy1865 at yahoo.com (Kristen Richter) Date: Thu, 13 Aug 2009 08:57:41 -0700 (PDT) Subject: Figure Position In-Reply-To: <0978FD6F-59E5-46F7-B4B7-4393894B8546@mac.com> References: <313670.73604.qm@web30208.mail.mud.yahoo.com> <0978FD6F-59E5-46F7-B4B7-4393894B8546@mac.com> Message-ID: <135366.22282.qm@web30203.mail.mud.yahoo.com> I have upgraded from 3.2.0 to octave 3.2.2 and am running gnuplot-x11 4.5.4-6 in ubuntu. However, even after trying the example below, I'm having the same sort of problem, where new figures appear just below my command window, to the side of my command window, to the side and bottom of my command window, and then tiled with my command window, no matter what numbers I put in the [left bottom width height] matrix for 'Position'. (See example below) octave:2> figure(1,"position",[5,5,400,400]) octave:3> figure(2,"position",[5,5,400,400]) octave:4> figure(3,"position",[5,5,400,400]) octave:5> figure(4,"position",[5,5,400,400]) octave:6> get(figure(1),'Position') ans = 5 5 400 400 octave:7> get(figure(2),'Position') ans = 5 5 400 400 octave:8> get(figure(3),'Position') ans = 5 5 400 400 octave:9> get(figure(4),'Position') ans = 5 5 400 400 While querying 'Position' with the get command returns the input I gave, this is obviously not occurring. Has anyone else come across this issue? Have I changed some global variable in octave? Why would uninstalling and reinstalling octave not have restored global defaults? What else could be overriding my 'Position' inputs? Any help on this issue would be appreciated. Thanks, Kristen ----- Original Message ---- From: Ben Abbott To: Kristen Richter Cc: help at octave.org Sent: Monday, August 3, 2009 6:58:31 PM Subject: Re: Figure Position On Aug 3, 2009, at 9:20 AM, Kristen Richter wrote: > Hello all, > > I am attempting to apply the position property to several figures in order them to tile them across the screen. After reading the online Matlab > manual, it seems like the appropriate commands are > > figure('Position',[left bottom width height]) > or even set(figure(#),'Position',[left bottom width height]) > > However, using these commands in Octave only produces a figure that auto-tiles with my command window. When I query get(figure(#),'Position'), I get my input back, as if the figure created was actually at this position. And I've double-triple-checked the units I'm using. > > Once, in my harried quest to get this working, I managed to change the offset of the auto-tiling, but reviewing over my command history, I cannot seem to reproduce this. > > I've spent some time searching wikis for problems other people have posted and reading a little over the archives (since Jan-09) of this mailing list and haven't found anything similar to what I am experiencing, though I understand that Octave and gnuplot may be unaware of any resizing or change in position that I do with my mouse. I'm not sure if this is an area where development for Octave hasn't reached, but the 'Position' property seems like a commonly used handle. > > Any light that could be shed on this situation would be greatly appreciated. > And I'm running the latest version of octave, 3.2.0, compiled in Ubuntu without arpack (couldn't get this working). > > -Kristen Hi Kristen, Unfortunately, Octave's handle graphics are not yet fully compatible with Matlab. The figure position property is only partially compatible. To place the figure you need to be running gnuplot 4.2.5 or later and octave 3.2.x. When creating a figure, you can set the figure's position by figure (h, "position", [xLL, yLL, width, height]) For example ... figure(1,"position",get(0,"screensize")([3,4,3,4]).*[0.1 0.2 0.8 0.7]) Once the plot stream to gnuplot is open, it is no longer possible to can the the figures position (unless someone wants to write the necessary code to communicate with x11). Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot.png Type: image/png Size: 82917 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/7c43121e/attachment-0001.png From bare at www.roboticresearch.com Thu Aug 13 11:32:02 2009 From: bare at www.roboticresearch.com (Justin Bare) Date: Thu, 13 Aug 2009 12:32:02 -0400 (EDT) Subject: Error with dim_vector In-Reply-To: <19076.13586.554422.254048@segfault.lan> References: <34944.64.32.223.179.1250177373.squirrel@www.roboticresearch.com> <19076.13586.554422.254048@segfault.lan> Message-ID: <45751.64.32.223.179.1250181122.squirrel@www.roboticresearch.com> I was originally just doing: data(v) = Cell((octave_value)var); but this gives me a compiler error that says "error: conversion from ?int? to non-scalar type ?dim_vector? requested" which is why i changed it to the dim_vector. In that case, could you tell me how to get rid of this error with the normal indexing operator? > On 13-Aug-2009, Justin Bare wrote: > > | The following C++ code gives me the runtime error "undefined symbol: > | _Z4data10dim_vector" at the line "data(dim_vector(v)) = > | Cell((octave_value)var);" Any ideas? > | > | int numVars = myData.arrayVars.size(); > | > | string_vector names; > | names.resize(numVars); > | for(int i = 0; i < numVars; i++){ > | names[i] = myData.varNames[i]; > | > | } > | > | > | int numTimeSteps = myData.arrayVars[names[0]].size(); > | > | Cell data(dim_vector(numVars)); > | > | > | for(int v = 0; v < numVars; v++){ > | int dataLength = myData.arrayVars[names[v]][0].size(); > | > | NDArray var = NDArray(dim_vector(numTimeSteps, dataLength)); > | for (int t = 0; t < numTimeSteps; t++){ > | for(int i = 0; i < dataLength; i++){ > | var(t, i) = myData.arrayVars[names[v]][t][i]; > | > | } > | } > | data(dim_vector(v)) = Cell((octave_value)var); > | } > > The expression dim_vector(v) constructs a dim_vector object from v. > Octave's dim_vector objects are for defining dimensions, not indexing. > > jwe > -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 From lindnerben at gmx.net Thu Aug 13 11:36:20 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Thu, 13 Aug 2009 18:36:20 +0200 Subject: Help Installing Control Tool Box for Windows Vista In-Reply-To: <24326079.post@talk.nabble.com> References: <08102A8A9C4E4A7EBF8B08B5EB780243@ErinPC> <20090703081141.80681.qmail@web3813.mail.bbt.yahoo.co.jp> <24326079.post@talk.nabble.com> Message-ID: <4A844104.1080607@gmx.net> bzink wrote: > Can an octave expert please comment on / investigate the 'pkg install ' issue > raised in the original e-mail. I sent in a similar observation to this > forum a few days ago. > > I believe the 'pkg install ...' problem is the manifestation of some sort > this is a bug in the sourceforge windows installer on the Vista OS. > This is a guess, but it might be the same bug as the "dir"-command-is-crashing bug. benjamin From i.am.mr.sleepyhead at gmail.com Thu Aug 13 12:29:29 2009 From: i.am.mr.sleepyhead at gmail.com (Derek Tsui) Date: Thu, 13 Aug 2009 13:29:29 -0400 Subject: legend outside position broken? Message-ID: <1bfaba5f0908131029r12fb73bjb599b4f3de7760cc@mail.gmail.com> I recently updated 3.0.1 to 3.2.2 and noticed setting legend position outside isn't doing anything. Setting position west, north, southwest, etc works fine but appending outside has no affect. Anyone experiencing the same issue? Thanks, derek -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/a1dc083b/attachment.html From bpabbott at mac.com Thu Aug 13 14:08:06 2009 From: bpabbott at mac.com (Ben Abbott) Date: Thu, 13 Aug 2009 15:08:06 -0400 Subject: Figure Position In-Reply-To: <29495787875616346611354970231301619029-Webmail@me.com> References: <29495787875616346611354970231301619029-Webmail@me.com> Message-ID: <65849013075779547840929213468788455232-Webmail@me.com> On Thursday, August 13, 2009, at 11:57AM, "Kristen Richter" wrote: >I have upgraded from 3.2.0 to octave 3.2.2 and am running gnuplot-x11 4.5.4-6 in ubuntu. > >However, even after trying the example below, I'm having the same sort of problem, where new figures appear just below my command window, to the side of my command window, to the side and bottom of my command window, and then tiled with my command window, no matter what numbers I put in the [left bottom width height] matrix for 'Position'. (See example below) > >octave:2> figure(1,"position",[5,5,400,400]) >octave:3> figure(2,"position",[5,5,400,400]) >octave:4> figure(3,"position",[5,5,400,400]) >octave:5> figure(4,"position",[5,5,400,400]) >octave:6> get(figure(1),'Position') >ans = > > 5 5 400 400 > >octave:7> get(figure(2),'Position') >ans = > > 5 5 400 400 > >octave:8> get(figure(3),'Position') >ans = > > 5 5 400 400 > >octave:9> get(figure(4),'Position') >ans = > > 5 5 400 400 > > >While querying 'Position' with the get command returns the input I gave, this is obviously not occurring. > >Has anyone else come across this issue? Have I changed some global variable in octave? Why would uninstalling and reinstalling octave not have restored global defaults? What else could be overriding my 'Position' inputs? > >Any help on this issue would be appreciated. > >Thanks, >Kristen Hi Kristen, What happens when you try the commands below? close all figure (1, "position", [5, 5, 400, 400]) Also, "gnuplot-x11 4.5.4-6" doesn't look correct. I have a recent copy of the developers sources. The version for the developers sources is only 4.3. You can check the version number of your installed gnuplot from Octave by typing "__gnuplot_version__". Or by typing "gnuplot --version" at a shell prompt. Ben p.s. Please respond at below, so that those coming later can read along. From christy1865 at yahoo.com Thu Aug 13 14:55:46 2009 From: christy1865 at yahoo.com (Kristen Richter) Date: Thu, 13 Aug 2009 12:55:46 -0700 (PDT) Subject: Figure Position In-Reply-To: <65849013075779547840929213468788455232-Webmail@me.com> References: <29495787875616346611354970231301619029-Webmail@me.com> <65849013075779547840929213468788455232-Webmail@me.com> Message-ID: <920583.50868.qm@web30203.mail.mud.yahoo.com> On Thursday, August 13, 2009, at 11:57AM, "Kristen Richter" wrote: >I have upgraded from 3.2.0 to octave 3.2.2 and am running gnuplot-x11 4.5.4-6 in ubuntu. > >However, even after trying the example below, I'm having the same sort of problem, where new figures appear just below my command window, to the side of my command window, to the side and bottom of my command window, and then tiled with my command window, no matter what numbers I put in the [left bottom width height] matrix for 'Position'. (See example below) > >octave:2> figure(1,"position",[5,5,400,400]) >octave:3> figure(2,"position",[5,5,400,400]) >octave:4> figure(3,"position",[5,5,400,400]) >octave:5> figure(4,"position",[5,5,400,400]) >octave:6> get(figure(1),'Position') >ans = > > 5 5 400 400 > >octave:7> get(figure(2),'Position') >ans = > > 5 5 400 400 > >octave:8> get(figure(3),'Position') >ans = > > 5 5 400 400 > >octave:9> get(figure(4),'Position') >ans = > > 5 5 400 400 > > >While querying 'Position' with the get command returns the input I gave, this is obviously not occurring. > >Has anyone else come across this issue? Have I changed some global variable in octave? Why would uninstalling and reinstalling octave not have restored global defaults? What else could be overriding my 'Position' inputs? > >Any help on this issue would be appreciated. > >Thanks, >Kristen ---------- Hi Kristen, What happens when you try the commands below? close all figure (1, "position", [5, 5, 400, 400]) Also, "gnuplot-x11 4.5.4-6" doesn't look correct. I have a recent copy of the developers sources. The version for the developers sources is only 4.3. You can check the version number of your installed gnuplot from Octave by typing "__gnuplot_version__". Or by typing "gnuplot --version" at a shell prompt. Ben p.s. Please respond at below, so that those coming later can read along. ---------- Hi Ben, I rechecked my version of gnuplot... It is 4.2.4.. I just read it from the Synaptic Package Manager too fast and jumbled the numbers up. 'close all' closes all the figures as expected. Typing in the second command brings up a landscape window at the very top of the screen. 'figure(2,'Position',[5 5 400 400])' then brings up a second figure window placed just below the bottom of the first figure window, and then further figures auto-tile between these two spaces. Earlier, I observed 4X4 tiling behavior, and I notice that during my work today, I've stacked the right side of my screen with projects that I'm working on. When I close out some of these windows, tiling resumes in a 4X4 manner, filling in the empty space with figures. Since the figures seem to be drawn to unoccupied space, I'm now wondering if opening figure positions are being controlled by my operating system? Anyone else running ubuntu and having problems with figure positions? -Kristen From macy at sfo.com Thu Aug 13 15:43:37 2009 From: macy at sfo.com (macy at sfo.com) Date: Thu, 13 Aug 2009 13:43:37 -0700 (PDT) Subject: using save command In-Reply-To: References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> <6800c3890908122038j32577f54j4489e96e73b060e1@mail.gmail.com> Message-ID: <1114.66.81.51.145.1250196217.squirrel@cp01.sfo.com> I use an old version of octave, but this sounds like what I ran into. I never could open or save a series of files until I used this type of syntax: cmdstr=(sprintf("amatrix=angle(out%d-1i); \n",iii)); I think it would take the form of cmdstr=(sprintf("save -ascii filename%d-1i.txt var1 var2\n",ddd)); or something like that Robert > > > > From: dastew at sympatico.ca > To: shermanj at umd.edu > Subject: RE: using save command > Date: Thu, 13 Aug 2009 03:53:19 +0000 > CC: help-octave at octave.org > > > > > > > > > Thank you > > >> Date: Wed, 12 Aug 2009 23:38:19 -0400 >> Subject: Re: using save command >> From: shermanj at umd.edu >> To: dastew at sympatico.ca >> CC: help-octave at octave.org >> >> You have to use the function form of save, >> >> save(ffname, "ascii", a); > > I am running Ubuntu 9.04 and the latest octave that ubuntu knows about: > > GNU Octave Version 3.0.1 > GNU Octave License: GNU General Public License > Operating System: Linux 2.6.28-14-generic #47-Ubuntu SMP Sat Jul 25 > 00:28:35 UTC 2009 i686 > > > I doesn't seem to know about the function version of save > > I wonder if someone would make a new ubuntu version of octave. > > > PS I have made up my 100 different files the brute force way -- 100 > scripts! > So I am not stuck. > > Doug > > > > >> >> I'm just doing this off of memory, so the syntax maybe slightly off. >> Type "help save" should do the trick. >> >> On Wed, Aug 12, 2009 at 11:23 PM, wrote: >> > >> > I have a function that I want to pass a partial file mane to and the >> form up >> > the complete file name as follows: >> > >> > >> > fname="f10" >> > >> > and latter >> > >> > >> > ffname = [fname ".txt"] >> > >> > >> > now I want to use the save command >> > >> > save -ascii ffname a >> > >> > but it makes a file name called ffname >> > and I wanted a file called f10.txt >> > >> > How do I use save when the file name is in a variable? >> > >> > Doug >> > >> > >> > _______________________________________________ >> > Help-octave mailing list >> > Help-octave at octave.org >> > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave >> > >> > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > From bpabbott at mac.com Thu Aug 13 16:08:50 2009 From: bpabbott at mac.com (Ben Abbott) Date: Thu, 13 Aug 2009 17:08:50 -0400 Subject: Figure Position Message-ID: <109537266811812266656072110305376765442-Webmail@me.com> On Thursday, August 13, 2009, at 03:55PM, "Kristen Richter" wrote: >On Thursday, August 13, 2009, at 11:57AM, "Kristen Richter" wrote: > >>I have upgraded from 3.2.0 to octave 3.2.2 and am running gnuplot-x11 4.5.4-6 in ubuntu. >> >>However, even after trying the example below, I'm having the same sort of problem, where new figures appear just below my command window, to the side of my command window, to the side and bottom of my command window, and then tiled with my command window, no matter what numbers I put in the [left bottom width height] matrix for 'Position'. (See example below) >> >>octave:2> figure(1,"position",[5,5,400,400]) >>octave:3> figure(2,"position",[5,5,400,400]) >>octave:4> figure(3,"position",[5,5,400,400]) >>octave:5> figure(4,"position",[5,5,400,400]) >>octave:6> get(figure(1),'Position') >>ans = >> >> 5 5 400 400 >> >>octave:7> get(figure(2),'Position') >>ans = >> >> 5 5 400 400 >> >>octave:8> get(figure(3),'Position') >>ans = >> >> 5 5 400 400 >> >>octave:9> get(figure(4),'Position') >>ans = >> >> 5 5 400 400 >> >> >>While querying 'Position' with the get command returns the input I gave, this is obviously not occurring. >> >>Has anyone else come across this issue? Have I changed some global variable in octave? Why would uninstalling and reinstalling octave not have restored global defaults? What else could be overriding my 'Position' inputs? >> >>Any help on this issue would be appreciated. >> >>Thanks, >>Kristen > >---------- >Hi Kristen, > >What happens when you try the commands below? > >close all >figure (1, "position", [5, 5, 400, 400]) > >Also, "gnuplot-x11 4.5.4-6" doesn't look correct. I have a recent copy of the developers sources. The version for the developers sources is only 4.3. > >You can check the version number of your installed gnuplot from Octave by typing "__gnuplot_version__". Or by typing "gnuplot --version" at a shell prompt. > >Ben > >p.s. Please respond at below, so that those coming later can read along. >---------- >Hi Ben, > >I rechecked my version of gnuplot... It is 4.2.4.. I just read it from the Synaptic Package Manager too fast and jumbled the numbers up. > >'close all' closes all the figures as expected. >Typing in the second command brings up a landscape window at the very top of the screen. > >'figure(2,'Position',[5 5 400 400])' then brings up a second figure window placed just below the bottom of the first figure window, and then further figures auto-tile between these two spaces. > >Earlier, I observed 4X4 tiling behavior, and I notice that during my work today, I've stacked the right side of my screen with projects that I'm working on. When I close out some of these windows, tiling resumes in a 4X4 manner, filling in the empty space with figures. Since the figures seem to be drawn to unoccupied space, I'm now wondering if opening figure positions are being controlled by my operating system? Anyone else running ubuntu and having problems with figure positions? > >-Kristen Hi Kristen, Version 4.2.4 of gnuplot does not allow octave to specifiy the x11 window position. I took a quick look at the available Ubuntu packages. It appears that 4.2.5 is available for the karmic distribution. http://packages.ubuntu.com/karmic/gnuplot I'm a Mac OSX user, so I can't offer an informed opinion on whether or not upgrading to karmic is a good idea for you or not. Ben From dastew at sympatico.ca Thu Aug 13 16:12:33 2009 From: dastew at sympatico.ca (dastew at sympatico.ca) Date: Thu, 13 Aug 2009 21:12:33 +0000 Subject: using save command In-Reply-To: <1114.66.81.51.145.1250196217.squirrel@cp01.sfo.com> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> <6800c3890908122038j32577f54j4489e96e73b060e1@mail.gmail.com> <1114.66.81.51.145.1250196217.squirrel@cp01.sfo.com> Message-ID: > Date: Thu, 13 Aug 2009 13:43:37 -0700 > Subject: RE: using save command > From: macy at sfo.com > To: dastew at sympatico.ca > CC: help-octave at octave.org > > I use an old version of octave, but this sounds like what I ran into. > > I never could open or save a series of files until I used this type of > syntax: > > cmdstr=(sprintf("amatrix=angle(out%d-1i); \n",iii)); > > I think it would take the form of > > cmdstr=(sprintf("save -ascii filename%d-1i.txt var1 var2\n",ddd)); > or something like that > > Robert Thanks Robert PS My problem is that I will have forgotten how next time I need it :-). I hope the the new octave gets pushed out to Ubuntu soon. Doug > > > > > > > > > From: dastew at sympatico.ca > > To: shermanj at umd.edu > > Subject: RE: using save command > > Date: Thu, 13 Aug 2009 03:53:19 +0000 > > CC: help-octave at octave.org > > > > > > > > > > > > > > > > > > Thank you > > > > > >> Date: Wed, 12 Aug 2009 23:38:19 -0400 > >> Subject: Re: using save command > >> From: shermanj at umd.edu > >> To: dastew at sympatico.ca > >> CC: help-octave at octave.org > >> > >> You have to use the function form of save, > >> > >> save(ffname, "ascii", a); > > > > I am running Ubuntu 9.04 and the latest octave that ubuntu knows about: > > > > GNU Octave Version 3.0.1 > > GNU Octave License: GNU General Public License > > Operating System: Linux 2.6.28-14-generic #47-Ubuntu SMP Sat Jul 25 > > 00:28:35 UTC 2009 i686 > > > > > > I doesn't seem to know about the function version of save > > > > I wonder if someone would make a new ubuntu version of octave. > > > > > > PS I have made up my 100 different files the brute force way -- 100 > > scripts! > > So I am not stuck. > > > > Doug > > > > > > > > > >> > >> I'm just doing this off of memory, so the syntax maybe slightly off. > >> Type "help save" should do the trick. > >> > >> On Wed, Aug 12, 2009 at 11:23 PM, wrote: > >> > > >> > I have a function that I want to pass a partial file mane to and the > >> form up > >> > the complete file name as follows: > >> > > >> > > >> > fname="f10" > >> > > >> > and latter > >> > > >> > > >> > ffname = [fname ".txt"] > >> > > >> > > >> > now I want to use the save command > >> > > >> > save -ascii ffname a > >> > > >> > but it makes a file name called ffname > >> > and I wanted a file called f10.txt > >> > > >> > How do I use save when the file name is in a variable? > >> > > >> > Doug > >> > > >> > > >> > _______________________________________________ > >> > Help-octave mailing list > >> > Help-octave at octave.org > >> > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > >> > > >> > > > _______________________________________________ > > Help-octave mailing list > > Help-octave at octave.org > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/0a4a9640/attachment-0001.html From jwe at octave.org Thu Aug 13 16:49:46 2009 From: jwe at octave.org (John W. Eaton) Date: Thu, 13 Aug 2009 17:49:46 -0400 Subject: using save command In-Reply-To: References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> <6800c3890908122038j32577f54j4489e96e73b060e1@mail.gmail.com> <1114.66.81.51.145.1250196217.squirrel@cp01.sfo.com> Message-ID: <19076.35450.404018.712184@segfault.lan> On 13-Aug-2009, dastew at sympatico.ca wrote: | PS My problem is that I will have forgotten how next time I need it :-). | I hope the the new octave gets pushed out to Ubuntu soon. I agree that it would be good to upgrade, but the save function works as a command or a function in 3.0.x. What did you try that failed? jwe From dastew at sympatico.ca Thu Aug 13 17:05:26 2009 From: dastew at sympatico.ca (dastew at sympatico.ca) Date: Thu, 13 Aug 2009 22:05:26 +0000 Subject: using save command In-Reply-To: <19076.35450.404018.712184@segfault.lan> References: <37453.64.32.223.179.1250013310.squirrel@www.roboticresearch.com> <19073.51946.981971.36817@segfault.lan> <33244.64.32.223.179.1250081970.squirrel@www.roboticresearch.com> <6800c3890908122038j32577f54j4489e96e73b060e1@mail.gmail.com> <1114.66.81.51.145.1250196217.squirrel@cp01.sfo.com> <19076.35450.404018.712184@segfault.lan> Message-ID: > Date: Thu, 13 Aug 2009 17:49:46 -0400 > To: dastew at sympatico.ca > CC: macy at sfo.com; help-octave at octave.org > Subject: RE: using save command > From: jwe at octave.org > > On 13-Aug-2009, dastew at sympatico.ca wrote: > > | PS My problem is that I will have forgotten how next time I need it :-). > | I hope the the new octave gets pushed out to Ubuntu soon. > > I agree that it would be good to upgrade, but the save function works > as a command or a function in 3.0.x. > > What did you try that failed? > > jwe Sorry for the noise. Yes indeed it does work, I didn't put quotes around the variable name. Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090813/e7a676eb/attachment.html From highegg at gmail.com Thu Aug 13 23:55:06 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Fri, 14 Aug 2009 06:55:06 +0200 Subject: Error with Cell element access In-Reply-To: <40218.64.32.223.179.1250175212.squirrel@www.roboticresearch.com> References: <40218.64.32.223.179.1250175212.squirrel@www.roboticresearch.com> Message-ID: <69d8d540908132155xc24b0c9xade5183e7e34d09e@mail.gmail.com> On Thu, Aug 13, 2009 at 4:53 PM, Justin Bare wrote: > I get the error "conversion from ?int? to non-scalar type ?dim_vector? > requested" on the line that says "cell_data(v) = var;" in the following > code. I have included the octave library and Cell.h. > > ? ?Cell cell_data(dim_vector(numVars)); > > > ? ?for(int v = 0; v < numVars; v++){ > ? ? ?int dataLength = myData.arrayVars[names[v]][0].size(); > > ? ? ?NDArray var = NDArray(dim_vector(numTimeSteps, dataLength)); > ? ? ?for (int t = 0; t < numTimeSteps; t++){ > ? ? ? ?for(int i = 0; i < dataLength; i++){ > ? ? ? ? ?var(t, i) = myData.arrayVars[names[v]][t][i]; > > ? ? ? ?} > ? ? ?} > ? ? ?cell_data(v) = var; > ? ?} > > > Any ideas? > -- > First of all, it would help a little if you always reduced your code to as much self-contained example as possible, i.e. declare variables, remove code not necessary to trigger the bug etc. This is a very subtle problem in C++ syntax you're hitting. The statement Cell cell_data(dim_vector(numVars)); is actually treated as a function prototype declaration (!) Cell cell_data(dim_vector numVars); because the parentheses can be discarded in this case. I can't quote the standard now, but I've hit this several times before. Either of the following should work: Cell cell_data((dim_vector(numVars))); // extra parens Cell cell_data = Cell(dim_vector numVars); Cell cell_data (dim_vector (numVars, 1)); Cell cell_data (numVars, 1); regards -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From jwe at octave.org Fri Aug 14 00:43:52 2009 From: jwe at octave.org (John W. Eaton) Date: Fri, 14 Aug 2009 01:43:52 -0400 Subject: Error with dim_vector In-Reply-To: <45751.64.32.223.179.1250181122.squirrel@www.roboticresearch.com> References: <34944.64.32.223.179.1250177373.squirrel@www.roboticresearch.com> <19076.13586.554422.254048@segfault.lan> <45751.64.32.223.179.1250181122.squirrel@www.roboticresearch.com> Message-ID: <19076.63896.102901.719607@segfault.lan> On 13-Aug-2009, Justin Bare wrote: | I was originally just doing: | | data(v) = Cell((octave_value)var); You probably want to write octave_value (var) not (octave_value) var Casting to octave_value is probably not what you want to do. I think there's a significant difference between casting and calling a constructor. jwe From highegg at gmail.com Fri Aug 14 01:29:24 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Fri, 14 Aug 2009 08:29:24 +0200 Subject: string dictionary class Message-ID: <69d8d540908132329x12417326m40655e10fa32f9cc@mail.gmail.com> hi all, I have contributed a simple string dictionary class to the `general' package, which comprises indexing by strings & cell string arrays indexed assignment inserting and deleting elements existence query (has) query with default value (get) it is intended to work with development version of Octave, as it uses some new features. The implementation uses binary lookup in a sorted array. operation complexity, w.r.t. number of existing keys N is: retrieve and query: O(log(N)) set existing entry: O(log(N)) with the recent subsasgn optimization (e79470be3ecb), O(N) without it. insert new key / delete existing: O(N) it is therefore not suitable for frequent insertions but good when query is the major operation. Example usage: octave:1> gnusoft = dict gnusoft = dict: {} octave:2> gnusoft("octave") = "www.octave.org" gnusoft = dict: { octave : www.octave.org } octave:3> gnusoft("gcc") = "gcc.gnu.org" gnusoft = dict: { gcc : gcc.gnu.org octave : www.octave.org } octave:4> gnusoft({"octave", "gcc", "octave"}) ans = { [1,1] = www.octave.org [1,2] = gcc.gnu.org [1,3] = www.octave.org } octave:5> getgnusoftaddress = @(name) get(gnusoft, name, "directory.fsf.org/GNU") getgnusoftaddress = @(name) get (gnusoft, name, "directory.fsf.org/GNU") octave:6> getgnusoftaddress ("octave") ans = www.octave.org octave:7> getgnusoftaddress ("bison") ans = directory.fsf.org/GNU octave:8> has(gnusoft, {"gcc", "bison"}) ans = 1 0 octave:9> mathgnusoft = gnusoft mathgnusoft = dict: { gcc : gcc.gnu.org octave : www.octave.org } octave:10> mathgnusoft ({"gcc"}) = [] mathgnusoft = dict: { octave : www.octave.org } octave:11> files = dir; octave:12> cache_file_stat = dict ({dir.name}, {dir.statinfo}); octave:13> cache_file_stat ("adresamp2.m") ans = { dev = 2051 ino = 14749998 mode = 33188 modestr = -rw-r--r-- nlink = 1 uid = 1000 gid = 100 rdev = 0 size = 2739 atime = 1.2464e+09 mtime = 1.2403e+09 ctime = 1.2403e+09 blksize = 4096 blocks = 16 } I welcome suggestions for improvements and enhancements. enjoy! -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From bare at www.roboticresearch.com Fri Aug 14 08:10:29 2009 From: bare at www.roboticresearch.com (Justin Bare) Date: Fri, 14 Aug 2009 09:10:29 -0400 (EDT) Subject: Error with Cell element access In-Reply-To: <69d8d540908132155xc24b0c9xade5183e7e34d09e@mail.gmail.com> References: <40218.64.32.223.179.1250175212.squirrel@www.roboticresearch.com> <69d8d540908132155xc24b0c9xade5183e7e34d09e@mail.gmail.com> Message-ID: <60276.64.32.223.179.1250255429.squirrel@www.roboticresearch.com> Thank you so much for that fix. I don't think I would have ever figured that out without your help. This reaffirms my deep hate for C++. Justin > On Thu, Aug 13, 2009 at 4:53 PM, Justin > Bare wrote: >> I get the error "conversion from ?int? to non-scalar type ?dim_vector? >> requested" on the line that says "cell_data(v) = var;" in the following >> code. I have included the octave library and Cell.h. >> >> ? ?Cell cell_data(dim_vector(numVars)); >> >> >> ? ?for(int v = 0; v < numVars; v++){ >> ? ? ?int dataLength = myData.arrayVars[names[v]][0].size(); >> >> ? ? ?NDArray var = NDArray(dim_vector(numTimeSteps, dataLength)); >> ? ? ?for (int t = 0; t < numTimeSteps; t++){ >> ? ? ? ?for(int i = 0; i < dataLength; i++){ >> ? ? ? ? ?var(t, i) = myData.arrayVars[names[v]][t][i]; >> >> ? ? ? ?} >> ? ? ?} >> ? ? ?cell_data(v) = var; >> ? ?} >> >> >> Any ideas? >> -- >> > > First of all, it would help a little if you always reduced your code > to as much self-contained example as possible, i.e. declare variables, > remove code not necessary to trigger the bug etc. > > This is a very subtle problem in C++ syntax you're hitting. The statement > > Cell cell_data(dim_vector(numVars)); > > is actually treated as a function prototype declaration (!) > > Cell cell_data(dim_vector numVars); > > because the parentheses can be discarded in this case. I can't quote > the standard now, but I've hit this several times before. > Either of the following should work: > > Cell cell_data((dim_vector(numVars))); // extra parens > > Cell cell_data = Cell(dim_vector numVars); > > Cell cell_data (dim_vector (numVars, 1)); > > Cell cell_data (numVars, 1); > > regards > > -- > RNDr. Jaroslav Hajek > computing expert & GNU Octave developer > Aeronautical Research and Test Institute (VZLU) > Prague, Czech Republic > url: www.highegg.matfyz.cz > -- Justin Bare Robotic Research, LLC. 814 West Diamond Ave, Suite 301 Gaithersburg, MD 20878 240-631-0008 Ext 246 From dbateman at dbateman.org Sat Aug 15 16:00:41 2009 From: dbateman at dbateman.org (David Bateman) Date: Sat, 15 Aug 2009 23:00:41 +0200 Subject: eigs.m problem in Octave 3.2.2 In-Reply-To: <20090806195005.69773.qmail@web3815.mail.bbt.yahoo.co.jp> References: <20090806195005.69773.qmail@web3815.mail.bbt.yahoo.co.jp> Message-ID: <4A8721F9.5070706@dbateman.org> Tatsuro MATSUOKA wrote: > Hello > > I have built octave-3.2.2 on MinGW( Windows) > > octave.exe:13> n = 20; > octave.exe:14> k = 4; > octave.exe:15> A = sparse([3:n,1:n,1:(n-2)],[1:(n-2),1:n,3:n],[ones(1,n-2),1:n,-ones(1,n-2)]); > octave.exe:16> d1 = eigs (A, k) > d1 = > > 19.407 > 18.407 > 18.096 > 17.096 > > For my binary, eigs.oct works correct. There is no 'eigs.m ' in octave 3.2. > The problem is not issue of octave 3.2.2 itself. > > Perhaps you download your 0ctave 3.2.2 binaries from the package managing place on your linux > distribution. If my guess is true, please ask at the ML of the application distribution site. > > If you have built your octave by yourself, please show the kind of linux distribution (Redhat, Debial > etc.) and show configuration at the build process. > > Regards > > Tatsuro > > --- david wrote: > > >> Hi, >> >> I installed Octave 3.2.2, when I do: help eigs, I can see its help information as below, but >> when I use it, it shows: >> >> octave:16> a=[1 2 3;4 5 6;7 8 9]; >> octave:17> eigs(a) >> error: eigs: not available in this version of Octave >> >> >> octave:15> help eigs >> `eigs' is a function from the file /usr/local/libexec/octave/3.2.2/oct/i686-pc-linux-gnu/e >> igs.oct >> >> -- Loadable Function: D = eigs (A) >> -- Loadable Function: D = eigs (A, K) >> -- Loadable Function: D = eigs (A, K, SIGMA) >> -- Loadable Function: D = eigs (A, K, SIGMA,OPTS) >> ...... >> >> >> Does anyone know what is the problem? Is Octave 3.2.2 already built with ARPACK package? >> >> Thanks a lot. >> >> >> >> >> >> _______________________________________________ >> Help-octave mailing list >> Help-octave at octave.org >> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave >> >> > > > -------------------------------------- > Power up the Internet with Yahoo! Toolbar. > http://pr.mail.yahoo.co.jp/toolbar/ > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > Installing ARPACK before you build Octave might also be an idea D. -- David Bateman dbateman at dbateman.org 35 rue Gambetta +33 1 46 04 02 18 (Home) 92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob) From dastew at sympatico.ca Sun Aug 16 22:29:50 2009 From: dastew at sympatico.ca (dastew at sympatico.ca) Date: Mon, 17 Aug 2009 03:29:50 +0000 Subject: Formatted Output bug In-Reply-To: <61311.3555.qm@web45701.mail.sp1.yahoo.com> References: <61311.3555.qm@web45701.mail.sp1.yahoo.com> Message-ID: Date: Sun, 16 Aug 2009 19:44:55 -0700 From: tbohdan at yahoo.com.au Subject: RE: Formatted Output bug To: dastew at sympatico.ca thanks for the prompt reply. I still find it odd that it would print the first array and then the second array when i have clearly specified the order etc. Thanks for the tip to correct it You are welcome. I don't know if this is a bug or is the desired effect. But at least you have it working now. Doug --- On Mon, 17/8/09, dastew at sympatico.ca wrote: From: dastew at sympatico.ca Subject: RE: Formatted Output bug To: tbohdan at yahoo.com.au, bug at octave.org Received: Monday, 17 August, 2009, 1:11 AM From: dastew at sympatico.ca To: tbohdan at yahoo.com.au; bug at octave.org Subject: RE: Formatted Output bug Date: Sun, 16 Aug 2009 14:52:35 +0000 Date: Sun, 16 Aug 2009 01:27:42 -0700 From: tbohdan at yahoo.com.au Subject: Formatted Output bug To: bug at octave.org I was running this simple m-file. I think there is a bug in the printf statement. It simply cannot print two variables correctly. The second variable is always wrong. I can print them separately and it works. It has me baffled. Ubuntu 9.04, QtOctave version 0.7.4Octave 3.0.1 mass=1500*[1 0 0 0;0 2 0 0;0 0 2 0;0 0 0 3] stiff=800e3*[1 -1 0 0;-1 3 -2 0;0 -2 5 -3;0 0 -3 7] mr=sqrtm(mass); kt=inv(mr)*stiff*inv(mr); [v,d]=eig(kt); w=sqrt(d); w=w*[1;1;1;1]; w=w./(2*pi) T=1./w printf("Natural Frequency = %.2f Hz \n" ,w) printf("Period = %.2f Hz \n" ,T) printf("Natural Frequency = %f Hz Period= %f \n", w ,T ) Find local businesses and services in your area with Yahoo!7 Local. Get started.. On my ubuntu i get this octave-3.0.1:14> octave-3.0.1:14> printf("Natural Frequency = %.2f Hz \n" ,w) Natural Frequency = 1.73 Hz Natural Frequency = 3.85 Hz Natural Frequency = 5.34 Hz Natural Frequency = 7.26 Hz octave-3.0.1:15> octave-3.0.1:15> printf("Period = %.2f Hz \n" ,T) Period = 0.58 Hz Period = 0.26 Hz Period = 0.19 Hz Period = 0.14 Hz octave-3.0.1:16> octave-3.0.1:16> printf("Natural Frequency = %f Hz Period= %f \n", w ,T ) Natural Frequency = 1.727485 Hz Period= 3.854267 Natural Frequency = 5.338151 Hz Period= 7.261830 Natural Frequency = 0.578876 Hz Period= 0.259453 Natural Frequency = 0.187331 Hz Period= 0.137706 octave-3.0.1:17> It is using all the w array first and then all the T array. Doug Stewart You cold try q=[w T]' octave-3.0.1:16> printf("Natural Frequency = %f Hz Period= %f \n", q ) Natural Frequency = 1.727485 Hz Period= 0.578876 Natural Frequency = 3.854267 Hz Period= 0.259453 Natural Frequency = 5.338151 Hz Period= 0.187331 Natural Frequency = 7.261830 Hz Period= 0.137706 octave-3.0.1:24> Find local businesses and services in your area with Yahoo!7 Local. Get started. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090817/04e9c96e/attachment.html From jwe at octave.org Sun Aug 16 23:18:31 2009 From: jwe at octave.org (John W. Eaton) Date: Mon, 17 Aug 2009 00:18:31 -0400 Subject: Formatted Output bug In-Reply-To: References: <61311.3555.qm@web45701.mail.sp1.yahoo.com> Message-ID: <19080.55831.508268.970495@segfault.lan> On 17-Aug-2009, dastew at sympatico.ca wrote: | I don't know if this is a bug or is the desired effect. It's not a bug. It's the way it is supposed to work, and is compatible with the way Matlab behaves. jwe From tmacchant at yahoo.co.jp Mon Aug 17 02:55:25 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Mon, 17 Aug 2009 16:55:25 +0900 (JST) Subject: make fails at linkiking liboctave (MinGW 4.4.0) Message-ID: <20090817075525.38008.qmail@web3801.mail.bbt.yahoo.co.jp> Hello I have tried to build the current 3.2.x sources at http://hg.tw-math.de/release-3-2-x 'Make' fails at linking liboctave.dll and liboctave.dll.a. g++ -shared-libgcc -shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--out-implib=liboctave.dll.a -o liboctave.dll \ oct-locbuf.o CollocWt.o DASPK.o ...... : : : -L../libcruft -L. -lcruft -lcholmod -lumfpack -lamd -lcamd -lcolamd -lccolamd -lcxsparse -larpack -lqrupdate -lblas.dll -llapack.dll -lfftw3 -lfftw3f -lreadline -lglob -lregex -LC:/Programs/GnuWin32/lib -lpcre -Wl,-s -lreadline -ltermcap -liberty -lblas.dll -llapack.dll -lhdf5 -lz -lm -luuid -lgfortran.dll -lgdi32 -lws2_32 -luser32 -lkernel32 -Lc:/Programs/OctaveBuild/lib -L:/Programs/WinDevTools/lib -Lc:/Programs/GnuWin32/lib -Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0 -Lc:/programs/mingw/bin/../lib/gcc -Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/lib -Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../.. -lhdf5 -lz -lm -luuid -lgfortran.dll -lgfortranbegin -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 Creating library file: liboctave.dll.afu008091.o:(.idata$2+0xc): undefined reference to `libmoldname_a_iname' nmth008090.o:(.idata$4+0x0): undefined reference to `_nm__tzname The symbol libmoldname_a_iname is found in the libmoldname.a. However, its name is '__libmoldname_a_iname'. The underscore does not match. That is origin of the error. OTOH, I cannot find symbol _nm__tzname. This issue may not be octave issue but may be the issue of GCC-4.4.0. At the 3.2.2 source, the above error does not occur. The libraries I used are almost built myself but some of them imported from GNUWin32 and so on. However the error this time may not rely on the dependent libraries at least for the case of 'libmoldname_a_iname'. It will be grateful for me if someone will me advises and suggestions. Regards Tatsuro If you have a -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From lindnerben at gmx.net Mon Aug 17 03:51:02 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Mon, 17 Aug 2009 10:51:02 +0200 Subject: make fails at linkiking liboctave (MinGW 4.4.0) In-Reply-To: <20090817075525.38008.qmail@web3801.mail.bbt.yahoo.co.jp> References: <20090817075525.38008.qmail@web3801.mail.bbt.yahoo.co.jp> Message-ID: <4A8919F6.7070206@gmx.net> Tatsuro MATSUOKA wrote: > Hello > > I have tried to build the current 3.2.x sources at http://hg.tw-math.de/release-3-2-x > > 'Make' fails at linking liboctave.dll and liboctave.dll.a. > > Creating library file: liboctave.dll.afu008091.o:(.idata$2+0xc): undefined reference to > `libmoldname_a_iname' > nmth008090.o:(.idata$4+0x0): undefined reference to `_nm__tzname > > The symbol libmoldname_a_iname is found in the libmoldname.a. However, its name is > '__libmoldname_a_iname'. The underscore does not match. That is origin of the error. > This is the result of changeset http://hg.savannah.gnu.org/hgweb/octave/rev/69d05d1a63b9 See the thread at http://www.nabble.com/"dir"-crashing-oactve-3.2.0-mingw32-to24234760.html with a proposed changeset as fix. the array tzname[] is doubly declared, once in mingw/gcc's headers and once in strftime. benjamin From tmacchant at yahoo.co.jp Mon Aug 17 05:28:57 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Mon, 17 Aug 2009 19:28:57 +0900 (JST) Subject: make fails at linkiking liboctave (MinGW 4.4.0) In-Reply-To: <4A8919F6.7070206@gmx.net> Message-ID: <20090817102857.15247.qmail@web3805.mail.bbt.yahoo.co.jp> Hello --- Benjamin Lindner wrote: > Tatsuro MATSUOKA wrote: > > Hello > > > > I have tried to build the current 3.2.x sources at http://hg.tw-math.de/release-3-2-x > > > > 'Make' fails at linking liboctave.dll and liboctave.dll.a. > > > > Creating library file: liboctave.dll.afu008091.o:(.idata$2+0xc): undefined reference to > > `libmoldname_a_iname' > > nmth008090.o:(.idata$4+0x0): undefined reference to `_nm__tzname > > > > The symbol libmoldname_a_iname is found in the libmoldname.a. However, its name is > > '__libmoldname_a_iname'. The underscore does not match. That is origin of the error. > > > > This is the result of changeset > http://hg.savannah.gnu.org/hgweb/octave/rev/69d05d1a63b9 > > See the thread at > http://www.nabble.com/"dir"-crashing-oactve-3.2.0-mingw32-to24234760.html > with a proposed changeset as fix. > > the array tzname[] is doubly declared, once in mingw/gcc's headers and > once in strftime. > I have modified the configure.in as it was before the changeset is applied. http://hg.savannah.gnu.org/hgweb/octave/rev/69d05d1a63b9 The link error seem to disappeared. Thanks!! In my build, I will treat the above as my local modification. Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From lindnerben at gmx.net Mon Aug 17 07:35:01 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Mon, 17 Aug 2009 14:35:01 +0200 Subject: russian language In-Reply-To: <1255.2712-23876-604968846-1246864578@post.cz> References: <1255.2712-23876-604968846-1246864578@post.cz> Message-ID: <4A894E75.5040306@gmx.net> Viktor Patras wrote: > Dear friends, > > I have new Octave 3.2.0 on russian version OS WindowsXP and I can't write russian letters in black Octave window. > > I have some scripts from previous versions with solve comments in russian (coding, I think, in ASCII - I wrote it in SciTe editor and in Notepad I can see this text too). In last versions in black Octave window I saw russian text, but if I try execute this scripts in new version, I see only obscure characters. > > Do you anybody know, what should be set, or it is problem, mistake of new version? > Try to set the following in your .inputrc file: set convert-meta off (either add the above line or change to "off") You'll find the inputrc file either in your %HOME% directory, or in \share\octave\3.2.2\m\startup benjamin From viktor.patras at post.cz Mon Aug 17 08:23:44 2009 From: viktor.patras at post.cz (Viktor Patras) Date: Mon, 17 Aug 2009 15:23:44 +0200 Subject: russian language In-Reply-To: <4A894E75.5040306@gmx.net> References: <1255.2712-23876-604968846-1246864578@post.cz>, <4A894E75.5040306@gmx.net> Message-ID: <4A897600.7863.15E65D7@viktor.patras.post.cz> Dear Benjamin, thank you for your answer. Although I have ver. 3.2.0 I tried to change file inputrc and it doesn't work. I'm waiting for 3.2.2 windows installer and I hope (as I see in your path) in 3.2.2 version it will be OK. Best regards, Viktor On 17 Aug 2009 at 14:35, Benjamin Lindner wrote: > Viktor Patras wrote: > > Dear friends, > > > > I have new Octave 3.2.0 on russian version OS WindowsXP and I can't write russian letters in black Octave window. > > > > I have some scripts from previous versions with solve comments in russian (coding, I think, in ASCII - I wrote it in SciTe editor and in Notepad I can see this text too). In last versions in black Octave window I saw russian text, but if I try execute this scripts in new version, I see only obscure characters. > > > > Do you anybody know, what should be set, or it is problem, mistake of new version? > > > > Try to set the following in your .inputrc file: > > set convert-meta off > > (either add the above line or change to "off") > > You'll find the inputrc file either in your %HOME% directory, or in > \share\octave\3.2.2\m\startup > > benjamin > From C.Ellenberger at gmx.net Mon Aug 17 11:29:00 2009 From: C.Ellenberger at gmx.net (Christoph Ellenberger) Date: Mon, 17 Aug 2009 18:29:00 +0200 Subject: what is the proper syntax ? Message-ID: <20090817162900.306470@gmx.net> Sorry to bother with something so trivial but I am not finding the proper syntax anywhere. I try to extend a vector [1 2 3] into a matrix 1 2 3 1 2 3 1 2 3 ... using any possible combination I think it might be (also the ones I am sure they are not) [1 2 3].* ones(10,1) [1 2 3].* ones(10,3) [1 2 3].* ones(10,1)' [1 2 3].* ones(10,3)' [1 2 3]* ones(10,1) [1 2 3]* ones(10,3) [1 2 3]* ones(10,1)' [1 2 3]* ones(10,3)' ... and I always get an error using MinGW 3.2.0. Can someone point me to the proper syntax and confirm that it is or is not a bug ? Thank you very much christoph -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 From shermanj at umd.edu Mon Aug 17 11:46:29 2009 From: shermanj at umd.edu (James Sherman Jr.) Date: Mon, 17 Aug 2009 12:46:29 -0400 Subject: what is the proper syntax ? In-Reply-To: <20090817162900.306470@gmx.net> References: <20090817162900.306470@gmx.net> Message-ID: <6800c3890908170946j32545781wd52eef570e970f9e@mail.gmail.com> This is just a matrix dimension problem. Your vector [1 2 3] is 1x3 and the function ones(m,n) returns a matrix of ones of the size m x n. So, what you want to do is: ones(10,1)*[1 2 3] Though, if you just want tile that vector 10 times vertically, you can just do repmat([1 2 3], [10 1]) which is more efficient. On Mon, Aug 17, 2009 at 12:29 PM, Christoph Ellenberger wrote: > Sorry to bother with something so trivial but I am not finding the proper syntax anywhere. > > I try to extend a vector [1 2 3] into a matrix > 1 2 3 > 1 2 3 > 1 2 3 > ... > > using any possible combination I think it might be (also the ones I am sure they are not) > > [1 2 3].* ones(10,1) > [1 2 3].* ones(10,3) > [1 2 3].* ones(10,1)' > [1 2 3].* ones(10,3)' > [1 2 3]* ones(10,1) > [1 2 3]* ones(10,3) > [1 2 3]* ones(10,1)' > [1 2 3]* ones(10,3)' > ... > > and I always get an error using MinGW 3.2.0. Can someone point me to the proper syntax and confirm that it is or is not a bug ? > > Thank you very much > christoph > -- > GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > From william.miner at enig.com Mon Aug 17 13:19:49 2009 From: william.miner at enig.com (William Miner) Date: Mon, 17 Aug 2009 14:19:49 -0400 Subject: Plotting problem Message-ID: I?ve just installed Octave 3.2.2 and gnuplot 4.2.5 from SourceForge on my MacBookPro running Mac OS X 10.5.7. I got the i386 binaries. If I enter the commands t = 0:0.1:6.3; plot (t, cos(t), "-;cos(t);", t, sin(t), "+3;sin(t);"); by hand at the octave prompt, everything works as advertised. An aquaterm window opens and the plot appears. However, if I created a file #! /Applications/Octave.app/Contents/Resources/bin/octave -qf t = 0:0.1:6.3; plot (t, cos(t), "-;cos(t);", t, sin(t), "+3;sin(t);"); and try to execute it either by ?octave test_plot.m? or just ?test_plot.m? as described in the GNU Octave Manual Version 3 page 25, it fails (see below). Could thisw be a bash shell problem? By the way, I?ve set GNUTERM to aqua, i. e. fin1:~ williamminer$ echo $GNUTERM aqua Thanks in advance! Buff Miner fin1:Octave williamminer$ which octave /Applications/Octave.app/Contents/Resources/bin/octave fin1:Octave williamminer$ octave GNU Octave, version 3.2.2 Copyright (C) 2009 John W. Eaton and others. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Octave was configured for "i386-apple-darwin8.11.1". Additional information about Octave is available at http://www.octave.org. Please contribute if you find this software useful. For more information, visit http://www.octave.org/help-wanted.html Report bugs to (but first, please read http://www.octave.org/bugs.html to learn how to write a helpful report). For information about changes from previous versions, type `news'. octave-3.2.2:1> t = 0:0.1:6.3; octave-3.2.2:2> plot (t, cos(t), "-;cos(t);", t, sin(t), "+3;sin(t);"); octave-3.2.2:3> exit() fin1:Octave williamminer$ cat test_plot.m #! /Applications/Octave.app/Contents/Resources/bin/octave -qf t = 0:0.1:6.3; plot (t, cos(t), "-;cos(t);", t, sin(t), "+3;sin(t);"); fin1:Octave williamminer$ octave test_plot.m GNU Octave, version 3.2.2 Copyright (C) 2009 John W. Eaton and others. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Octave was configured for "i386-apple-darwin8.11.1". Additional information about Octave is available at http://www.octave.org. Please contribute if you find this software useful. For more information, visit http://www.octave.org/help-wanted.html Report bugs to (but first, please read http://www.octave.org/bugs.html to learn how to write a helpful report). For information about changes from previous versions, type `news'. fin1:Octave williamminer$ test_plot.m -bash: test_plot.m: command not found fin1:Octave williamminer$ -- Enig Associates, Inc. Suite 500, Bethesda Crescent Bldg. 4600 East West Hwy Bethesda, Maryland 20814 Tel:(301)680-8600 Fax:(301)680-8100 This message is intended only for the use of the intended recipient(s), and it may be privileged and confidential. If you are not the intended recipient, you are hereby notified that any review, retransmission, conversion to hard copy, copying, circulation or other use of this message is strictly prohibited and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, and delete this message from your system. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090817/7a07bc22/attachment.html From tmacchant at yahoo.co.jp Mon Aug 17 13:23:20 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Tue, 18 Aug 2009 03:23:20 +0900 (JST) Subject: russian language In-Reply-To: <4A897600.7863.15E65D7@viktor.patras.post.cz> Message-ID: <20090817182320.68669.qmail@web3808.mail.bbt.yahoo.co.jp> Hello This issue perhaps relies on cmd.exe on windows so that problem will not be fixed by the version up of octave. Please try at octave prompt. system('cmd') Then you will go to cmd console. Please tyy chcp 1251 You can see the message Active code page: 1251 Then click windows bar by right button and goto properties press 'OK' and save current setting. Please refer http://codesnippets.joyent.com/posts/show/414 and http://www.fingertipsoft.com/ref/cyrillic/cp1251r.html To use Russian codepage, your windows may have to be applicable to Russian Language. Regards Tatsuro Regards Tatsuro --- Viktor Patras tor.patr wrote: > Dear Benjamin, > > thank you for your answer. Although I have ver. 3.2.0 I tried to change file > inputrc and it doesn't work. > > I'm waiting for 3.2.2 windows installer and I hope (as I see in your path) in > 3.2.2 version it will be OK. > > Best regards, > > > Viktor > > > > On 17 Aug 2009 at 14:35, Benjamin Lindner wrote: > > > Viktor Patras wrote: > > > Dear friends, > > > > > > I have new Octave 3.2.0 on russian version OS WindowsXP and I can't write russian letters in > black Octave window. > > > > > > I have some scripts from previous versions with solve comments in russian (coding, I think, > in ASCII - I wrote it in SciTe editor and in Notepad I can see this text too). In last versions > in black Octave window I saw russian text, but if I try execute this scripts in new version, I > see only obscure characters. > > > > > > Do you anybody know, what should be set, or it is problem, mistake of new version? > > > > > > > Try to set the following in your .inputrc file: > > > > set convert-meta off > > > > (either add the above line or change to "off") > > > > You'll find the inputrc file either in your %HOME% directory, or in > > \share\octave\3.2.2\m\startup > > > > benjamin > > > > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From jwe at octave.org Mon Aug 17 13:51:28 2009 From: jwe at octave.org (John W. Eaton) Date: Mon, 17 Aug 2009 14:51:28 -0400 Subject: Plotting problem In-Reply-To: References: Message-ID: <19081.42672.306390.397677@segfault.lan> On 17-Aug-2009, William Miner wrote: | fin1:Octave williamminer$ test_plot.m | -bash: test_plot.m: command not found | fin1:Octave williamminer$ You probably need to do chmod +x test_plot.m ./test_plot.m or, put the directory where test_plot.m is in your shell's PATH (but I would not recommend adding '.' to your path). Also, the plot may disappear quickly unless you add a sleep or pause to the end of your script. jwe From highegg at gmail.com Mon Aug 17 14:22:40 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Mon, 17 Aug 2009 21:22:40 +0200 Subject: what is the proper syntax ? In-Reply-To: <20090817162900.306470@gmx.net> References: <20090817162900.306470@gmx.net> Message-ID: <69d8d540908171222p13900b98h63e602f6061d559a@mail.gmail.com> On Mon, Aug 17, 2009 at 6:29 PM, Christoph Ellenberger wrote: > Sorry to bother with something so trivial but I am not finding the proper syntax anywhere. > > I try to extend a vector [1 2 3] into a matrix > 1 2 3 > 1 2 3 > 1 2 3 > ... > > using any possible combination I think it might be (also the ones I am sure they are not) > > [1 2 3].* ones(10,1) > [1 2 3].* ones(10,3) > [1 2 3].* ones(10,1)' > [1 2 3].* ones(10,3)' > [1 2 3]* ones(10,1) > [1 2 3]* ones(10,3) > [1 2 3]* ones(10,1)' > [1 2 3]* ones(10,3)' > ... > > and I always get an error using MinGW 3.2.0. Can someone point me to the proper syntax and confirm that it is or is not a bug ? > what you want is ones (10, 1) * [1 2 3] or use repmat ([1 2 3], 10, 1) which is faster for large vectors. In fact the most efficient way is [1 2 3] (ones (1, 10), :) which is close to what repmat does intrinsically. hth -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From william.miner at enig.com Mon Aug 17 14:29:40 2009 From: william.miner at enig.com (William Miner) Date: Mon, 17 Aug 2009 15:29:40 -0400 Subject: Plotting problem In-Reply-To: <19081.42672.306390.397677@segfault.lan> Message-ID: John, Thanks but I had already tried that and it didn't work (see below) -rwxr-xr-x 1 williamminer staff 133 Aug 17 14:02 test_plot.m fin1:Octave williamminer$ ./test_plot.m ./test_plot.m: line 2: t: command not found ./test_plot.m: line 3: syntax error near unexpected token `t,' ./test_plot.m: line 3: `plot (t, cos(t), "-;cos(t);", t, sin(t), "+3;sin(t);");' fin1:Octave williamminer$ Buff On 8/17/09 2:51 PM, "John Eaton" wrote: > On 17-Aug-2009, William Miner wrote: > > | fin1:Octave williamminer$ test_plot.m > | -bash: test_plot.m: command not found > | fin1:Octave williamminer$ > > You probably need to do > > chmod +x test_plot.m > ./test_plot.m > > or, put the directory where test_plot.m is in your shell's PATH (but I > would not recommend adding '.' to your path). > > Also, the plot may disappear quickly unless you add a sleep or pause > to the end of your script. > > jwe > -- Enig Associates, Inc. Suite 500, Bethesda Crescent Bldg. 4600 East West Hwy Bethesda, Maryland 20814 Tel:(301)680-8600 Fax:(301)680-8100 This message is intended only for the use of the intended recipient(s), and it may be privileged and confidential. If you are not the intended recipient, you are hereby notified that any review, retransmission, conversion to hard copy, copying, circulation or other use of this message is strictly prohibited and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, and delete this message from your system. Thank you. From Thomas.Treichl at gmx.net Mon Aug 17 14:35:38 2009 From: Thomas.Treichl at gmx.net (Thomas Treichl) Date: Mon, 17 Aug 2009 21:35:38 +0200 Subject: Plotting problem In-Reply-To: References: Message-ID: <4A89B10A.7030708@gmx.net> William Miner schrieb: > John, > > Thanks but I had already tried that and it didn't work (see below) > > -rwxr-xr-x 1 williamminer staff 133 Aug 17 14:02 test_plot.m > > fin1:Octave williamminer$ ./test_plot.m > ./test_plot.m: line 2: t: command not found > ./test_plot.m: line 3: syntax error near unexpected token `t,' > ./test_plot.m: line 3: `plot (t, cos(t), "-;cos(t);", t, sin(t), > "+3;sin(t);");' > fin1:Octave williamminer$ > > Buff Hi, I think your problem is that the shebang line #!/Applications/Octave.app/Contents/Resources/bin/octave -qf does not work. The reason why this actually doesn't work is Mac's sh which (I read this on several cites for other programs) does not accept shebang lines with more than 31 characters for the startup script... Your workaround for this could be this shebang line instead: #!/bin/sh /Applications/Octave.app/Contents/Resources/bin/octave -qf Hope this helps, best regards Thomas From william.miner at enig.com Mon Aug 17 15:02:34 2009 From: william.miner at enig.com (William Miner) Date: Mon, 17 Aug 2009 16:02:34 -0400 Subject: Plotting problem In-Reply-To: <4A89B10A.7030708@gmx.net> Message-ID: Everyone, I had to do two things to get it to work 1) As Thomas suggested I changed #! To #!/bin/sh 2) As John suggested I had to add a pause statement at the end of the file. Thanks a bunch! Buff On 8/17/09 3:35 PM, "Thomas Treichl" wrote: > William Miner schrieb: >> John, >> >> Thanks but I had already tried that and it didn't work (see below) >> >> -rwxr-xr-x 1 williamminer staff 133 Aug 17 14:02 test_plot.m >> >> fin1:Octave williamminer$ ./test_plot.m >> ./test_plot.m: line 2: t: command not found >> ./test_plot.m: line 3: syntax error near unexpected token `t,' >> ./test_plot.m: line 3: `plot (t, cos(t), "-;cos(t);", t, sin(t), >> "+3;sin(t);");' >> fin1:Octave williamminer$ >> >> Buff > > Hi, > > I think your problem is that the shebang line > > #!/Applications/Octave.app/Contents/Resources/bin/octave -qf > > does not work. The reason why this actually doesn't work is Mac's sh which (I > read this on several cites for other programs) does not accept shebang lines > with more than 31 characters for the startup script... Your workaround for > this > could be this shebang line instead: > > #!/bin/sh /Applications/Octave.app/Contents/Resources/bin/octave -qf > > Hope this helps, > best regards > > Thomas > -- Enig Associates, Inc. Suite 500, Bethesda Crescent Bldg. 4600 East West Hwy Bethesda, Maryland 20814 Tel:(301)680-8600 Fax:(301)680-8100 This message is intended only for the use of the intended recipient(s), and it may be privileged and confidential. If you are not the intended recipient, you are hereby notified that any review, retransmission, conversion to hard copy, copying, circulation or other use of this message is strictly prohibited and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, and delete this message from your system. Thank you. From Thomas.Treichl at gmx.net Mon Aug 17 15:06:16 2009 From: Thomas.Treichl at gmx.net (Thomas Treichl) Date: Mon, 17 Aug 2009 22:06:16 +0200 Subject: Plotting problem In-Reply-To: <4A89B10A.7030708@gmx.net> References: <4A89B10A.7030708@gmx.net> Message-ID: <4A89B838.4040107@gmx.net> Thomas Treichl schrieb: > William Miner schrieb: >> John, >> >> Thanks but I had already tried that and it didn't work (see below) >> >> -rwxr-xr-x 1 williamminer staff 133 Aug 17 14:02 test_plot.m >> >> fin1:Octave williamminer$ ./test_plot.m >> ./test_plot.m: line 2: t: command not found >> ./test_plot.m: line 3: syntax error near unexpected token `t,' >> ./test_plot.m: line 3: `plot (t, cos(t), "-;cos(t);", t, sin(t), >> "+3;sin(t);");' >> fin1:Octave williamminer$ >> >> Buff > > Hi, > > I think your problem is that the shebang line > > #!/Applications/Octave.app/Contents/Resources/bin/octave -qf > > does not work. The reason why this actually doesn't work is Mac's sh which (I > read this on several cites for other programs) does not accept shebang lines > with more than 31 characters for the startup script... Your workaround for this > could be this shebang line instead: > > #!/bin/sh /Applications/Octave.app/Contents/Resources/bin/octave -qf > > Hope this helps, > best regards > > Thomas Hi again, sorry, I didn't read carefully, this might not be the reason on your Mac because I see that Octave has been launched already in the error message. Then my last tip is, you maybe saved your test_plot.m script as "Mac text file" which doesn't work with Octave. This happens eg. if you use TextEdit.app for writing and saving the text file. I personally use eg. Carbon\ Emacs.app which per default saves files as Unix text file. Sorry again for telling nonsense Thomas From Thomas.Treichl at gmx.net Mon Aug 17 15:11:53 2009 From: Thomas.Treichl at gmx.net (Thomas Treichl) Date: Mon, 17 Aug 2009 22:11:53 +0200 Subject: Plotting problem In-Reply-To: <4A89B838.4040107@gmx.net> References: <4A89B10A.7030708@gmx.net> <4A89B838.4040107@gmx.net> Message-ID: <4A89B989.6090205@gmx.net> Thomas Treichl schrieb: > Thomas Treichl schrieb: >> William Miner schrieb: >>> John, >>> >>> Thanks but I had already tried that and it didn't work (see below) >>> >>> -rwxr-xr-x 1 williamminer staff 133 Aug 17 14:02 test_plot.m >>> >>> fin1:Octave williamminer$ ./test_plot.m >>> ./test_plot.m: line 2: t: command not found >>> ./test_plot.m: line 3: syntax error near unexpected token `t,' >>> ./test_plot.m: line 3: `plot (t, cos(t), "-;cos(t);", t, sin(t), >>> "+3;sin(t);");' >>> fin1:Octave williamminer$ >>> >>> Buff >> Hi, >> >> I think your problem is that the shebang line >> >> #!/Applications/Octave.app/Contents/Resources/bin/octave -qf >> >> does not work. The reason why this actually doesn't work is Mac's sh which (I >> read this on several cites for other programs) does not accept shebang lines >> with more than 31 characters for the startup script... Your workaround for this >> could be this shebang line instead: >> >> #!/bin/sh /Applications/Octave.app/Contents/Resources/bin/octave -qf >> >> Hope this helps, >> best regards >> >> Thomas > > Hi again, > > sorry, I didn't read carefully, this might not be the reason on your Mac because > I see that Octave has been launched already in the error message. Then my last > tip is, you maybe saved your test_plot.m script as "Mac text file" which doesn't > work with Octave. This happens eg. if you use TextEdit.app for writing and > saving the text file. I personally use eg. Carbon\ Emacs.app which per default > saves files as Unix text file. > > Sorry again for telling nonsense > > Thomas Ok, I've seen you solved the problem - and I see Octave error messages where there are bash error messages?!?! This day is already too long... ;) Enjoy Thomas From michael at grossbach.org Tue Aug 18 03:30:17 2009 From: michael at grossbach.org (Michael Grossbach) Date: Tue, 18 Aug 2009 10:30:17 +0200 Subject: cell2struct error Message-ID: <4A8A6699.4080209@grossbach.org> Adding fields to a struct fails when the struct has been assigned before using cell2struct: keys = {"one"; "two"}; values = {1, 3; 2, 4}; s = cell2struct(values, keys, 2); s.three = [5;6] error: invalid structure assignment error: assignment to structure element failed error: assignment failed, or no method for `struct = matrix' error: evaluating assignment expression near line 23, column 9 This is Octave 3.0.1 on Debian Lenny. Has this been fixed in more recent versions? Or am I doing something wrong? Thanks, Michael From highegg at gmail.com Tue Aug 18 03:49:18 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Tue, 18 Aug 2009 10:49:18 +0200 Subject: cell2struct error In-Reply-To: <4A8A6699.4080209@grossbach.org> References: <4A8A6699.4080209@grossbach.org> Message-ID: <69d8d540908180149x2089a3d0mfbd9740c9a772e5e@mail.gmail.com> On Tue, Aug 18, 2009 at 10:30 AM, Michael Grossbach wrote: > Adding fields to a struct fails when the struct has been assigned before > using cell2struct: > > > keys = {"one"; "two"}; > values = {1, 3; 2, 4}; > s = cell2struct(values, keys, 2); > s.three = [5;6] > error: invalid structure assignment > error: assignment to structure element failed > error: assignment failed, or no method for `struct = matrix' > error: evaluating assignment expression near line 23, column 9 Since at this point s is a 2x1 struct array, s.three is a cs-list expression; you can't assign a matrix into it (it's not even a valid reference unless enclosed in brackets). either do s(1).three = 5; s(2).three = 6; or [s.three] = deal (5, 6); or [s.three] = num2cell ([5;6]){:}; or whatever is suitable, but you must produce a cs-list if you want to assign to one. > > This is Octave 3.0.1 on Debian Lenny. Has this been fixed in more recent > versions? Or am I doing something wrong? > Definitely, I recommend you upgrade; a lot has been fixed in this area since 3.0.1. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From viktor.patras at post.cz Tue Aug 18 03:47:09 2009 From: viktor.patras at post.cz (Viktor Patras) Date: Tue, 18 Aug 2009 10:47:09 +0200 Subject: russian language In-Reply-To: <20090817182320.68669.qmail@web3808.mail.bbt.yahoo.co.jp> References: <4A897600.7863.15E65D7@viktor.patras.post.cz>, <20090817182320.68669.qmail@web3808.mail.bbt.yahoo.co.jp> Message-ID: <4A8A86AD.17282.A51867@viktor.patras.post.cz> Dear Tatsuro, thank you for solve my problem. You're right, problem is in codepage. System codepage in russian Windows (WinXP) is 866 (standard in cmd), but Octave 3.2.0 must work with 1251 (btw: 3.0.1 work with 866). So, I added command system("chcp 1251",1); at the end of startup file "octaverc" and Octave works as usual. Best regards, Viktor On 17 Aug 2009 at 20:23, Tatsuro MATSUOKA wrote: > Hello > > This issue perhaps relies on cmd.exe on windows so that problem will not be fixed by the version > up of octave. > > Please try at octave prompt. > > system('cmd') > > Then you will go to cmd console. > > Please tyy > > chcp 1251 > > You can see the message > Active code page: 1251 > > Then click windows bar by right button and goto properties > press 'OK' and save current setting. > > Please refer > > http://codesnippets.joyent.com/posts/show/414 > > and > http://www.fingertipsoft.com/ref/cyrillic/cp1251r.html > > To use Russian codepage, your windows may have to be applicable to Russian Language. > > Regards > > Tatsuro > > Regards > > Tatsuro > > --- Viktor Patras tor.patr wrote: > > > Dear Benjamin, > > > > thank you for your answer. Although I have ver. 3.2.0 I tried to change file > > inputrc and it doesn't work. > > > > I'm waiting for 3.2.2 windows installer and I hope (as I see in your path) in > > 3.2.2 version it will be OK. > > > > Best regards, > > > > > > Viktor > > > > > > > > On 17 Aug 2009 at 14:35, Benjamin Lindner wrote: > > > > > Viktor Patras wrote: > > > > Dear friends, > > > > > > > > I have new Octave 3.2.0 on russian version OS WindowsXP and I can't write russian letters in > > black Octave window. > > > > > > > > I have some scripts from previous versions with solve comments in russian (coding, I think, > > in ASCII - I wrote it in SciTe editor and in Notepad I can see this text too). In last versions > > in black Octave window I saw russian text, but if I try execute this scripts in new version, I > > see only obscure characters. > > > > > > > > Do you anybody know, what should be set, or it is problem, mistake of new version? > > > > > > > > > > Try to set the following in your .inputrc file: > > > > > > set convert-meta off > > > > > > (either add the above line or change to "off") > > > > > > You'll find the inputrc file either in your %HOME% directory, or in > > > \share\octave\3.2.2\m\startup > > > > > > benjamin > > > > > > > > > _______________________________________________ > > Help-octave mailing list > > Help-octave at octave.org > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > > > -------------------------------------- > Power up the Internet with Yahoo! Toolbar. > http://pr.mail.yahoo.co.jp/toolbar/ > From ahills at ecs.umass.edu Tue Aug 18 12:16:17 2009 From: ahills at ecs.umass.edu (Andrew Hills) Date: Tue, 18 Aug 2009 13:16:17 -0400 Subject: Setting XTick Message-ID: <2b22ce890908181016i57b520c0sf019ab8c1fb08717@mail.gmail.com> Hi all, I'm using Octave 3.0.1 (as it's the one provided by Ubuntu, which I use), and the dateaxis command invariably produces errors, so I set about to write my own quick-and-dirty datetick function. The issue I'm having is with `set(gca(),'xtick',somexticks)`. Let's say I have equal-sized arrays t and o, t being Octave/MATLAB dates converted from UNIX time via `datenum(1970,1,1,0,0,t)`, and o being a measurement of clock offset in microseconds, gathered from NTP's peerstats log. Let's say t spans a little more than a day, and I want ticks marking the hours. Using `set(gca(),'xtick',floor(t(1)):1/24:ceil(t(end)))` produces exactly one tick mark. Varying the 1/24 changes its position. The command `get(gca(),'xtick')` returns the expected array of ticks (i.e., the one I provided). Why is it only showing one, and how can I force it to show the ones I want? If necessary, I can post my entire script, as well as the data. --Andrew Hills From jwe at octave.org Tue Aug 18 12:52:55 2009 From: jwe at octave.org (John W. Eaton) Date: Tue, 18 Aug 2009 13:52:55 -0400 Subject: Setting XTick In-Reply-To: <2b22ce890908181016i57b520c0sf019ab8c1fb08717@mail.gmail.com> References: <2b22ce890908181016i57b520c0sf019ab8c1fb08717@mail.gmail.com> Message-ID: <19082.60023.138316.20644@segfault.lan> On 18-Aug-2009, Andrew Hills wrote: | I'm using Octave 3.0.1 (as it's the one provided by Ubuntu, which I | use), and the dateaxis command invariably produces errors, so I set | about to write my own quick-and-dirty datetick function. | | The issue I'm having is with `set(gca(),'xtick',somexticks)`. Let's | say I have equal-sized arrays t and o, t being Octave/MATLAB dates | converted from UNIX time via `datenum(1970,1,1,0,0,t)`, and o being a | measurement of clock offset in microseconds, gathered from NTP's | peerstats log. Let's say t spans a little more than a day, and I want | ticks marking the hours. Using | `set(gca(),'xtick',floor(t(1)):1/24:ceil(t(end)))` produces exactly | one tick mark. Varying the 1/24 changes its position. The command | `get(gca(),'xtick')` returns the expected array of ticks (i.e., the | one I provided). Why is it only showing one, and how can I force it to | show the ones I want? There were many graphics improvements going from 3.0.1 to 3.2.2. It might be easier to upgrade first. jwe From ahills at ecs.umass.edu Tue Aug 18 15:58:53 2009 From: ahills at ecs.umass.edu (Andrew Hills) Date: Tue, 18 Aug 2009 16:58:53 -0400 Subject: Setting XTick In-Reply-To: <19082.60023.138316.20644@segfault.lan> References: <2b22ce890908181016i57b520c0sf019ab8c1fb08717@mail.gmail.com> <19082.60023.138316.20644@segfault.lan> Message-ID: <2b22ce890908181358g623ffd32sbb088e49fcd60c2b@mail.gmail.com> > There were many graphics improvements going from 3.0.1 to 3.2.2. ?It > might be easier to upgrade first. Is there an HTTP mirror where I can get the octave-3.2.2 sources? FTP seems to be broken for me (all software) on Ubuntu. --Andrew Hills From thomas.weber.mail at gmail.com Tue Aug 18 16:24:29 2009 From: thomas.weber.mail at gmail.com (Thomas Weber) Date: Tue, 18 Aug 2009 23:24:29 +0200 Subject: Setting XTick In-Reply-To: <2b22ce890908181358g623ffd32sbb088e49fcd60c2b@mail.gmail.com> References: <2b22ce890908181016i57b520c0sf019ab8c1fb08717@mail.gmail.com> <19082.60023.138316.20644@segfault.lan> <2b22ce890908181358g623ffd32sbb088e49fcd60c2b@mail.gmail.com> Message-ID: <20090818212429.GA25612@atlan> On Tue, Aug 18, 2009 at 04:58:53PM -0400, Andrew Hills wrote: > > There were many graphics improvements going from 3.0.1 to 3.2.2. ?It > > might be easier to upgrade first. > > Is there an HTTP mirror where I can get the octave-3.2.2 sources? FTP > seems to be broken for me (all software) on Ubuntu. The GNU project is mirrored all around the world. Just pick an address starting with http:// from http://www.gnu.org/prep/ftp.html Thomas From ahills at ecs.umass.edu Tue Aug 18 22:07:12 2009 From: ahills at ecs.umass.edu (Andrew Hills) Date: Tue, 18 Aug 2009 23:07:12 -0400 Subject: Setting XTick In-Reply-To: <20090818212429.GA25612@atlan> References: <2b22ce890908181016i57b520c0sf019ab8c1fb08717@mail.gmail.com> <19082.60023.138316.20644@segfault.lan> <2b22ce890908181358g623ffd32sbb088e49fcd60c2b@mail.gmail.com> <20090818212429.GA25612@atlan> Message-ID: <2b22ce890908182007p2490128el7ccc379260cda82@mail.gmail.com> Alright, thanks to you guys, I've got 3.2.2 up and running, and thankfully, the datetick function is included (and a much better version than MATLAB provides). However, "keepticks" doesn't keep my ticks set with set(gca(),'xtick',...). Do I need to change another setting (i.e., am I missing something here?), or is this bug/undocumented feature? --Andrew Hills From smarras.bsc at gmail.com Wed Aug 19 07:18:30 2009 From: smarras.bsc at gmail.com (simone marras) Date: Wed, 19 Aug 2009 14:18:30 +0200 Subject: error with function handles Message-ID: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> Hi, I am trying to call a function that accepts a function handle as argument. My functions are all defined within the same directory where myfun.m rerturns a simple expression as: function y = myfun(x) y = 10*exp(-50.0*abs(x)) - 0.01/((x-0.5).*(x-0.5) + 0.001) + 5.0*sin(5.0*x); endfunction and midpntc is defined as: function [Int] = midpntc(a, b, m, function) h=(b-a)/m x=[a+h/2:h:b]; k = max(size(x)); y = eval(fun); if size(y) == 1, y = diag(ones(k))*y; end int = h*sum(y); when I call midpntc in octave as: >> Int = midpntc(0, 1, 10, "myfun") I obtain the following error: midpntc(0,1,10,"myfun") h = 0.10000 error: `x' undefined near line 2 column 9 error: evaluating binary operator `.^' near line 2, column 10 error: evaluating binary operator `-' near line 2, column 13 error: evaluating binary operator `-' near line 2, column 17 error: evaluating binary operator `./' near line 2, column 6 error: evaluating assignment expression near line 2, column 3 error: called from `myfun' error: evaluating assignment expression near line 13, column 4 error: called from `midpntc' in file `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea/TMP/midpntc.m' while, if I use the syntax >> Int = midpntc(0, 1, 10, @myfun) the error that I get is: h = 0.10000 error: octave_base_value::convert_to_str_internal (): wrong type argument `function handle' error: eval: expecting std::string argument error: evaluating assignment expression near line 13, column 4 error: called from `midpntc' in file `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea/TMP/midpntc.m' Could anyone help me with this issue? Thank you very much in advance, S. -- Simone Marras, Ph.D. candidate Barcelona Supercomputing Center Universitat Politecnica de Catalunya Avd. Diagonal 647, Edificio H, planta 10 Barcelona, 08028 SPAIN Tel.: (+34) 93 4011744 web: www.cranfield.ac.uk/~c086030 From ahills at ecs.umass.edu Wed Aug 19 07:27:58 2009 From: ahills at ecs.umass.edu (Andrew Hills) Date: Wed, 19 Aug 2009 08:27:58 -0400 Subject: error with function handles In-Reply-To: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> References: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> Message-ID: <2b22ce890908190527i690a6289p81efc49ae1cea301@mail.gmail.com> > ? ? ? ?y = eval(fun); I'm no expert, but I'm pretty sure you do need to pass that argument ("x" for "myfun"). Try eval(sprintf("%s(%d)",fun,x)); if the variable "x" in "midpntc" is the argument you want to pass to "fun". (Obviously, change %d depending on the argument's type.) --Andrew Hills From highegg at gmail.com Wed Aug 19 07:36:59 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Wed, 19 Aug 2009 14:36:59 +0200 Subject: error with function handles In-Reply-To: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> References: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> Message-ID: <69d8d540908190536h602060ddrf9a8791598e9b45b@mail.gmail.com> On Wed, Aug 19, 2009 at 2:18 PM, simone marras wrote: > Hi, > > I am trying to call a function that accepts a function handle as > argument. My functions are all defined within the same directory where > myfun.m rerturns a simple expression as: > > function y = myfun(x) > ? ? y = 10*exp(-50.0*abs(x)) - 0.01/((x-0.5).*(x-0.5) + 0.001) + > 5.0*sin(5.0*x); > endfunction > > and midpntc is defined as: > > function [Int] = midpntc(a, b, m, function) > > ? ?h=(b-a)/m > ? ? ? ?x=[a+h/2:h:b]; > > ? ? ? ?k = max(size(x)); > ? ? ? ?y = eval(fun); > > ? ? ? ?if size(y) == 1, y = diag(ones(k))*y; end > > ? ? ? ?int = h*sum(y); > > > > when I call midpntc in octave as: > >>> Int = midpntc(0, 1, 10, "myfun") > > I obtain the following error: > > ?midpntc(0,1,10,"myfun") > h = ?0.10000 > error: `x' undefined near line 2 column 9 > error: evaluating binary operator `.^' near line 2, column 10 > error: evaluating binary operator `-' near line 2, column 13 > error: evaluating binary operator `-' near line 2, column 17 > error: evaluating binary operator `./' near line 2, column 6 > error: evaluating assignment expression near line 2, column 3 > error: called from `myfun' > error: evaluating assignment expression near line 13, column 4 > error: called from `midpntc' in file > `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea/TMP/midpntc.m' > > > while, if I use the syntax > >>> Int = midpntc(0, 1, 10, @myfun) > > the error that I get is: > > h = ?0.10000 > error: octave_base_value::convert_to_str_internal (): wrong type > argument `function handle' > error: eval: expecting std::string argument > error: evaluating assignment expression near line 13, column 4 > error: called from `midpntc' in file > `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea/TMP/midpntc.m' > > > Could anyone help me with this issue? > Thank you very much in advance, > > S. > eval is not meant for evaluating function handles. use fun (...) or feval (fun, ...). "help" and "doc" are your friends :) cheers -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From smarras.bsc at gmail.com Wed Aug 19 07:50:34 2009 From: smarras.bsc at gmail.com (simone marras) Date: Wed, 19 Aug 2009 14:50:34 +0200 Subject: error with function handles In-Reply-To: <200908191445.14046.martin@mhelm.de> References: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> <200908191445.14046.martin@mhelm.de> Message-ID: <2716c4ae0908190550s563157e5y81da3257db906b7d@mail.gmail.com> Hi everyone, thanks for helping. I corrected the errors that you pointed out but still obtained exactly the same error that I would get initially. To summarize the steps, this is what we have: 1) >> function y = fun(x) > y = 10*exp(-50.0*abs(x)); > endfunction >> 2) function int = midpntc(a, b, m, fun) h=(b-a)/m x=[a+h/2:h:b]; k = max(size(x)); y = fun(x); if size(y) == 1, y = diag(ones(k))*y; end int = h*sum(y); end 3) And finally, call to midpntc as: octave:72> midpntc(0, 1,10, @fun) h = 0.10000 error: octave_base_value::convert_to_str_internal (): wrong type argument `function handle' error: eval: expecting std::string argument error: evaluating assignment expression near line 13, column 4 error: called from `midpntc' in file `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea/TMP/midpntc.m' I am lost S. On Wed, Aug 19, 2009 at 2:45 PM, Martin Helm wrote: > Am Mittwoch, 19. August 2009 14:18:30 schrieb simone marras: >> Hi, >> >> I am trying to call a function that accepts a function handle as >> argument. My functions are all defined within the same directory where >> myfun.m rerturns a simple expression as: >> >> function y = myfun(x) >> ? ? ?y = 10*exp(-50.0*abs(x)) - 0.01/((x-0.5).*(x-0.5) + 0.001) + >> 5.0*sin(5.0*x); >> endfunction >> >> and midpntc is defined as: >> >> function [Int] = midpntc(a, b, m, function) >> >> ? ? h=(b-a)/m >> ? ? ? x=[a+h/2:h:b]; >> >> ? ? ? k = max(size(x)); >> ? ? ? y = eval(fun); >> >> ? ? ? if size(y) == 1, y = diag(ones(k))*y; end >> >> ? ? ? int = h*sum(y); >> >> when I call midpntc in octave as: >> >> Int = midpntc(0, 1, 10, "myfun") >> >> I obtain the following error: >> >> ?midpntc(0,1,10,"myfun") >> h = ?0.10000 >> error: `x' undefined near line 2 column 9 >> error: evaluating binary operator `.^' near line 2, column 10 >> error: evaluating binary operator `-' near line 2, column 13 >> error: evaluating binary operator `-' near line 2, column 17 >> error: evaluating binary operator `./' near line 2, column 6 >> error: evaluating assignment expression near line 2, column 3 >> error: called from `myfun' >> error: evaluating assignment expression near line 13, column 4 >> error: called from `midpntc' in file >> `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea >>/TMP/midpntc.m' >> >> >> while, if I use the syntax >> >> >> Int = midpntc(0, 1, 10, @myfun) >> >> the error that I get is: >> >> h = ?0.10000 >> error: octave_base_value::convert_to_str_internal (): wrong type >> argument `function handle' >> error: eval: expecting std::string argument >> error: evaluating assignment expression near line 13, column 4 >> error: called from `midpntc' in file >> `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea >>/TMP/midpntc.m' >> >> >> Could anyone help me with this issue? >> Thank you very much in advance, >> >> S. > > Hello, > > if you really want to pass the function name as string you should use feval > instead of eval to evaluate it. > > y = feval(fun, x); > > Or you simply use a function handle instead of a string > > midpntc(0,1,10, at myfun) > > and in midpntc > > y = fun(x); > > instead of eval > > Hope that helps. > > - mh > > -- Simone Marras, Ph.D. candidate Barcelona Supercomputing Center Universitat Politecnica de Catalunya Avd. Diagonal 647, Edificio H, planta 10 Barcelona, 08028 SPAIN Tel.: (+34) 93 4011744 web: www.cranfield.ac.uk/~c086030 From highegg at gmail.com Wed Aug 19 08:03:18 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Wed, 19 Aug 2009 15:03:18 +0200 Subject: error with function handles In-Reply-To: <2716c4ae0908190550s563157e5y81da3257db906b7d@mail.gmail.com> References: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> <200908191445.14046.martin@mhelm.de> <2716c4ae0908190550s563157e5y81da3257db906b7d@mail.gmail.com> Message-ID: <69d8d540908190603n7054790gf1edaaa5b4f19a78@mail.gmail.com> On Wed, Aug 19, 2009 at 2:50 PM, simone marras wrote: > Hi everyone, thanks for helping. > > I corrected the errors that you pointed out but still obtained exactly > the same error that I would get initially. To summarize the steps, > this is what we have: > > 1) > >>> function y = fun(x) > ?> ? y = 10*exp(-50.0*abs(x)); >> ? ?endfunction >>> > > 2) > > function int = midpntc(a, b, m, fun) > > ? ? ? ?h=(b-a)/m > ? ? ? ?x=[a+h/2:h:b]; > > ? ? ? ?k = max(size(x)); > > ? ? ? ?y = fun(x); > > ? ? ? ?if size(y) == 1, y = diag(ones(k))*y; end > > ? ? ? ?int = h*sum(y); > end > > 3) And finally, call to midpntc as: > > octave:72> midpntc(0, 1,10, @fun) > h = ?0.10000 > error: octave_base_value::convert_to_str_internal (): wrong type > argument `function handle' > error: eval: expecting std::string argument > error: evaluating assignment expression near line 13, column 4 > error: called from `midpntc' in file > `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea/TMP/midpntc.m' > > > I am lost > S. > > Works for me. You're screwing up something - make sure you saved all files and no old versions are getting in the path. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From smarras.bsc at gmail.com Wed Aug 19 08:10:55 2009 From: smarras.bsc at gmail.com (simone marras) Date: Wed, 19 Aug 2009 15:10:55 +0200 Subject: error with function handles In-Reply-To: <200908191510.06722.martin@mhelm.de> References: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> <200908191445.14046.martin@mhelm.de> <2716c4ae0908190550s563157e5y81da3257db906b7d@mail.gmail.com> <200908191510.06722.martin@mhelm.de> Message-ID: <2716c4ae0908190610j5e93e815wda3391307080c8f2@mail.gmail.com> Perfect! It works now; i was indeed using an old saved copy of one of the files! thank you very much for the help! Best, s On Wed, Aug 19, 2009 at 3:10 PM, Martin Helm wrote: > Am Mittwoch, 19. August 2009 14:50:34 schrieb simone marras: >> Hi everyone, thanks for helping. >> >> I corrected the errors that you pointed out but still obtained exactly >> the same error that I would get initially. To summarize the steps, >> this is what we have: >> >> 1) >> >> >> function y = fun(x) >> >> >> ?> ? y = 10*exp(-50.0*abs(x)); >> > >> > ? ?endfunction >> >> 2) >> >> function int = midpntc(a, b, m, fun) >> >> ? ? ? h=(b-a)/m >> ? ? ? x=[a+h/2:h:b]; >> >> ? ? ? k = max(size(x)); >> >> ? ? ? y = fun(x); >> >> ? ? ? if size(y) == 1, y = diag(ones(k))*y; end >> >> ? ? ? int = h*sum(y); >> end >> >> 3) And finally, call to midpntc as: >> >> octave:72> midpntc(0, 1,10, @fun) >> h = ?0.10000 >> error: octave_base_value::convert_to_str_internal (): wrong type >> argument `function handle' >> error: eval: expecting std::string argument >> error: evaluating assignment expression near line 13, column 4 >> error: called from `midpntc' in file >> `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea >>/TMP/midpntc.m' >> >> >> I am lost >> S. >> >> On Wed, Aug 19, 2009 at 2:45 PM, Martin Helm wrote: >> > Am Mittwoch, 19. August 2009 14:18:30 schrieb simone marras: >> >> Hi, >> >> >> >> I am trying to call a function that accepts a function handle as >> >> argument. My functions are all defined within the same directory where >> >> myfun.m rerturns a simple expression as: >> >> >> >> function y = myfun(x) >> >> ? ? ?y = 10*exp(-50.0*abs(x)) - 0.01/((x-0.5).*(x-0.5) + 0.001) + >> >> 5.0*sin(5.0*x); >> >> endfunction >> >> >> >> and midpntc is defined as: >> >> >> >> function [Int] = midpntc(a, b, m, function) >> >> >> >> ? ? h=(b-a)/m >> >> ? ? ? x=[a+h/2:h:b]; >> >> >> >> ? ? ? k = max(size(x)); >> >> ? ? ? y = eval(fun); >> >> >> >> ? ? ? if size(y) == 1, y = diag(ones(k))*y; end >> >> >> >> ? ? ? int = h*sum(y); >> >> >> >> when I call midpntc in octave as: >> >> >> Int = midpntc(0, 1, 10, "myfun") >> >> >> >> I obtain the following error: >> >> >> >> ?midpntc(0,1,10,"myfun") >> >> h = ?0.10000 >> >> error: `x' undefined near line 2 column 9 >> >> error: evaluating binary operator `.^' near line 2, column 10 >> >> error: evaluating binary operator `-' near line 2, column 13 >> >> error: evaluating binary operator `-' near line 2, column 17 >> >> error: evaluating binary operator `./' near line 2, column 6 >> >> error: evaluating assignment expression near line 2, column 3 >> >> error: called from `myfun' >> >> error: evaluating assignment expression near line 13, column 4 >> >> error: called from `midpntc' in file >> >> `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscella >> >>nea /TMP/midpntc.m' >> >> >> >> >> >> while, if I use the syntax >> >> >> >> >> Int = midpntc(0, 1, 10, @myfun) >> >> >> >> the error that I get is: >> >> >> >> h = ?0.10000 >> >> error: octave_base_value::convert_to_str_internal (): wrong type >> >> argument `function handle' >> >> error: eval: expecting std::string argument >> >> error: evaluating assignment expression near line 13, column 4 >> >> error: called from `midpntc' in file >> >> `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscella >> >>nea /TMP/midpntc.m' >> >> >> >> >> >> Could anyone help me with this issue? >> >> Thank you very much in advance, >> >> >> >> S. >> > >> > Hello, >> > >> > if you really want to pass the function name as string you should use >> > feval instead of eval to evaluate it. >> > >> > y = feval(fun, x); >> > >> > Or you simply use a function handle instead of a string >> > >> > midpntc(0,1,10, at myfun) >> > >> > and in midpntc >> > >> > y = fun(x); >> > >> > instead of eval >> > >> > Hope that helps. >> > >> > - mh > > > From your error message I can see that your function still uses eval > >> error: octave_base_value::convert_to_str_internal (): wrong type > > So it seems your updated version of midptnc did not come into effect. > Try > clear midpntc > to delete the old function definition which seems to persist in your RAM. > > - mh > > -- Simone Marras, Ph.D. candidate Barcelona Supercomputing Center Universitat Politecnica de Catalunya Avd. Diagonal 647, Edificio H, planta 10 Barcelona, 08028 SPAIN Tel.: (+34) 93 4011744 web: www.cranfield.ac.uk/~c086030 From martin at mhelm.de Wed Aug 19 08:10:06 2009 From: martin at mhelm.de (Martin Helm) Date: Wed, 19 Aug 2009 15:10:06 +0200 Subject: error with function handles In-Reply-To: <2716c4ae0908190550s563157e5y81da3257db906b7d@mail.gmail.com> References: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> <200908191445.14046.martin@mhelm.de> <2716c4ae0908190550s563157e5y81da3257db906b7d@mail.gmail.com> Message-ID: <200908191510.06722.martin@mhelm.de> Am Mittwoch, 19. August 2009 14:50:34 schrieb simone marras: > Hi everyone, thanks for helping. > > I corrected the errors that you pointed out but still obtained exactly > the same error that I would get initially. To summarize the steps, > this is what we have: > > 1) > > >> function y = fun(x) > >> > > y = 10*exp(-50.0*abs(x)); > > > > endfunction > > 2) > > function int = midpntc(a, b, m, fun) > > h=(b-a)/m > x=[a+h/2:h:b]; > > k = max(size(x)); > > y = fun(x); > > if size(y) == 1, y = diag(ones(k))*y; end > > int = h*sum(y); > end > > 3) And finally, call to midpntc as: > > octave:72> midpntc(0, 1,10, @fun) > h = 0.10000 > error: octave_base_value::convert_to_str_internal (): wrong type > argument `function handle' > error: eval: expecting std::string argument > error: evaluating assignment expression near line 13, column 4 > error: called from `midpntc' in file > `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea >/TMP/midpntc.m' > > > I am lost > S. > > On Wed, Aug 19, 2009 at 2:45 PM, Martin Helm wrote: > > Am Mittwoch, 19. August 2009 14:18:30 schrieb simone marras: > >> Hi, > >> > >> I am trying to call a function that accepts a function handle as > >> argument. My functions are all defined within the same directory where > >> myfun.m rerturns a simple expression as: > >> > >> function y = myfun(x) > >> ? ? ?y = 10*exp(-50.0*abs(x)) - 0.01/((x-0.5).*(x-0.5) + 0.001) + > >> 5.0*sin(5.0*x); > >> endfunction > >> > >> and midpntc is defined as: > >> > >> function [Int] = midpntc(a, b, m, function) > >> > >> ? ? h=(b-a)/m > >> ? ? ? x=[a+h/2:h:b]; > >> > >> ? ? ? k = max(size(x)); > >> ? ? ? y = eval(fun); > >> > >> ? ? ? if size(y) == 1, y = diag(ones(k))*y; end > >> > >> ? ? ? int = h*sum(y); > >> > >> when I call midpntc in octave as: > >> >> Int = midpntc(0, 1, 10, "myfun") > >> > >> I obtain the following error: > >> > >> ?midpntc(0,1,10,"myfun") > >> h = ?0.10000 > >> error: `x' undefined near line 2 column 9 > >> error: evaluating binary operator `.^' near line 2, column 10 > >> error: evaluating binary operator `-' near line 2, column 13 > >> error: evaluating binary operator `-' near line 2, column 17 > >> error: evaluating binary operator `./' near line 2, column 6 > >> error: evaluating assignment expression near line 2, column 3 > >> error: called from `myfun' > >> error: evaluating assignment expression near line 13, column 4 > >> error: called from `midpntc' in file > >> `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscella > >>nea /TMP/midpntc.m' > >> > >> > >> while, if I use the syntax > >> > >> >> Int = midpntc(0, 1, 10, @myfun) > >> > >> the error that I get is: > >> > >> h = ?0.10000 > >> error: octave_base_value::convert_to_str_internal (): wrong type > >> argument `function handle' > >> error: eval: expecting std::string argument > >> error: evaluating assignment expression near line 13, column 4 > >> error: called from `midpntc' in file > >> `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscella > >>nea /TMP/midpntc.m' > >> > >> > >> Could anyone help me with this issue? > >> Thank you very much in advance, > >> > >> S. > > > > Hello, > > > > if you really want to pass the function name as string you should use > > feval instead of eval to evaluate it. > > > > y = feval(fun, x); > > > > Or you simply use a function handle instead of a string > > > > midpntc(0,1,10, at myfun) > > > > and in midpntc > > > > y = fun(x); > > > > instead of eval > > > > Hope that helps. > > > > - mh >From your error message I can see that your function still uses eval > error: octave_base_value::convert_to_str_internal (): wrong type So it seems your updated version of midptnc did not come into effect. Try clear midpntc to delete the old function definition which seems to persist in your RAM. - mh From martin at mhelm.de Wed Aug 19 07:45:13 2009 From: martin at mhelm.de (Martin Helm) Date: Wed, 19 Aug 2009 14:45:13 +0200 Subject: error with function handles In-Reply-To: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> References: <2716c4ae0908190518v65e4608fh3b8a141a76db2ff@mail.gmail.com> Message-ID: <200908191445.14046.martin@mhelm.de> Am Mittwoch, 19. August 2009 14:18:30 schrieb simone marras: > Hi, > > I am trying to call a function that accepts a function handle as > argument. My functions are all defined within the same directory where > myfun.m rerturns a simple expression as: > > function y = myfun(x) > y = 10*exp(-50.0*abs(x)) - 0.01/((x-0.5).*(x-0.5) + 0.001) + > 5.0*sin(5.0*x); > endfunction > > and midpntc is defined as: > > function [Int] = midpntc(a, b, m, function) > > h=(b-a)/m > x=[a+h/2:h:b]; > > k = max(size(x)); > y = eval(fun); > > if size(y) == 1, y = diag(ones(k))*y; end > > int = h*sum(y); > > when I call midpntc in octave as: > >> Int = midpntc(0, 1, 10, "myfun") > > I obtain the following error: > > midpntc(0,1,10,"myfun") > h = 0.10000 > error: `x' undefined near line 2 column 9 > error: evaluating binary operator `.^' near line 2, column 10 > error: evaluating binary operator `-' near line 2, column 13 > error: evaluating binary operator `-' near line 2, column 17 > error: evaluating binary operator `./' near line 2, column 6 > error: evaluating assignment expression near line 2, column 3 > error: called from `myfun' > error: evaluating assignment expression near line 13, column 4 > error: called from `midpntc' in file > `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea >/TMP/midpntc.m' > > > while, if I use the syntax > > >> Int = midpntc(0, 1, 10, @myfun) > > the error that I get is: > > h = 0.10000 > error: octave_base_value::convert_to_str_internal (): wrong type > argument `function handle' > error: eval: expecting std::string argument > error: evaluating assignment expression near line 13, column 4 > error: called from `midpntc' in file > `/home/simone/Documents/scientific/CFD/myCFD_library/ATMOSPHERE_miscellanea >/TMP/midpntc.m' > > > Could anyone help me with this issue? > Thank you very much in advance, > > S. Hello, if you really want to pass the function name as string you should use feval instead of eval to evaluate it. y = feval(fun, x); Or you simply use a function handle instead of a string midpntc(0,1,10, at myfun) and in midpntc y = fun(x); instead of eval Hope that helps. - mh From relgire at gmail.com Wed Aug 19 12:04:59 2009 From: relgire at gmail.com (E. Joshua Rigler) Date: Wed, 19 Aug 2009 11:04:59 -0600 Subject: Getting "help" for mex function Message-ID: <6b48db1f0908191004p33da47fchadfe7916e6c6b02d@mail.gmail.com> I can compile and run mex files, but I cannot access the associated .m files for "help" documentation, even though they exist in the same directory in my path. I don't recall this being a problem with 3.0.x, but I see a note about changes in Octave's "help" facilities in the 3.2 NEWS file, so I'm not sure if this is a bug or not. FWIW, I'm running a custom install of 3.2.0 on Redhat Enterprise 5 (64-bit), linked to mostly custom libraries (ATLAS, Lapack, HDF, etc.), all under my user directory. -EJR -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090819/11012e08/attachment.html From cyd at stupidchicken.com Wed Aug 19 19:35:55 2009 From: cyd at stupidchicken.com (Chong Yidong) Date: Wed, 19 Aug 2009 20:35:55 -0400 Subject: Contour or mesh plots with irregular meshes Message-ID: <87ljlfjp90.fsf@stupidchicken.com> I have a set of data points {x,y,z} that I'd like to plot in way similar to mesh() and/or contour(). However, the {x, y} positions are not placed on a regular grid, and mesh() and contour() take gridded data. Does anyone have a suggestion for how to make the plot? From dbateman at dbateman.org Thu Aug 20 00:37:46 2009 From: dbateman at dbateman.org (David Bateman) Date: Thu, 20 Aug 2009 07:37:46 +0200 Subject: Contour or mesh plots with irregular meshes In-Reply-To: <87ljlfjp90.fsf@stupidchicken.com> References: <87ljlfjp90.fsf@stupidchicken.com> Message-ID: <4A8CE12A.6010600@dbateman.org> Chong Yidong wrote: > I have a set of data points {x,y,z} that I'd like to plot in way similar > to mesh() and/or contour(). However, the {x, y} positions are not > placed on a regular grid, and mesh() and contour() take gridded data. > > Does anyone have a suggestion for how to make the plot? > Use the griddata function to interpolate the data to a regular grid first or look at the code http://hdebruijn.soo.dto.tudelft.nl/www/programs/delphi.htm#omtrek D. From vit2182 at rambler.ru Thu Aug 20 02:10:35 2009 From: vit2182 at rambler.ru (=?windows-1251?B?wujy4Ovo6SDH6Orl5eI=?=) Date: Thu, 20 Aug 2009 11:10:35 +0400 Subject: No subject Message-ID: <144457248.1250752235.160474928.13030@mcgi36.rambler.ru> -- ??????? ??????. -- ?????, ??? ?????? ? ???????.????? http://mail.rambler.ru/new/ [../new/] -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090820/4bd2ef60/attachment.html From tmacchant at yahoo.co.jp Thu Aug 20 04:59:41 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Thu, 20 Aug 2009 18:59:41 +0900 (JST) Subject: FW:Can one treat long double type Matrix in liboctave? Message-ID: <20090820095941.80261.qmail@web3807.mail.bbt.yahoo.co.jp> Hello The below is the translation of the inquiry in the Japanese Octave thread The questioner asked about the liboctave. He asked whether the long double type can be used in Matrix class in the liboctave. If the above is possible, please give him the way to treat that. Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From dbateman at free.fr Thu Aug 20 06:41:08 2009 From: dbateman at free.fr (dbateman) Date: Thu, 20 Aug 2009 04:41:08 -0700 (PDT) Subject: FW:Can one treat long double type Matrix in liboctave? In-Reply-To: <20090820095941.80261.qmail@web3807.mail.bbt.yahoo.co.jp> References: <20090820095941.80261.qmail@web3807.mail.bbt.yahoo.co.jp> Message-ID: <25060457.post@talk.nabble.com> Tatsuro MATSUOKA-2 wrote: > > Hello > > The below is the translation of the inquiry in the Japanese Octave thread > > The questioner asked about the liboctave. > He asked whether the long double type can be used in Matrix class in the > liboctave. > If the above is possible, please give him the way to treat that. > > Regards > > Tatsuro > You could easily instantiate the NDArray or Matrix classes with a long double, but many of the operations such as matrix multiplication, left division, etc are special cased so these operations would need to be implemented as well if they are to be used. So the answer to the question is "maybe", as it depends on how much effort the person want to put into the writing the instantiation of the Matrix and NDArray classes for long doubles and what they really want to do with the code onces its written I added the single precision type last year and so if you want an idea of the amount of effort needed to add the long double type long at the patch. http://hg.savannah.gnu.org/hgweb/octave/rev/82be108cc558 Without long double versions of the vlas/lapack, etc functions making this change for long double would be difficult. D. -- View this message in context: http://www.nabble.com/FW%3ACan-one-treat-long-double-type-Matrix-in-liboctave--tp25059242p25060457.html Sent from the Octave - General mailing list archive at Nabble.com. From smarras.bsc at gmail.com Thu Aug 20 14:29:36 2009 From: smarras.bsc at gmail.com (simone marras) Date: Thu, 20 Aug 2009 21:29:36 +0200 Subject: problem with fscanf in a loop Message-ID: <2716c4ae0908201229w4a603f43l5737356d1c97de4e@mail.gmail.com> Hi everyone, I am using fscanf to read a file made like this: hello0 2.0 3.0 1.3 4.0 hello1 3.0 5.0 2.0 6.0 5.1 8.2 hello2 1.0 2.0 2.0 4.0 and, once I open the file correctly, I try to read it line by line and store into an array of size [nvalues]x[2] the floats of the file but not the strings hello0, hello1, etc. I do it within a loop as follows % Open file file_name_id = fopen(file_name, "r"); if( file_name_id == -1) printf("!!! Error, could not open file '%s'\n", file_name); matrix=[]; return; end % Start now reading: i = 0; x_curvei = 0.0; y_curvei = 0.0; line_cntr = 0; while( !feof(file_name_id)) line_cntr = line_cntr + 1; string = fgets(file_name_id); if( strncmp(string,"# curve",7) == 0 ) i = i + 1 [x_curvei(i) y_curvei(i)] = fscanf(file_name_id, "%f %f\n", "C"); end end but once I run it, it enters the WHILE loop without stopping. Wha is it that I am doing wrong in using fscanf in the "C-type" style? thank you in advance, Best cfd From shermanj at umd.edu Thu Aug 20 15:04:49 2009 From: shermanj at umd.edu (James Sherman Jr.) Date: Thu, 20 Aug 2009 16:04:49 -0400 Subject: problem with fscanf in a loop In-Reply-To: <2716c4ae0908201229w4a603f43l5737356d1c97de4e@mail.gmail.com> References: <2716c4ae0908201229w4a603f43l5737356d1c97de4e@mail.gmail.com> Message-ID: <6800c3890908201304m60b3e031o30ff42d04ce93d09@mail.gmail.com> > ? ? ? ?while( !feof(file_name_id)) > > ? ? ? ? ? ? ? ?line_cntr = line_cntr + 1; > > ? ? ? ? ? ? ? ?string = fgets(file_name_id); > ? ? ? ? ? ? ? ?if( strncmp(string,"# curve",7) == 0 ) > ? ? ? ? ? ? ? ? ? ? ? ?i = i + 1 > ? ? ? ? ? ? ? ? ? ? ? ?[x_curvei(i) y_curvei(i)] = fscanf(file_name_id, "%f %f\n", "C"); > ? ? ? ? ? ? ? ?end > ? ? ? ? end I'm not familiar with some of the particulars of fscanf and I don't have octave available currently to test, so I can't say why the fscanf never exits, but I think I'd rewrite your code a bit different since I think your logic is not correct. For example, I think the statement would only execute once after comment line, then ignore the rest of the lines till another comment line was reached. I'd write something like: data = []; while( !feof(file_name_id)) string = fgets(file_name_id); % reads in a line [tmp_data, n_items] = sscanf(string, "%f %f\n"); % scans the line for 2 numbers if (n_items == 2) % if 2 numbers were found on the line data(end+1, :) = tmp_data; % add that to the data matrix end end I'm pretty sure this will work. From smarras.bsc at gmail.com Thu Aug 20 15:17:59 2009 From: smarras.bsc at gmail.com (simone marras) Date: Thu, 20 Aug 2009 22:17:59 +0200 Subject: problem with fscanf in a loop In-Reply-To: <6800c3890908201304m60b3e031o30ff42d04ce93d09@mail.gmail.com> References: <2716c4ae0908201229w4a603f43l5737356d1c97de4e@mail.gmail.com> <6800c3890908201304m60b3e031o30ff42d04ce93d09@mail.gmail.com> Message-ID: <2716c4ae0908201317w2a22a4c7k3c6a4b9c159841de@mail.gmail.com> Hi James, thank you very much for helping. It indeed works now with your suggestion. It just reads them column by column instead of line by line so that the order is not what expected, but I'll play with it to fix it. The important is that it finally exits the loop correctly All the best, cfd On Thu, Aug 20, 2009 at 10:04 PM, James Sherman Jr. wrote: >> ? ? ? ?while( !feof(file_name_id)) >> >> ? ? ? ? ? ? ? ?line_cntr = line_cntr + 1; >> >> ? ? ? ? ? ? ? ?string = fgets(file_name_id); >> ? ? ? ? ? ? ? ?if( strncmp(string,"# curve",7) == 0 ) >> ? ? ? ? ? ? ? ? ? ? ? ?i = i + 1 >> ? ? ? ? ? ? ? ? ? ? ? ?[x_curvei(i) y_curvei(i)] = fscanf(file_name_id, "%f %f\n", "C"); >> ? ? ? ? ? ? ? ?end >> ? ? ? ? end > > I'm not familiar with some of the particulars of fscanf and I don't > have octave available currently to test, so I can't say why the fscanf > never exits, but I think I'd rewrite your code a bit different since I > think your logic is not correct. ?For example, I think the statement > would only execute once after comment line, then ignore the rest of > the lines till another comment line was reached. ?I'd write something > like: > > data = []; > > while( !feof(file_name_id)) > > ? string = fgets(file_name_id); ?% reads in a line > ? [tmp_data, n_items] = sscanf(string, "%f %f\n"); ?% scans the line > for 2 numbers > > ? if (n_items == 2) ? ? ?% if 2 numbers were found on the line > ? ? ?data(end+1, :) = tmp_data; ?% add that to the data matrix > ? end > > end > > I'm pretty sure this will work. > -- Simone Marras, Ph.D. candidate Barcelona Supercomputing Center Universitat Politecnica de Catalunya Avd. Diagonal 647, Edificio H, planta 10 Barcelona, 08028 SPAIN Tel.: (+34) 93 4011744 web: www.cranfield.ac.uk/~c086030 From miikka.tulonen at gmail.com Thu Aug 20 15:29:18 2009 From: miikka.tulonen at gmail.com (Miikka Tulonen) Date: Thu, 20 Aug 2009 22:29:18 +0200 Subject: Feeding coefficients to a function file???? Message-ID: I have a problem with exporting some coefficients to a function file from a script. When I write it this way it works just fine (defining k1 & k2 in the function file itself): Script: clear all; close all; t = [0 100]; CA0 = 1.5; CB0 = 1.0; CC0 = 0; #k1 = 0.076; #k2 = 0.0023; C0 = [CA0 CB0 CC0]; [t,C]=ode45(@ode,t,C0); plot(t,C) xlabel('time') ylabel('concentration') Function: function F = ode(t,C) k1 = 0.076; k2 = 0.0023; ca = C(1); cb = C(2); cc = C(3); r1 = k1*ca*cb; r2 = k2*(cc.^2); dA = -r1+r2; dB = -r1+r2; dC = r1-r2; F = [dA; dB; dC]; endfunction Now, when I try to define the coefficients (k1 & k2) in the script like this..: Script: clear all; close all; t = [0 100]; CA0 = 1.5; CB0 = 1.0; CC0 = 0; k1 = 0.076; k2 = 0.0023; C0 = [CA0 CB0 CC0]; k =[k1 k2]; [t,C]=ode45(@ode,t,C0,[],k); plot(t,C) xlabel('time') ylabel('concentration') ...and then try to pass them to the function: Function: 1 function F = ode(t,C,k) 2 3 #k1 = 0.076; 4 #k2 = 0.0023; 5 6 ca = C(1); 7 cb = C(2); 8 cc = C(3); 9 10 k1 = k(1); 11 k2 = k(2); 12 13 r1 = k1*ca*cb; 14 r2 = k2*(cc.^2); 15 16 dA = -r1+r2; 17 dB = -r1+r2; 18 dC = r1-r2; 19 20 F = [dA; dB; dC]; 21 22 endfunction I get this: error: A(I): Index exceeds matrix dimension. error: called from: error: D:\Tiedostoja\Koulu\Octave\Testi\ode.m at line 10, column 4 error: D:\Ohjelmat\Octave 3.2.0\share\octave\packages\odepkg-0.6.7\ode45.m at line 328, column 17 error: D:\Tiedostoja\Koulu\Octave\Testi\funktio.m at line 15, column 6 I figured I'm probably screwing up on the first line of the function file but couldn't find out what exactly. (I tried some other things too but at best managed only to produce a different error message, other than syntax error) I failed to find any examples that would be doing the same thing but ode45 help indicates that I should be (I think) able to feed in some additional parameters just like in MATLAB (I'm coming from there, started experimenting with Octave yesterday). Ode45 help says: -- Function File: [] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, ...]) -- Command: [SOL] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, ...]) -- Command: [T, Y, [XE, YE, IE]] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, ...]) ......... I also failed to find out a way to debug it so that I could see what's going on inside the function when it is being run. I tried "keyboard" and some other too I think but wasn't able to take a look at any of the stuff defined in the function, only the ones in the script. When I place "keyboard;" or "keyboard;pause;" into the function file, the only things I can take a look at are the parameters in the script file. So it would be very helpful if someone could point out what am I doing wrong with it. Oh, and I'm using version 3.2.0 on Windows Vista. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090820/b96e8b19/attachment.html From dastew at sympatico.ca Thu Aug 20 15:42:38 2009 From: dastew at sympatico.ca (dastew at sympatico.ca) Date: Thu, 20 Aug 2009 20:42:38 +0000 Subject: Feeding coefficients to a function file???? In-Reply-To: References: Message-ID: Date: Thu, 20 Aug 2009 22:29:18 +0200 Subject: Feeding coefficients to a function file???? From: miikka.tulonen at gmail.com To: help-octave at octave.org I have a problem with exporting some coefficients to a function file from a script. When I write it this way it works just fine (defining k1 & k2 in the function file itself): Script: clear all; close all; t = [0 100]; CA0 = 1.5; CB0 = 1.0; CC0 = 0; #k1 = 0.076; #k2 = 0.0023; C0 = [CA0 CB0 CC0]; [t,C]=ode45(@ode,t,C0); plot(t,C) xlabel('time') ylabel('concentration') Function: function F = ode(t,C) k1 = 0.076; k2 = 0.0023; ca = C(1); cb = C(2); cc = C(3); r1 = k1*ca*cb; r2 = k2*(cc.^2); dA = -r1+r2; dB = -r1+r2; dC = r1-r2; F = [dA; dB; dC]; endfunction Now, when I try to define the coefficients (k1 & k2) in the script like this..: Script: clear all; close all; t = [0 100]; CA0 = 1.5; CB0 = 1.0; CC0 = 0; k1 = 0.076; k2 = 0.0023; I think these should be k(1)=0.076; k(2)=0.0023; Doug Stewart C0 = [CA0 CB0 CC0]; k =[k1 k2]; [t,C]=ode45(@ode,t,C0,[],k); plot(t,C) xlabel('time') ylabel('concentration') ...and then try to pass them to the function: Function: 1 function F = ode(t,C,k) 2 3 #k1 = 0.076; 4 #k2 = 0.0023; 5 6 ca = C(1); 7 cb = C(2); 8 cc = C(3); 9 10 k1 = k(1); 11 k2 = k(2); 12 13 r1 = k1*ca*cb; 14 r2 = k2*(cc.^2); 15 16 dA = -r1+r2; 17 dB = -r1+r2; 18 dC = r1-r2; 19 20 F = [dA; dB; dC]; 21 22 endfunction I get this: error: A(I): Index exceeds matrix dimension. error: called from: error: D:\Tiedostoja\Koulu\Octave\Testi\ode.m at line 10, column 4 error: D:\Ohjelmat\Octave 3.2.0\share\octave\packages\odepkg-0.6.7\ode45.m at line 328, column 17 error: D:\Tiedostoja\Koulu\Octave\Testi\funktio.m at line 15, column 6 I figured I'm probably screwing up on the first line of the function file but couldn't find out what exactly. (I tried some other things too but at best managed only to produce a different error message, other than syntax error) I failed to find any examples that would be doing the same thing but ode45 help indicates that I should be (I think) able to feed in some additional parameters just like in MATLAB (I'm coming from there, started experimenting with Octave yesterday). Ode45 help says: -- Function File: [] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, ...]) -- Command: [SOL] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, ...]) -- Command: [T, Y, [XE, YE, IE]] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, ...]) ......... I also failed to find out a way to debug it so that I could see what's going on inside the function when it is being run. I tried "keyboard" and some other too I think but wasn't able to take a look at any of the stuff defined in the function, only the ones in the script. When I place "keyboard;" or "keyboard;pause;" into the function file, the only things I can take a look at are the parameters in the script file. So it would be very helpful if someone could point out what am I doing wrong with it. Oh, and I'm using version 3.2.0 on Windows Vista. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090820/0bb9964e/attachment-0001.html From tmacchant at yahoo.co.jp Thu Aug 20 17:40:53 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Fri, 21 Aug 2009 07:40:53 +0900 (JST) Subject: FW:Can one treat long double type Matrix in liboctave? In-Reply-To: <25060457.post@talk.nabble.com> Message-ID: <20090820224053.18181.qmail@web3808.mail.bbt.yahoo.co.jp> Hello David I will upload your reply to the octave threads in Japan. Thanks!! Tatsuro --- dbateman wrote: > > > > Tatsuro MATSUOKA-2 wrote: > > > > Hello > > > > The below is the translation of the inquiry in the Japanese Octave thread > > > > The questioner asked about the liboctave. > > He asked whether the long double type can be used in Matrix class in the > > liboctave. > > If the above is possible, please give him the way to treat that. > > > > Regards > > > > Tatsuro > > > > You could easily instantiate the NDArray or Matrix classes with a long > double, but many of the operations such as matrix multiplication, left > division, etc are special cased so these operations would need to be > implemented as well if they are to be used. So the answer to the question is > "maybe", as it depends on how much effort the person want to put into the > writing the instantiation of the Matrix and NDArray classes for long doubles > and what they really want to do with the code onces its written > > I added the single precision type last year and so if you want an idea of > the amount of effort needed to add the long double type long at the patch. > > http://hg.savannah.gnu.org/hgweb/octave/rev/82be108cc558 > > Without long double versions of the vlas/lapack, etc functions making this > change for long double would be difficult. > > D. > > > > -- > View this message in context: > http://www.nabble.com/FW%3ACan-one-treat-long-double-type-Matrix-in-liboctave--tp25059242p25060457.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From miikka.tulonen at gmail.com Thu Aug 20 17:44:14 2009 From: miikka.tulonen at gmail.com (Miikka Tulonen) Date: Fri, 21 Aug 2009 00:44:14 +0200 Subject: Feeding coefficients to a function file???? In-Reply-To: References: Message-ID: Doesn't make any practical difference. You can say for example: k1 = 1; k2 = 2; k=[k1 k2]; as a result k = [1 2]; Putting it this way: k(1) = 1; k(2) = 2; leads exactly to the same outcome k = [1 2]; (Also leads to the same error message) I believe my problem is that at some point when I'm trying to transfer vector k into the function file when ode solver calls the file, something goes wrong. I just don't understand what, because I have no idea what goes in there as I have not yet found a way to debug it so that I could see what's going on in the function file. In matlab if you place "keyboard; pause;" above the line where the error occurs you can see all the variables loaded by the function by that point in the workspace and it's often quite easy to say what's not the way it's supposed to be....but Octave is still a total mystery to me. It says "index exceeds matrix dimensions" which sort of indicates that k is not "undefined" (I guess) but rather a non-existent element of vector k is requested. 2009/8/20 > > > ------------------------------ > Date: Thu, 20 Aug 2009 22:29:18 +0200 > Subject: Feeding coefficients to a function file???? > From: miikka.tulonen at gmail.com > To: help-octave at octave.org > > > I have a problem with exporting some coefficients to a function file from a > script. > When I write it this way it works just fine (defining k1 & k2 in the > function file itself): > Script: > clear all; close all; > t = [0 100]; > > CA0 = 1.5; > CB0 = 1.0; > CC0 = 0; > > #k1 = 0.076; > #k2 = 0.0023; > > C0 = [CA0 CB0 CC0]; > > [t,C]=ode45(@ode,t,C0); > > plot(t,C) > xlabel('time') > ylabel('concentration') > > > Function: > function F = ode(t,C) > > k1 = 0.076; > k2 = 0.0023; > > ca = C(1); > cb = C(2); > cc = C(3); > > r1 = k1*ca*cb; > r2 = k2*(cc.^2); > > dA = -r1+r2; > dB = -r1+r2; > dC = r1-r2; > > F = [dA; dB; dC]; > > endfunction > > Now, when I try to define the coefficients (k1 & k2) in the script like > this..: > Script: > clear all; close all; > t = [0 100]; > > CA0 = 1.5; > CB0 = 1.0; > CC0 = 0; > > k1 = 0.076; > k2 = 0.0023; > > I think these should be > k(1)=0.076; > k(2)=0.0023; > > > Doug Stewart > > > > > > > C0 = [CA0 CB0 CC0]; > k =[k1 k2]; > > [t,C]=ode45(@ode,t,C0,[],k); > > plot(t,C) > xlabel('time') > ylabel('concentration') > > ...and then try to pass them to the function: > Function: > 1 function F = ode(t,C,k) > 2 > 3 #k1 = 0.076; > 4 #k2 = 0.0023; > 5 > 6 ca = C(1); > 7 cb = C(2); > 8 cc = C(3); > 9 > 10 k1 = k(1); > 11 k2 = k(2); > 12 > 13 r1 = k1*ca*cb; > 14 r2 = k2*(cc.^2); > 15 > 16 dA = -r1+r2; > 17 dB = -r1+r2; > 18 dC = r1-r2; > 19 > 20 F = [dA; dB; dC]; > 21 > 22 endfunction > > I get this: > > error: A(I): Index exceeds matrix dimension. > error: called from: > error: D:\Tiedostoja\Koulu\Octave\Testi\ode.m at line 10, column 4 > error: D:\Ohjelmat\Octave > 3.2.0\share\octave\packages\odepkg-0.6.7\ode45.m at line 328, column 17 > error: D:\Tiedostoja\Koulu\Octave\Testi\funktio.m at line 15, column > 6 > > > I figured I'm probably screwing up on the first line of the function file > but couldn't find out what exactly. (I tried some other things too but at > best managed only to produce a different error message, other than syntax > error) > I failed to find any examples that would be doing the same thing but ode45 > help indicates that I should be (I think) able to feed in > some additional parameters just like in MATLAB (I'm coming from there, > started experimenting with Octave yesterday). > > Ode45 help says: > > -- Function File: [] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, > ...]) > -- Command: [SOL] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, ...]) > -- Command: [T, Y, [XE, YE, IE]] = ode45 (@FUN, SLOT, INIT, [OPT], > [PAR1, PAR2, ...]) > ......... > > I also failed to find out a way to debug it so that I could see what's > going on inside the function when it is being run. I tried "keyboard" and > some other too > I think but wasn't able to take a look at any of the stuff defined in the > function, only the ones in the script. When I place "keyboard;" or > "keyboard;pause;" into the function file, the only things I can take a look > at are the parameters in the script file. > So it would be very helpful if someone could point out what am I doing > wrong with it. Oh, and I'm using version 3.2.0 on Windows Vista. > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090821/a4ba135d/attachment.html From mk144210 at bcm.edu Thu Aug 20 19:46:03 2009 From: mk144210 at bcm.edu (misha680) Date: Thu, 20 Aug 2009 17:46:03 -0700 (PDT) Subject: Principle components analysis on a large dataset Message-ID: <25072517.post@talk.nabble.com> Dear Sirs: Please pardon me I am very new to Octave. I have been using MATLAB. I was wondering if Octave would allow me to do principal components analysis on a very large dataset. Specifically, our dataset has 68800 variables and around 6000 observations. Matlab gives "out of memory" errors. I have tried also doing princomp in pieces, but this does not seem to quite work for our approach. Anything that might help much appreciated. If anyone has had experience doing this in Octave much appreciated. Thank you Misha -- View this message in context: http://www.nabble.com/Principle-components-analysis-on-a-large-dataset-tp25072517p25072517.html Sent from the Octave - General mailing list archive at Nabble.com. From jthoo at yccd.edu Thu Aug 20 15:45:53 2009 From: jthoo at yccd.edu (John B. Thoo) Date: Thu, 20 Aug 2009 13:45:53 -0700 Subject: Print plot error Message-ID: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> Hi. I was using the script (see below) to print a sequence of plots as .png files so that I may create a movie using QuickTime Pro. Everything was going well until about half the plots had been printed, and I got the following error: octave-3.2.0:36> makemovie /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: fork: Resource temporarily unavailable /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 67: / bin/gnuplot-4.2.5: No such file or directory ^C octave-3.2.0:36> What does this indicate? A second question: It takes a while to draw each plot (x11) before it is printed. Is there a way to suppress the drawing, and only print the .png files from the data? %% BEGIN SCRIPT %% script name: makemovie.m clf filename = "muNegOne_ord7tf1"; wait = max (1/(tf - t0 + 1), 0.05); % pause time between frames lT = length (T) - 1; % T = total number of plots saved in data file N = 150; % number of time intervals (frames) to plot (must have N <= lT) if (N > lT) error ('N > lT; need N <= lT'); end time = ones (1, N); time(2:N+1) = floor ((lT/N)*(1:N)) + 1; for j = 1:N+1 % for "ode45" plot (x, u(:,time(j))); title (strcat ('time =', num2str ((tf-t0)*(time(j) - 1)/lT))); axis ([0 2*pi -1.5 1.5]); % axis([0 2*pi 2*min(real(u0)) 2*max(real(u0))]); print (sprintf ("./MakeMovie/%s%d.png", filename, j), "-dpng"); pause(wait); end %% END SCRIPT (Any suggestions to clean up my script would also be appreciated.) I am using Octave 3.2.0 and gnuplot 4.2 patchlevel 5 on Mac OS X 10.4.11. Both Octave.app and Gnuplot.app were installed from Thomas Treichl's .dmg disc image into my Applications folder. Thanks. ---John. From aliensunmin at gmail.com Thu Aug 20 20:32:08 2009 From: aliensunmin at gmail.com (Min Sun) Date: Thu, 20 Aug 2009 18:32:08 -0700 Subject: good function to plot confusion matrix Message-ID: Hi, Is there a good function to plot confusion matrix in octave? Thanks, Min Sun From george.brida at gmail.com Fri Aug 21 06:10:34 2009 From: george.brida at gmail.com (george brida) Date: Fri, 21 Aug 2009 13:10:34 +0200 Subject: Empty matrix Message-ID: <82e1feb80908210410x6af44fe6y6971833d56c37e82@mail.gmail.com> Dear Octavers, I programmed a function 'matrix_exp' that returns a matrix x with dimension (T-m, 2*p+8), where T, m and p are known number. The problem when I call this function to return this matrix, I obtain from Matlab this message:"empty matrix 0 by 16", I choose p=4. Nevertheless when I repeat the lines that defined this function in another program, I obtained this matrix (i.e without any call of this function). So, I conclude that the lines I written to define the function 'matrix_exp' are true but I don't understand the message of Matlab. Can you please help, thank you in advance. George -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090821/0d17bf87/attachment.html From jordigh at gmail.com Fri Aug 21 14:55:03 2009 From: jordigh at gmail.com (=?UTF-8?Q?Jordi_Guti=C3=A9rrez_Hermos?=) Date: Fri, 21 Aug 2009 14:55:03 -0500 Subject: Contour or mesh plots with irregular meshes In-Reply-To: <87ljlfjp90.fsf@stupidchicken.com> References: <87ljlfjp90.fsf@stupidchicken.com> Message-ID: <9543b3a40908211255h70bca780yfd39c3ae3cf991f7@mail.gmail.com> 2009/8/19 Chong Yidong : > I have a set of data points {x,y,z} that I'd like to plot in way similar > to mesh() and/or contour(). ?However, the {x, y} positions are not > placed on a regular grid, and mesh() and contour() take gridded data. You can try a Delaunay triangulation on the x-y plane and use the trimesh function. From jordigh at gmail.com Fri Aug 21 14:58:05 2009 From: jordigh at gmail.com (=?UTF-8?Q?Jordi_Guti=C3=A9rrez_Hermos?=) Date: Fri, 21 Aug 2009 14:58:05 -0500 Subject: Empty matrix In-Reply-To: <82e1feb80908210410x6af44fe6y6971833d56c37e82@mail.gmail.com> References: <82e1feb80908210410x6af44fe6y6971833d56c37e82@mail.gmail.com> Message-ID: <9543b3a40908211258j2cd64d79pb241dd429b63201e@mail.gmail.com> 2009/8/21 george brida : > I programmed a function 'matrix_exp' that returns a matrix x with dimension > (T-m, 2*p+8), where T, m and p are known number. The problem when I call > this function to return this matrix, I obtain from Matlab this > message:"empty matrix 0 by 16", I choose p=4. Nevertheless when I repeat the > lines that defined this function in another program, I obtained this matrix > (i.e without any call of this function). So, I conclude that the lines I > written to define the function 'matrix_exp' are true but I don't understand > the message of Matlab. I don't understand why you are talking about Matlab, since you don't seem to be comparing it to Octave. Why is this an Octave question? There isn't much we can do to help if you don't show us the code that is giving you trouble. Also, why did you program your own matrix exponential instead of using expm? From highegg at gmail.com Fri Aug 21 15:13:33 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Fri, 21 Aug 2009 22:13:33 +0200 Subject: Contour or mesh plots with irregular meshes In-Reply-To: <87ljlfjp90.fsf@stupidchicken.com> References: <87ljlfjp90.fsf@stupidchicken.com> Message-ID: <69d8d540908211313l4b9ac4acj9419c2394d6d0b99@mail.gmail.com> On Thu, Aug 20, 2009 at 2:35 AM, Chong Yidong wrote: > I have a set of data points {x,y,z} that I'd like to plot in way similar > to mesh() and/or contour(). ?However, the {x, y} positions are not > placed on a regular grid, and mesh() and contour() take gridded data. > > Does anyone have a suggestion for how to make the plot? Typically you'd want to interpolate the data onto a mesh, then plot it. "griddata" is a built-in option, based on delaunay triangulation. For more smooth interpolation, you can try, for example, the octgpr package from OctaveForge. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From miikka.tulonen at gmail.com Fri Aug 21 16:23:54 2009 From: miikka.tulonen at gmail.com (Miikka Tulonen) Date: Fri, 21 Aug 2009 23:23:54 +0200 Subject: Feeding coefficients to a function file???? In-Reply-To: References: Message-ID: Ok, it seems I managed to come up with a solution to this by experimenting a little bit more. I removed ";" from ends of all lines and noticed that it prints k in a function as "[](0x0)". I tried adding additional argument ("opt") into function arguments like this function F = ode(t,C,opt,k) and managed to get my vector k into the function file in one piece. Apparently it is required to take the "options" argument into account too in the function even if you leave it empty. 2009/8/21 Miikka Tulonen > Doesn't make any practical difference. > You can say for example: > k1 = 1; > k2 = 2; > k=[k1 k2]; > as a result k = [1 2]; > > Putting it this way: > k(1) = 1; > k(2) = 2; > leads exactly to the same outcome > k = [1 2]; > (Also leads to the same error message) > > I believe my problem is that at some point when I'm trying to transfer > vector k into the function file when ode solver calls the file, something > goes wrong. I just don't understand what, because I have no idea what goes > in there as I have not yet found a way to debug it so that I could see > what's going on in the function file. In matlab if you place "keyboard; > pause;" above the line where the error occurs you can see all the variables > loaded by the function by that point in the workspace and it's often quite > easy to say what's not the way it's supposed to be....but Octave is still a > total mystery to me. > > It says "index exceeds matrix dimensions" which sort of indicates that k is > not "undefined" (I guess) but rather a non-existent element of vector k is > requested. > > 2009/8/20 > > >> >> ------------------------------ >> Date: Thu, 20 Aug 2009 22:29:18 +0200 >> Subject: Feeding coefficients to a function file???? >> From: miikka.tulonen at gmail.com >> To: help-octave at octave.org >> >> >> I have a problem with exporting some coefficients to a function file from >> a script. >> When I write it this way it works just fine (defining k1 & k2 in the >> function file itself): >> Script: >> clear all; close all; >> t = [0 100]; >> >> CA0 = 1.5; >> CB0 = 1.0; >> CC0 = 0; >> >> #k1 = 0.076; >> #k2 = 0.0023; >> >> C0 = [CA0 CB0 CC0]; >> >> [t,C]=ode45(@ode,t,C0); >> >> plot(t,C) >> xlabel('time') >> ylabel('concentration') >> >> >> Function: >> function F = ode(t,C) >> >> k1 = 0.076; >> k2 = 0.0023; >> >> ca = C(1); >> cb = C(2); >> cc = C(3); >> >> r1 = k1*ca*cb; >> r2 = k2*(cc.^2); >> >> dA = -r1+r2; >> dB = -r1+r2; >> dC = r1-r2; >> >> F = [dA; dB; dC]; >> >> endfunction >> >> Now, when I try to define the coefficients (k1 & k2) in the script like >> this..: >> Script: >> clear all; close all; >> t = [0 100]; >> >> CA0 = 1.5; >> CB0 = 1.0; >> CC0 = 0; >> >> k1 = 0.076; >> k2 = 0.0023; >> >> I think these should be >> k(1)=0.076; >> k(2)=0.0023; >> >> >> Doug Stewart >> >> >> >> >> >> >> C0 = [CA0 CB0 CC0]; >> k =[k1 k2]; >> >> [t,C]=ode45(@ode,t,C0,[],k); >> >> plot(t,C) >> xlabel('time') >> ylabel('concentration') >> >> ...and then try to pass them to the function: >> Function: >> 1 function F = ode(t,C,k) >> 2 >> 3 #k1 = 0.076; >> 4 #k2 = 0.0023; >> 5 >> 6 ca = C(1); >> 7 cb = C(2); >> 8 cc = C(3); >> 9 >> 10 k1 = k(1); >> 11 k2 = k(2); >> 12 >> 13 r1 = k1*ca*cb; >> 14 r2 = k2*(cc.^2); >> 15 >> 16 dA = -r1+r2; >> 17 dB = -r1+r2; >> 18 dC = r1-r2; >> 19 >> 20 F = [dA; dB; dC]; >> 21 >> 22 endfunction >> >> I get this: >> >> error: A(I): Index exceeds matrix dimension. >> error: called from: >> error: D:\Tiedostoja\Koulu\Octave\Testi\ode.m at line 10, column 4 >> error: D:\Ohjelmat\Octave >> 3.2.0\share\octave\packages\odepkg-0.6.7\ode45.m at line 328, column 17 >> error: D:\Tiedostoja\Koulu\Octave\Testi\funktio.m at line 15, column >> 6 >> >> >> I figured I'm probably screwing up on the first line of the function file >> but couldn't find out what exactly. (I tried some other things too but at >> best managed only to produce a different error message, other than syntax >> error) >> I failed to find any examples that would be doing the same thing but ode45 >> help indicates that I should be (I think) able to feed in >> some additional parameters just like in MATLAB (I'm coming from there, >> started experimenting with Octave yesterday). >> >> Ode45 help says: >> >> -- Function File: [] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, >> ...]) >> -- Command: [SOL] = ode45 (@FUN, SLOT, INIT, [OPT], [PAR1, PAR2, ...]) >> -- Command: [T, Y, [XE, YE, IE]] = ode45 (@FUN, SLOT, INIT, [OPT], >> [PAR1, PAR2, ...]) >> ......... >> >> I also failed to find out a way to debug it so that I could see what's >> going on inside the function when it is being run. I tried "keyboard" and >> some other too >> I think but wasn't able to take a look at any of the stuff defined in the >> function, only the ones in the script. When I place "keyboard;" or >> "keyboard;pause;" into the function file, the only things I can take a look >> at are the parameters in the script file. >> So it would be very helpful if someone could point out what am I doing >> wrong with it. Oh, and I'm using version 3.2.0 on Windows Vista. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090821/0c5c7243/attachment.html From george.brida at gmail.com Fri Aug 21 18:28:01 2009 From: george.brida at gmail.com (george brida) Date: Sat, 22 Aug 2009 01:28:01 +0200 Subject: Empty matrix Message-ID: <82e1feb80908211628t2d2b474bl782f40dbf953861@mail.gmail.com> Dear Jordi, I obtained also a similar message from Octave. You find attached two codes: one for the function and the other calling this function. Note that matrix_exp designates a matrix of explanatory variables. Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090822/12901e6c/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: matrix_exp.m Type: application/octet-stream Size: 1030 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090822/12901e6c/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: essai.m Type: application/octet-stream Size: 543 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090822/12901e6c/attachment-0001.obj From jthoo at yccd.edu Fri Aug 21 23:46:10 2009 From: jthoo at yccd.edu (John B. Thoo) Date: Fri, 21 Aug 2009 21:46:10 -0700 Subject: Print plot error In-Reply-To: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> Message-ID: <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> On Aug 20, 2009, at 1:45 PM, John B. Thoo wrote: > Hi. I was using the script (see below) to print a sequence of plots > as .png files so that I may create a movie using QuickTime Pro. > Everything was going well until about half the plots had been > printed, and I got the following error: > > octave-3.2.0:36> makemovie > /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: fork: > Resource temporarily unavailable > /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 67: / > bin/gnuplot-4.2.5: No such file or directory > ^C > > octave-3.2.0:36> > > > What does this indicate? > > A second question: It takes a while to draw each plot (x11) before it > is printed. Is there a way to suppress the drawing, and only print > the .png files from the data? > > > %% BEGIN SCRIPT > %% script name: makemovie.m > > clf > > filename = "muNegOne_ord7tf1"; > > > wait = max (1/(tf - t0 + 1), 0.05); % pause time between frames > > lT = length (T) - 1; % T = total number of plots saved in data file > N = 150; % number of time intervals (frames) to plot (must have N > <= lT) > > if (N > lT) > error ('N > lT; need N <= lT'); > end > > time = ones (1, N); > time(2:N+1) = floor ((lT/N)*(1:N)) + 1; > > for j = 1:N+1 % for "ode45" > plot (x, u(:,time(j))); > title (strcat ('time =', num2str ((tf-t0)*(time(j) - 1)/lT))); > axis ([0 2*pi -1.5 1.5]); > % axis([0 2*pi 2*min(real(u0)) 2*max(real(u0))]); > print (sprintf ("./MakeMovie/%s%d.png", filename, j), "-dpng"); > pause(wait); > end > > %% END SCRIPT > > (Any suggestions to clean up my script would also be appreciated.) > > I am using Octave 3.2.0 and gnuplot 4.2 patchlevel 5 on Mac OS X > 10.4.11. Both Octave.app and Gnuplot.app were installed from Thomas > Treichl's .dmg disc image into my Applications folder. > > Thanks. > > ---John. Hi, again. Just an update. I upgraded to Octave 3.2.2, but still get that error. My workaround had been to 1) open Octave, 2) load the data file (which takes several minutes), 3) print about 50 plots, 4) quit Octave, 5) repeat until all the desired plots in the sequence have been printed. A bit tedious, but it works. ---John. From highegg at gmail.com Sat Aug 22 00:41:16 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Sat, 22 Aug 2009 07:41:16 +0200 Subject: Principle components analysis on a large dataset In-Reply-To: <25072517.post@talk.nabble.com> References: <25072517.post@talk.nabble.com> Message-ID: <69d8d540908212241v498fcd9dq2fd3b0c9a166b302@mail.gmail.com> On Fri, Aug 21, 2009 at 2:46 AM, misha680 wrote: > > Dear Sirs: > > Please pardon me I am very new to Octave. I have been using MATLAB. > > I was wondering if Octave would allow me to do principal components analysis > on a very large > dataset. > > Specifically, our dataset has 68800 variables and around 6000 observations. > Matlab gives "out of memory" errors. I have tried also doing princomp in > pieces, but this does not seem to quite work for our approach. > A real matrix of size 6000x68800 takes 3.3GB of memory (half in single prec). To get the SVD of the full matrix via LAPACK, you need at least twice as many +some workspace, so unless you have 8GB of memory, forget it. One option, if you're only interested in a few principal components, is to use eigs with an implicit matrix - you need to have Octave linked with ARPACK for that. Another possibility is to first perform an out-of-core orthogonalization on the matrix, say, by doing QR factorization on 100x68800 block and using modified gram-schmidt to complete the process. Then SVD the triangular factor - SVD of 6000x6000 matrix would still take some time, but is certainly doable even on a typical PC. Finally, pick the principal components and transform back to the original basis. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From soren at hauberg.org Sat Aug 22 01:54:40 2009 From: soren at hauberg.org (=?ISO-8859-1?Q?S=F8ren?= Hauberg) Date: Sat, 22 Aug 2009 08:54:40 +0200 Subject: Principle components analysis on a large dataset In-Reply-To: <69d8d540908212241v498fcd9dq2fd3b0c9a166b302@mail.gmail.com> References: <25072517.post@talk.nabble.com> <69d8d540908212241v498fcd9dq2fd3b0c9a166b302@mail.gmail.com> Message-ID: <1250924080.4421.1.camel@sh-t400> l?r, 22 08 2009 kl. 07:41 +0200, skrev Jaroslav Hajek: > One option, if you're only interested in a few principal components, > is to use eigs with an implicit matrix - you need to have Octave > linked with ARPACK for that. This is the approach I'd go for. Another option is to use iterative implementations of PCA. Pretty good EM-style methods are out there. I don't have code to share though :-( S?ren From bpabbott at mac.com Sat Aug 22 11:19:56 2009 From: bpabbott at mac.com (Ben Abbott) Date: Sat, 22 Aug 2009 12:19:56 -0400 Subject: Print plot error In-Reply-To: <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> Message-ID: On Aug 22, 2009, at 12:46 AM, John B. Thoo wrote: > > On Aug 20, 2009, at 1:45 PM, John B. Thoo wrote: > >> Hi. I was using the script (see below) to print a sequence of plots >> as .png files so that I may create a movie using QuickTime Pro. >> Everything was going well until about half the plots had been >> printed, and I got the following error: >> >> octave-3.2.0:36> makemovie >> /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: fork: >> Resource temporarily unavailable >> /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 67: / >> bin/gnuplot-4.2.5: No such file or directory >> ^C >> >> octave-3.2.0:36> >> >> >> What does this indicate? >> >> A second question: It takes a while to draw each plot (x11) before it >> is printed. Is there a way to suppress the drawing, and only print >> the .png files from the data? >> >> >> %% BEGIN SCRIPT >> %% script name: makemovie.m >> >> clf >> >> filename = "muNegOne_ord7tf1"; >> >> >> wait = max (1/(tf - t0 + 1), 0.05); % pause time between frames >> >> lT = length (T) - 1; % T = total number of plots saved in data file >> N = 150; % number of time intervals (frames) to plot (must have N >> <= lT) >> >> if (N > lT) >> error ('N > lT; need N <= lT'); >> end >> >> time = ones (1, N); >> time(2:N+1) = floor ((lT/N)*(1:N)) + 1; >> >> for j = 1:N+1 % for "ode45" >> plot (x, u(:,time(j))); >> title (strcat ('time =', num2str ((tf-t0)*(time(j) - 1)/lT))); >> axis ([0 2*pi -1.5 1.5]); >> % axis([0 2*pi 2*min(real(u0)) 2*max(real(u0))]); >> print (sprintf ("./MakeMovie/%s%d.png", filename, j), "-dpng"); >> pause(wait); >> end >> >> %% END SCRIPT >> >> (Any suggestions to clean up my script would also be appreciated.) >> >> I am using Octave 3.2.0 and gnuplot 4.2 patchlevel 5 on Mac OS X >> 10.4.11. Both Octave.app and Gnuplot.app were installed from Thomas >> Treichl's .dmg disc image into my Applications folder. >> >> Thanks. >> >> ---John. > > Hi, again. Just an update. I upgraded to Octave 3.2.2, but still > get that error. > > My workaround had been to 1) open Octave, 2) load the data file > (which takes several minutes), 3) print about 50 plots, 4) quit > Octave, 5) repeat until all the desired plots in the sequence have > been printed. A bit tedious, but it works. > > ---John. To suppress x11 plotting, start you script with ... figure (1, "visible", "off") Each figure opens a specific instance of gnuplot. If the figure is not visible, then there will be no gnuplot opened. Each time you print, a new pipe to a specific instance of gnuplot will be opened. I'm not sure what is happening, but it may be that your running so many instances of gnuplot that your Mac has run our of RAM. You can try running "Activity Monitor" and selecting the "System Memory" tab. When you run your script does the memory fill up? Ben From dasergatskov at gmail.com Sat Aug 22 12:50:48 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 22 Aug 2009 12:50:48 -0500 Subject: vrml-1.0.10.tar.gz and octave-3.2.2 Message-ID: <892b16670908221050r5fefb9j14df4144320b53ca@mail.gmail.com> To build vrm-1.0.10 I had to make the following change in vrml-1.0.10/vrml_DirectionalLight.m: diff -u vrml_DirectionalLight.m.orig vrml_DirectionalLight.m --- vrml_DirectionalLight.m.orig 2009-08-22 12:45:08.000000000 -0500 +++ vrml_DirectionalLight.m 2009-08-22 12:39:18.000000000 -0500 @@ -42,8 +42,8 @@ end body = [body,\ - sprintf (" %-20s %s\n",key, - sprintf (getfield (tpl,key), val))]; + sprintf(" %-20s %s\n",key, + sprintf(getfield (tpl,key), val))]; end end s = sprintf ("DirectionalLight { \n%s}\n", body); I.e. remove blanks between "sprinf" and its open paranthesis. I guess this is due to some change in octave parser. Perhaps there should be a more elegant fix. Sincerely, Dmitri. -- From bpabbott at mac.com Sat Aug 22 13:34:29 2009 From: bpabbott at mac.com (Ben Abbott) Date: Sat, 22 Aug 2009 14:34:29 -0400 Subject: Print plot error In-Reply-To: References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> Message-ID: <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> On Aug 22, 2009, at 12:19 PM, Ben Abbott wrote: > On Aug 22, 2009, at 12:46 AM, John B. Thoo wrote: > >> On Aug 20, 2009, at 1:45 PM, John B. Thoo wrote: >> >>> Hi. I was using the script (see below) to print a sequence of plots >>> as .png files so that I may create a movie using QuickTime Pro. >>> Everything was going well until about half the plots had been >>> printed, and I got the following error: >>> >>> octave-3.2.0:36> makemovie >>> /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: fork: >>> Resource temporarily unavailable >>> /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 67: / >>> bin/gnuplot-4.2.5: No such file or directory >>> ^C >>> >>> octave-3.2.0:36> >>> >>> >>> What does this indicate? >>> >>> A second question: It takes a while to draw each plot (x11) before >>> it >>> is printed. Is there a way to suppress the drawing, and only print >>> the .png files from the data? >>> >>> >>> %% BEGIN SCRIPT >>> %% script name: makemovie.m >>> >>> clf >>> >>> filename = "muNegOne_ord7tf1"; >>> >>> >>> wait = max (1/(tf - t0 + 1), 0.05); % pause time between frames >>> >>> lT = length (T) - 1; % T = total number of plots saved in data >>> file >>> N = 150; % number of time intervals (frames) to plot (must have N >>> <= lT) >>> >>> if (N > lT) >>> error ('N > lT; need N <= lT'); >>> end >>> >>> time = ones (1, N); >>> time(2:N+1) = floor ((lT/N)*(1:N)) + 1; >>> >>> for j = 1:N+1 % for "ode45" >>> plot (x, u(:,time(j))); >>> title (strcat ('time =', num2str ((tf-t0)*(time(j) - 1)/lT))); >>> axis ([0 2*pi -1.5 1.5]); >>> % axis([0 2*pi 2*min(real(u0)) 2*max(real(u0))]); >>> print (sprintf ("./MakeMovie/%s%d.png", filename, j), "-dpng"); >>> pause(wait); >>> end >>> >>> %% END SCRIPT >>> >>> (Any suggestions to clean up my script would also be appreciated.) >>> >>> I am using Octave 3.2.0 and gnuplot 4.2 patchlevel 5 on Mac OS X >>> 10.4.11. Both Octave.app and Gnuplot.app were installed from Thomas >>> Treichl's .dmg disc image into my Applications folder. >>> >>> Thanks. >>> >>> ---John. >> >> Hi, again. Just an update. I upgraded to Octave 3.2.2, but still >> get that error. >> >> My workaround had been to 1) open Octave, 2) load the data file >> (which takes several minutes), 3) print about 50 plots, 4) quit >> Octave, 5) repeat until all the desired plots in the sequence have >> been printed. A bit tedious, but it works. >> >> ---John. > > To suppress x11 plotting, start you script with ... > > figure (1, "visible", "off") > > Each figure opens a specific instance of gnuplot. If the figure is not > visible, then there will be no gnuplot opened. Each time you print, a > new pipe to a specific instance of gnuplot will be opened. > > I'm not sure what is happening, but it may be that your running so > many instances of gnuplot that your Mac has run our of RAM. > > You can try running "Activity Monitor" and selecting the "System > Memory" tab. When you run your script does the memory fill up? > > Ben Never mind the advice. I've just run the code below ... more off filename = "myRandomFrames"; for n = 1:1000 imagesc (rand (8)) axis image fprintf ("Printing frame %d\n", n); print (filename, "-dpng"); endfor I get the same error you reported. sh: fork: Resource temporarily unavailable /sw/bin/gnuplot: fork: Resource temporarily unavailable warning: broken pipe -- some output may be lost If I close all figures and try again ... sh: fork: Resource temporarily unavailable error: value on right hand side of assignment is undefined error: called from: error: /Users/bpabbott/Development/Octave_Toolbox/print/test_movie.m at line 10, column 12 /sw/bin/gnuplot: fork: Resource temporarily unavailable warning: broken pipe -- some output may be lost warning: broken pipe -- some output may be lost warning: broken pipe -- some output may be lost warning: broken pipe -- some output may be lost warning: broken pipe -- some output may be lost warning: broken pipe -- some output may be lost warning: broken pipe -- some output may be lost For me there are never more than 3 instanced of gnuplot acitve. The error is from the shell. Unfortunately, I have no idea how to determine where the problem lies. Ben From dasergatskov at gmail.com Sat Aug 22 13:45:56 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 22 Aug 2009 13:45:56 -0500 Subject: Print plot error In-Reply-To: <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> Message-ID: <892b16670908221145m2896683dl23c9c7f46c6c24ed@mail.gmail.com> On Sat, Aug 22, 2009 at 1:34 PM, Ben Abbott wrote: > sh: fork: Resource temporarily unavailable > /sw/bin/gnuplot: fork: Resource temporarily unavailable > Do you get the same error if you do "ulimits -u" (this is shell command) prior to running octave? In any case what is your "ulimit -a" output? Dmitri. -- From dasergatskov at gmail.com Sat Aug 22 14:16:52 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 22 Aug 2009 14:16:52 -0500 Subject: Print plot error In-Reply-To: <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> Message-ID: <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> On Sat, Aug 22, 2009 at 1:34 PM, Ben Abbott wrote: > > Never mind the advice. I've just run the code below ... > > more off > filename = "myRandomFrames"; > for n = 1:1000 > ? imagesc (rand (8)) > ? axis image > ? fprintf ("Printing frame %d\n", n); > ? print ?(filename, "-dpng"); > endfor > > I get the same error you reported. > > sh: fork: Resource temporarily unavailable > /sw/bin/gnuplot: fork: Resource temporarily unavailable > warning: broken pipe -- some output may be lost > On my linux this gets killed by ulimit set on number of proceses (it is set to 1024 and I have quite a few things running). For some reason, octave leaves a lot of gnuplot proceses. E.g. after running this loop for 100 times (it finishes without error) I still get: ps axu | grep gnuplot | wc -l 103 dima 16076 0.1 0.5 239608 11280 pts/5 S+ 14:09 0:00 /usr/local/bin/gnuplot dima 16077 0.4 0.1 136048 2548 pts/5 S+ 14:09 0:01 gnuplot_x11 dima 16080 0.0 0.0 0 0 pts/5 Z+ 14:09 0:00 [gnuplot] .... dima 16501 0.1 0.0 0 0 pts/5 Z+ 14:09 0:00 [gnuplot] dima 16513 0.0 0.0 89008 792 pts/2 S+ 14:13 0:00 grep gnuplot So there is 100 gnuplots. They do go away when I quit octave. I am not sure if this is an OS issue, or octave's ... Sincerely, Dmitri. -- From dasergatskov at gmail.com Sat Aug 22 14:36:18 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 22 Aug 2009 14:36:18 -0500 Subject: Print plot error In-Reply-To: <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> Message-ID: <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> > I am not sure if this is an OS issue, or octave's ... > Now it looks to me that this is octave problem -- in particular the way it calls gnuplot in print(). I.e. if you simplify your loot to more off filename = "myRandomFrames"; plot (rand (8)) for n = 1:1000 fprintf ("Printing frame %d\n", n); print (filename, "-dpng"); sleep(1.0) endfor You still get the same problem. Yet if you do more off filename = "myRandomFrames"; for n = 1:1000 plot (rand (8)) fprintf ("Printing frame %d\n", n); # print (filename, "-dpng"); sleep(1.0) endfor Than it runs fine (no defunct gnuplots) Dmitri. -- From bpabbott at mac.com Sat Aug 22 15:56:08 2009 From: bpabbott at mac.com (Ben Abbott) Date: Sat, 22 Aug 2009 16:56:08 -0400 Subject: Print plot error In-Reply-To: <892b16670908221145m2896683dl23c9c7f46c6c24ed@mail.gmail.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221145m2896683dl23c9c7f46c6c24ed@mail.gmail.com> Message-ID: <2C6C89E9-96EE-4CA5-A0BF-106DDB818029@mac.com> On Aug 22, 2009, at 2:45 PM, Dmitri A. Sergatskov wrote: > On Sat, Aug 22, 2009 at 1:34 PM, Ben Abbott wrote: > >> sh: fork: Resource temporarily unavailable >> /sw/bin/gnuplot: fork: Resource temporarily unavailable >> > > Do you get the same error if you do "ulimits -u" (this is shell > command) > prior to running octave? > > In any case what is your "ulimit -a" output? > > Dmitri. This is what I get ... $ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) 6144 file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 256 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 266 virtual memory (kbytes, -v) unlimited Ben From dasergatskov at gmail.com Sat Aug 22 16:16:54 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 22 Aug 2009 16:16:54 -0500 Subject: Print plot error In-Reply-To: <2C6C89E9-96EE-4CA5-A0BF-106DDB818029@mac.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221145m2896683dl23c9c7f46c6c24ed@mail.gmail.com> <2C6C89E9-96EE-4CA5-A0BF-106DDB818029@mac.com> Message-ID: <892b16670908221416h19951073jd1bb7b57b7b364ff@mail.gmail.com> On Sat, Aug 22, 2009 at 3:56 PM, Ben Abbott wrote: > > This is what I get ... > > $ ulimit -a > core file size ? ? ? ? ?(blocks, -c) 0 > data seg size ? ? ? ? ? (kbytes, -d) 6144 > file size ? ? ? ? ? ? ? (blocks, -f) unlimited > max locked memory ? ? ? (kbytes, -l) unlimited > max memory size ? ? ? ? (kbytes, -m) unlimited > open files ? ? ? ? ? ? ? ? ? ? ?(-n) 256 > pipe size ? ? ? ? ? ?(512 bytes, -p) 1 > stack size ? ? ? ? ? ? ?(kbytes, -s) 8192 > cpu time ? ? ? ? ? ? ? (seconds, -t) unlimited > max user processes ? ? ? ? ? ? ?(-u) 266 On linux (at least on _my_ computer) this one set to 1024 by default. If I set "ulimit -u 266" the loop crashes at about 170th frame. > virtual memory ? ? ? ? ?(kbytes, -v) unlimited > > Ben > Dmitri. -- From bpabbott at mac.com Sat Aug 22 16:32:22 2009 From: bpabbott at mac.com (Ben Abbott) Date: Sat, 22 Aug 2009 17:32:22 -0400 Subject: Print plot error In-Reply-To: <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> Message-ID: <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> On Aug 22, 2009, at 3:36 PM, Dmitri A. Sergatskov wrote: >> I am not sure if this is an OS issue, or octave's ... >> > > Now it looks to me that this is octave problem -- in particular the > way it calls > gnuplot in print(). I.e. if you simplify your loot to > > more off > filename = "myRandomFrames"; > plot (rand (8)) > for n = 1:1000 > fprintf ("Printing frame %d\n", n); > print (filename, "-dpng"); > sleep(1.0) > endfor > > You still get the same problem. Yet if you do > > more off > filename = "myRandomFrames"; > > for n = 1:1000 > plot (rand (8)) > fprintf ("Printing frame %d\n", n); > # print (filename, "-dpng"); > sleep(1.0) > endfor > > Than it runs fine (no defunct gnuplots) > > Dmitri. I'm not sure I see the same thing ... plot(1:10) for n = 1:25 > print -dpdf test.pdf > system ('ps axu | grep gnuplot | wc -l'); > end 6 5 6 6 6 6 5 6 6 5 6 5 6 6 6 6 6 5 6 6 6 5 6 6 6 octave:24> system ('ps axu | grep gnuplot' ) bpabbott 43818 0.0 0.1 88996 4048 s006 S+ 5:23PM 0:01.37 /sw/bin/gnuplotx bpabbott 43817 0.0 0.0 600252 756 s006 S+ 5:23PM 0:00.00 /bin/sh /sw/bin/gnuplot bpabbott 44432 0.0 0.0 599820 468 s006 S+ 5:29PM 0:00.00 grep gnuplot bpabbott 44430 0.0 0.0 600252 712 s006 S+ 5:29PM 0:00.01 sh -c ps axu | grep gnuplot bpabbott 43821 0.0 0.1 82732 2696 s006 S+ 5:23PM 0:00.29 gnuplot_x11 octave:25> close all octave:26> system ('ps axu | grep gnuplot' ) bpabbott 44445 0.0 0.0 599780 464 s006 R+ 5:30PM 0:00.00 grep gnuplot bpabbott 44443 0.0 0.0 600252 712 s006 S+ 5:30PM 0:00.01 sh -c ps axu | grep gnuplot Do your 'defunct' gnuplots remain open until octave exists? Ben From dasergatskov at gmail.com Sat Aug 22 17:29:49 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 22 Aug 2009 17:29:49 -0500 Subject: Print plot error In-Reply-To: <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> Message-ID: <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> On Sat, Aug 22, 2009 at 4:32 PM, Ben Abbott wrote: > > I'm not sure I see the same thing ... > > ?plot(1:10) > ?for n = 1:25 >> print -dpdf test.pdf >> system ('ps axu | grep gnuplot | wc -l'); >> end > 6 > 5 > 6 > 6 > 6 I think ps tranketes long output lines. Try system ('ps axwww | grep gnuplot | wc -l'); instead. Sincerely, Dmitri. -- From highegg at gmail.com Sat Aug 22 22:53:18 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Sun, 23 Aug 2009 05:53:18 +0200 Subject: Empty matrix In-Reply-To: <82e1feb80908211628t2d2b474bl782f40dbf953861@mail.gmail.com> References: <82e1feb80908211628t2d2b474bl782f40dbf953861@mail.gmail.com> Message-ID: <69d8d540908222053m3961f614s81bcc00638c541@mail.gmail.com> On Sat, Aug 22, 2009 at 1:28 AM, george brida wrote: > Dear Jordi, > I obtained also a similar message from Octave. You find attached two codes: > one for the function and the other calling this function. Note that > matrix_exp designates a matrix of explanatory variables. > Thank you > In essai.m, you're missing the declaration global T m hth -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From rob at utk.edu Sun Aug 23 12:40:17 2009 From: rob at utk.edu (Rob Mahurin) Date: Sun, 23 Aug 2009 13:40:17 -0400 Subject: Print plot error In-Reply-To: <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> Message-ID: <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> On Aug 22, 2009, at 6:29 PM, Dmitri A. Sergatskov wrote: > On Sat, Aug 22, 2009 at 4:32 PM, Ben Abbott wrote: >> I'm not sure I see the same thing ... >> >> plot(1:10) >> for n = 1:25 >>> print -dpdf test.pdf >>> system ('ps axu | grep gnuplot | wc -l'); >>> end >> 6 >> 5 >> 6 >> 6 >> 6 > > > I think ps tranketes long output lines. > Try > > system ('ps axwww | grep gnuplot | wc -l'); I can confirm this on both Linux and OS X 10.4. Every Octave command like octave> print /tmp/out.pdf adds one more defunct process to shell$ ps x -o pid,ppid,stat,command | awk '$3 ~ /Z/ {print}' I think the solution is an occasional waitpid(-1,0,WNOHANG), but I'm not sure where in the code this goes. Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu From bpabbott at mac.com Sun Aug 23 15:07:16 2009 From: bpabbott at mac.com (Ben Abbott) Date: Sun, 23 Aug 2009 16:07:16 -0400 Subject: Print plot error In-Reply-To: <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> Message-ID: <554B66E2-111D-4F89-A295-835D67C728EE@mac.com> On Aug 23, 2009, at 1:40 PM, Rob Mahurin wrote: > On Aug 22, 2009, at 6:29 PM, Dmitri A. Sergatskov wrote: >> On Sat, Aug 22, 2009 at 4:32 PM, Ben Abbott wrote: >>> I'm not sure I see the same thing ... >>> >>> plot(1:10) >>> for n = 1:25 >>>> print -dpdf test.pdf >>>> system ('ps axu | grep gnuplot | wc -l'); >>>> end >>> 6 >>> 5 >>> 6 >>> 6 >>> 6 >> >> >> I think ps tranketes long output lines. >> Try >> >> system ('ps axwww | grep gnuplot | wc -l'); > > I can confirm this on both Linux and OS X 10.4. Every Octave > command like > > octave> print /tmp/out.pdf > > adds one more defunct process to > > shell$ ps x -o pid,ppid,stat,command | > awk '$3 ~ /Z/ {print}' > > I think the solution is an occasional waitpid(-1,0,WNOHANG), but I'm > not sure where in the code this goes. > > Rob I'm running Mac OSX 10.5.8, and when I try ... contour (peaks) print test.pdf contour (peaks) print test.pdf contour (peaks) print test.pdf contour (peaks) print test.pdf ... ... and try Rob's command after each print, I see $ ps x -o pid,ppid,stat,command | awk '$3 ~ /Z/ {print}' 1660 1657 Z+ (gnuplot_x11) 1661 1657 Z+ (gnuplot_x11) 1890 1437 Z+ (sh) $ ps x -o pid,ppid,stat,command | awk '$3 ~ /Z/ {print}' 1969 57 Z (SFLSharedPrefsTo) 1660 1657 Z+ (gnuplot_x11) 1661 1657 Z+ (gnuplot_x11) 1890 1437 Z+ (sh) 1967 1437 Z+ (sh) $ ps x -o pid,ppid,stat,command | awk '$3 ~ /Z/ {print}' 1660 1657 Z+ (gnuplot_x11) 1661 1657 Z+ (gnuplot_x11) 1890 1437 Z+ (sh) 1967 1437 Z+ (sh) 1974 1437 Z+ (sh) $ ps x -o pid,ppid,stat,command | awk '$3 ~ /Z/ {print}' 1660 1657 Z+ (gnuplot_x11) 1661 1657 Z+ (gnuplot_x11) 1890 1437 Z+ (sh) 1967 1437 Z+ (sh) 1974 1437 Z+ (sh) 1980 1437 Z+ (sh) $ ps x -o pid,ppid,stat,command | awk '$3 ~ /Z/ {print}' 1660 1657 Z+ (gnuplot_x11) 1661 1657 Z+ (gnuplot_x11) 1890 1437 Z+ (sh) 1967 1437 Z+ (sh) 1974 1437 Z+ (sh) 1980 1437 Z+ (sh) 1987 1437 Z+ (sh) $ ps x -o pid,ppid,stat,command | awk '$3 ~ /Z/ {print}' 1660 1657 Z+ (gnuplot_x11) 1661 1657 Z+ (gnuplot_x11) 1890 1437 Z+ (sh) 1967 1437 Z+ (sh) 1974 1437 Z+ (sh) 1980 1437 Z+ (sh) 1987 1437 Z+ (sh) 1994 1437 Z+ (sh) The growing list of shells each have octave as their parent. $ ps x -o pid,ppid,stat,command 1437 1436 S+ /Users/bpabbott/Development/mercurial/octave-3.2/src/ octave --no-init-path --path= 1656 1437 S+ /bin/sh /sw/bin/gnuplot 1657 1656 S+ /sw/bin/gnuplotx 1660 1657 Z+ (gnuplot_x11) 1661 1657 Z+ (gnuplot_x11) 1883 1657 S+ gnuplot_x11 1890 1437 Z+ (sh) 1967 1437 Z+ (sh) 1974 1437 Z+ (sh) 1980 1437 Z+ (sh) 1987 1437 Z+ (sh) 1994 1437 Z+ (sh) So Mac OSX 10.5.8 does have the same problem. It appears that when a bidirectional pipe is opened (via popen2()), pclose() is not doing all that is needed to close the pipes. Ben From soren at hauberg.org Sun Aug 23 03:20:03 2009 From: soren at hauberg.org (=?ISO-8859-1?Q?S=F8ren?= Hauberg) Date: Sun, 23 Aug 2009 10:20:03 +0200 Subject: [OctDev] vrml-1.0.10.tar.gz and octave-3.2.2 In-Reply-To: <892b16670908221050r5fefb9j14df4144320b53ca@mail.gmail.com> References: <892b16670908221050r5fefb9j14df4144320b53ca@mail.gmail.com> Message-ID: <1251015603.3799.3.camel@sh-t400> l?r, 22 08 2009 kl. 12:50 -0500, skrev Dmitri A. Sergatskov: > To build vrm-1.0.10 I had to make the following change in > vrml-1.0.10/vrml_DirectionalLight.m: This is already fixed in SVN. Thanks S?ren From nasreddinhodja1208 at gmail.com Sun Aug 23 16:19:52 2009 From: nasreddinhodja1208 at gmail.com (Nasreddin Hodja) Date: Sun, 23 Aug 2009 14:19:52 -0700 Subject: Your message to Help-octave awaits moderator approval In-Reply-To: References: Message-ID: Hello, I still do not see my post on the list. Honestly, I'm a little disappointed with all the security checks and re-checks for helping out in a technical problem for which you are clearly the authority. Are there other email lists that I can ask for help about this? Thanks, --tolga On Sun, Aug 23, 2009 at 1:17 PM, wrote: > Your mail to 'Help-octave' with the subject > > can not get octave to plot > > Is being held until the list moderator can review it for approval. > > The reason it is being held: > > Post by non-member to a members-only list > > Either the message will get posted to the list, or you will receive > notification of the moderator's decision. If you would like to cancel > this posting, please visit the following URL: > > > https://www-old.cae.wisc.edu/mailman/confirm/help-octave/0fd16a6d0055747106acd77e140d985eed7b5592 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090823/f1872a2c/attachment.html From dbateman at dbateman.org Sun Aug 23 16:36:30 2009 From: dbateman at dbateman.org (David Bateman) Date: Sun, 23 Aug 2009 23:36:30 +0200 Subject: Your message to Help-octave awaits moderator approval In-Reply-To: References: Message-ID: <4A91B65E.5060404@dbateman.org> Nasreddin Hodja wrote: > Hello, > > I still do not see my post on the list. Honestly, I'm a little > disappointed with all the security checks and re-checks for helping > out in a technical problem for which you are clearly the authority. > > Are there other email lists that I can ask for help about this? > > Thanks, > --tolga > Or join the list at https://www-old.cae.wisc.edu/mailman/listinfo/help-octave and avoid the moderation that is there to prevent spam.. Lots of lists just backhole posts from non members D. -- David Bateman dbateman at dbateman.org 35 rue Gambetta +33 1 46 04 02 18 (Home) 92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob) From bpabbott at mac.com Sun Aug 23 16:35:50 2009 From: bpabbott at mac.com (Ben Abbott) Date: Sun, 23 Aug 2009 17:35:50 -0400 Subject: can not get octave to plot In-Reply-To: References: Message-ID: <32EDF371-4714-448F-AAB0-C994A21FE220@mac.com> On Aug 23, 2009, at 5:19 PM, Nasreddin Hodja wrote: > Hello, > > I still do not see my post on the list. Honestly, I'm a little > disappointed with all the security checks and re-checks for helping > out in a technical problem for which you are clearly the authority. > > Are there other email lists that I can ask for help about this? > > Thanks, > --tolga > > On Sun, Aug 23, 2009 at 1:17 PM, > wrote: > Your mail to 'Help-octave' with the subject > > can not get octave to plot > > Is being held until the list moderator can review it for approval. > > The reason it is being held: > > Post by non-member to a members-only list > > Either the message will get posted to the list, or you will receive > notification of the moderator's decision. If you would like to cancel > this posting, please visit the following URL: > > https://www-old.cae.wisc.edu/mailman/confirm/help-octave/0fd16a6d0055747106acd77e140d985eed7b5592 If you register yourself, your post will go right through! ... as this post appears to have arrived without problem, perhaps you've already done that? If not, you can register at the link below. https://www-old.cae.wisc.edu/mailman/listinfo/help-octave Once you're registered, your original post will continue to wait for moderator approval. Rather than wait for that ... Given the subject line of your post, some information that would be useful (and may be in your original request, but I don't have access to it) is (1) What OS are your running? (2) What version of Octave are you running? (2) Where did you get Octave? Ben From nasreddinhodja1208 at gmail.com Sun Aug 23 16:51:07 2009 From: nasreddinhodja1208 at gmail.com (Nasreddin Hodja) Date: Sun, 23 Aug 2009 14:51:07 -0700 Subject: Fwd: can not get octave to plot - posting again Message-ID: I hope this one goes through... Thanks in advance, --tolga ---------- Forwarded message ---------- From: Nasreddin Hodja Date: Sat, Aug 22, 2009 at 10:16 PM Subject: can not get octave to plot To: help-octave at octave.org Hello all, My OS: Mac OSX 10.5.6 My Octave version: 3.2.2 My GnuPlot version: 4.2.5 I installed both GnuPlot and Octave. Also installed control toolbox for octave, which works fine... But *when I try to use the ?plot? function in Octave I get the following error pasted below:** * FYI: I run X11 beforehand and I already set the DISPLAY to 0.0 in my .zshrc. The gnuterm is set to aqua (no idea what that is but it should be ok, as I followed many threads on this - though i don't think it changes anything when I set it to x11) ERROR is: octave-3.2.2:1> plot(1:10) error: __gnuplot_get_var__: Can not make fifo (No such file or directory) error: called from: error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__gnuplot_get_var__.m at line 69, column 7 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_axes__.m at line 39, column 18 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_figure__.m at line 93, column 3 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/gnuplot_drawnow.m at line 88, column 5 Could you offer any help? Thanks, --tolga -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090823/66820e95/attachment.html From bpabbott at mac.com Sun Aug 23 17:06:08 2009 From: bpabbott at mac.com (Ben Abbott) Date: Sun, 23 Aug 2009 18:06:08 -0400 Subject: can not get octave to plot - posting again In-Reply-To: References: Message-ID: <0839F059-48F9-4940-B5B7-5D940E40C50C@mac.com> On Aug 23, 2009, at 5:51 PM, Nasreddin Hodja wrote: > I hope this one goes through... > > Thanks in advance, > --tolga > > > ---------- Forwarded message ---------- > From: Nasreddin Hodja > Date: Sat, Aug 22, 2009 at 10:16 PM > Subject: can not get octave to plot > To: help-octave at octave.org > > > Hello all, > > My OS: Mac OSX 10.5.6 > My Octave version: 3.2.2 > My GnuPlot version: 4.2.5 > > I installed both GnuPlot and Octave. Also installed control toolbox > for octave, which works fine... > > But when I try to use the ?plot? function in Octave I get the > following error pasted below: > > FYI: I run X11 beforehand and I already set the DISPLAY to 0.0 in > my .zshrc. The gnuterm is set to aqua (no idea what that is but it > should be ok, as I followed many threads on this - though i don't > think it changes anything when I set it to x11) > > ERROR is: > > octave-3.2.2:1> plot(1:10) > error: __gnuplot_get_var__: Can not make fifo (No such file or > directory) > error: called from: > error: /Applications/Octave.app/Contents/Resources/share/octave/ > 3.2.2/m/plot/__gnuplot_get_var__.m at line 69, column 7 > error: /Applications/Octave.app/Contents/Resources/share/octave/ > 3.2.2/m/plot/__go_draw_axes__.m at line 39, column 18 > error: /Applications/Octave.app/Contents/Resources/share/octave/ > 3.2.2/m/plot/__go_draw_figure__.m at line 93, column 3 > error: /Applications/Octave.app/Contents/Resources/share/octave/ > 3.2.2/m/plot/gnuplot_drawnow.m at line 88, column 5 > > Could you offer any help? > > Thanks, > --tolga Did you install AquaTerm as well? If you have not install Aquaterm, please do try starting x11 and then from Octave's prompt ... setenv ("GNUTERM", "x11") plot (1:10) If you get a plot, all you should need to do is install Aquaterm or set the GNUTERM environment to "x11". Ben From tmacchant at yahoo.co.jp Sun Aug 23 21:40:30 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Mon, 24 Aug 2009 11:40:30 +0900 (JST) Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) Message-ID: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> Hello I have updated OctaveForWindows Wiki (CategoryInstall). Main News is that Benjamin has complete to build package for Octave 3.2.2 for Windows MinGW32 and it is available at the sourceforge website for the octave-forge. Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From leledumbo_cool at yahoo.co.id Sun Aug 23 22:17:16 2009 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Sun, 23 Aug 2009 20:17:16 -0700 (PDT) Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> References: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> Message-ID: <25109928.post@talk.nabble.com> Why is it still using the unofficial GCC 4.3.0? The official MinGW GCC 4.4.0 is out! -- View this message in context: http://www.nabble.com/OctaveForWindows-Wiki--%28CategoryInstall%29-is--updated-%282009-08-24%29-tp25109748p25109928.html Sent from the Octave - General mailing list archive at Nabble.com. From nasreddinhodja1208 at gmail.com Sun Aug 23 22:46:46 2009 From: nasreddinhodja1208 at gmail.com (Nasreddin Hodja) Date: Sun, 23 Aug 2009 20:46:46 -0700 Subject: Fwd: can not get octave to plot - posting again In-Reply-To: References: Message-ID: Thank you for your responses. Ben's suggestion actually makes an empty plot box pop - I did not have that before... But the plot window is blank and the error I get is still the same. *octave-3.2.2:1> setenv ("GNUTERM", "x11") octave-3.2.2:2> plot(1:10) error: __gnuplot_get_var__: Can not make fifo (No such file or directory) error: called from: error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__gnuplot_get_var__.m at line 69, column 7 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_axes__.m at line 39, column 18 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_figure__.m at line 93, column 3 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/gnuplot_drawnow.m at line 88, column 5* I tried Leo's suggestion as well...Created a .octaverc and pasted the line: *gnuplot_binary("/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot") *in it. The behavior is the same. So I assume location of gnuplot is known by octave, but not really sure... When I do not type * setenv ("GNUTERM", "x11") *I do get a pop up blank plot window but when I do, again the error is: *octave-3.2.2:1> setenv ("GNUTERM", "x11") octave-3.2.2:2> plot(1:10) error: __gnuplot_get_var__: Can not make fifo (No such file or directory) error: called from: error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__gnuplot_get_var__.m at line 69, column 7 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_axes__.m at line 39, column 18 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_figure__.m at line 93, column 3 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/gnuplot_drawnow.m at line 88, column 5 * just to check at the end:* octave-3.2.2:3> gnuplot_binary ans = /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot * Any other thoughts? Thanks, --tolga On Sun, Aug 23, 2009 at 7:13 PM, Leo Butler wrote: > > > On Sun, 23 Aug 2009, Nasreddin Hodja wrote: > > < I hope this one goes through... > < > < Thanks in advance, > < --tolga > < > < > < ---------- Forwarded message ---------- > < From: Nasreddin Hodja > < Date: Sat, Aug 22, 2009 at 10:16 PM > < Subject: can not get octave to plot > < To: help-octave at octave.org > < > < > < Hello all, > < > < My OS: Mac OSX 10.5.6 > < My Octave version: 3.2.2 > < My GnuPlot version: 4.2.5 > < > < I installed both GnuPlot and Octave. Also installed control toolbox for > < octave, which works fine... > < > < But *when I try to use the ?plot? function in Octave I get the following > < error pasted below:** > < * > < FYI: I run X11 beforehand and I already set the DISPLAY to 0.0 in my > .zshrc. > < The gnuterm is set to aqua (no idea what that is but it should be ok, as > I > < followed many threads on this - though i don't think it changes anything > < when I set it to x11) > < > < ERROR is: > < > < octave-3.2.2:1> plot(1:10) > < error: __gnuplot_get_var__: Can not make fifo (No such file or directory) > > I think this error indicates octave cannot find gnuplot. You can tell > octave the location of gnuplot by putting > > gnuplot_binary("path to gnuplot"); > > in your .octaverc file in your home directory. > > Leo > > -- > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090823/eba7446b/attachment.html From tmacchant at yahoo.co.jp Mon Aug 24 00:45:54 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Mon, 24 Aug 2009 14:45:54 +0900 (JST) Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <25109928.post@talk.nabble.com> Message-ID: <20090824054554.68518.qmail@web3811.mail.bbt.yahoo.co.jp> Hello --- leledumbo wrote: > Why is it still using the unofficial GCC 4.3.0? The official MinGW GCC 4.4.0 > is out! I do not know. I myself am a mere supporting staff of octave for windows. I myself use GCC-4.4.0 of official MinGW distribution. The make check result on GCC-4.3.0-TDM gives octave-3.2.2\src\data.cc PASS 500/509 FAIL 9 test_string.m ....................................... PASS 78/79 FAIL 1 while that on GCC-4.4.0-MinGW official gives octave-3.2.2\src\data.cc PASS 506/509 FAIL 3 test_string.m ....................................... PASS 78/79 FAIL 1 However, to my experience, the size of oct file witt it is about 50-70 kbyte larger than that by GCC-4.3.0 TDM at using shared stdc++ library. For GCC 4.4.0 in MinGW official, we can find - libstdc++_s is only partially implemented. in the gcc-4.4.0-mingw32-notes.txt. I suppose that partially implementation gives the larger oct file size by GCC 4.4.0 in MinGW official than that is built gcc 4.3.0-TDM. That is why Benjamin did not change the compiler, I think. Note that the above is mere my guess. Perhaps Benjamin LIndner, who is a maintainer of this release, might reply to your question. Anyway the only maintainer can decide which complier is to be used. If you have complaint to the matter, you can build octave from source by yourself. If you would like to do so, I can put my dependency libraries for GCC-4.4.0 (MinGW Official) to my web site. Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From tmacchant at yahoo.co.jp Mon Aug 24 01:23:21 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Mon, 24 Aug 2009 15:23:21 +0900 (JST) Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> Message-ID: <20090824062321.49735.qmail@web3805.mail.bbt.yahoo.co.jp> Hello I have forgotten to write the url of the website. http://wiki.octave.org/wiki.pl?OctaveForWindows ***************************** Hello I have updated OctaveForWindows Wiki (CategoryInstall). Main News is that Benjamin has complete to build package for Octave 3.2.2 for Windows MinGW32 and itis available at the sourceforge website for the octave-forge. ****************** Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From leledumbo_cool at yahoo.co.id Mon Aug 24 04:53:37 2009 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Mon, 24 Aug 2009 02:53:37 -0700 (PDT) Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <20090824062321.49735.qmail@web3805.mail.bbt.yahoo.co.jp> References: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> <20090824062321.49735.qmail@web3805.mail.bbt.yahoo.co.jp> Message-ID: <25113309.post@talk.nabble.com> > If you would like to do so, I can put my dependency libraries for GCC-4.4.0 (MinGW Official) to my > web site Please do, I've never succeeded in compiling Octave myself. -- View this message in context: http://www.nabble.com/OctaveForWindows-Wiki--%28CategoryInstall%29-is--updated-%282009-08-24%29-tp25109748p25113309.html Sent from the Octave - General mailing list archive at Nabble.com. From tmacchant at yahoo.co.jp Mon Aug 24 05:23:33 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Mon, 24 Aug 2009 19:23:33 +0900 (JST) Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <25113309.post@talk.nabble.com> Message-ID: <20090824102333.54455.qmail@web3811.mail.bbt.yahoo.co.jp> Hello --- leledumbo wrote: > > Please do, I've never succeeded in compiling Octave myself. OK, please give me time for the preparation. If it will be finished I will announce at this list. Regards Tatsuro -------------------------------------- Power up the Internet with Yahoo! Toolbar. http://pr.mail.yahoo.co.jp/toolbar/ From aswinroso at gmail.com Fri Aug 21 00:30:24 2009 From: aswinroso at gmail.com (aswin kumar) Date: Fri, 21 Aug 2009 11:00:24 +0530 Subject: requesting help Message-ID: <97ea8cf40908202230g5b08f27eh8bad1a387a352d23@mail.gmail.com> Sir, i am student, want to know more about octave and want materils so i kindly request you to provider necessary materials and help me. Aswin Final CSE IRTT -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090821/6b4d28de/attachment.html From wfigueroa at servexternos.gruposantander.com Tue Aug 18 10:46:44 2009 From: wfigueroa at servexternos.gruposantander.com (Figueroa Arellano Wolfgang) Date: Tue, 18 Aug 2009 17:46:44 +0200 Subject: loading .xls files Message-ID: Good evening How can I load a .xls file to octave. regards _______________________________________ Wolfgang Figueroa ******************AVISO LEGAL********************** Este mensaje es privado y confidencial y solamente para la persona a la que va dirigido. Si usted ha recibido este mensaje por error, no debe revelar, copiar, distribuir o usarlo en ningun sentido. Le rogamos lo comunique al remitente y borre dicho mensaje y cualquier documento adjunto que pudiera contener. No hay renuncia a la confidencialidad ni a ningun privilegio por causa de transmision erronea o mal funcionamiento. Cualquier opinion expresada en este mensaje pertenece unicamente al autor remitente, y no representa necesariamente la opinion de Banco Santander, a no ser que expresamente se diga y el remitente este autorizado para hacerlo. Los correos electronicos no son seguros, no garantizan la confidencialidad ni la correcta recepcion de los mismos, dado que pueden ser interceptados, manipulados, destruidos, llegar con demora, incompletos, o con virus. Banco Santander no se hace responsable de las alteraciones que pudieran hacerse al mensaje una vez enviado.Este mensaje solo tiene una finalidad de informacion, y no debe interpretarse como una oferta de venta o de compra de valores ni de instrumentos financieros relacionados. En el caso de que el destinatario de este mensaje no consintiera la utilizacion del correo electronico via Internet, rogamos lo ponga en nuestro conocimiento. **********************DISCLAIMER***************** This message is private and confidential and it is intended exclusively for the addressee. If you receive this message by mistake, you should not disseminate, distribute or copy this e-mail. Please inform the sender and delete the message and attachments from your system. No confidentiality nor any privilege regarding the information is waived or lost by any mistransmission or malfunction.Any views or opinions contained in this message are solely those of the author, and do not necessarily represent those of Banco Santander, unless otherwise specifically stated and the sender is authorised to do so.E-mail transmission cannot be guaranteed to be secure, confidential, or error-free, as information could be intercepted, corrupted, lost, destroyed, arrive late, incomplete, or contain viruses. Banco Santander does not accept responsibility for any changes in the contents of this message after it has been sent.This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. If the addressee of this message does not consent to the use of internet e-mail, please communicate it to us. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090818/ab399cda/attachment-0001.html From mk144210 at bcm.edu Thu Aug 20 17:32:46 2009 From: mk144210 at bcm.edu (misha680) Date: Thu, 20 Aug 2009 15:32:46 -0700 (PDT) Subject: Principle components analysis on a large dataset Message-ID: <25071274.post@talk.nabble.com> Dear Sirs: Please pardon me I am very new to Octave. I have been using MATLAB. I was wondering if Octave would allow me to do principal components analysis on a very large dataset. Specifically, our dataset has 68800 variables and around 6000 observations. Matlab gives "out of memory" errors. I have tried also doing princomp in pieces, but this does not seem to quite work for our approach. Anything that might help much appreciated. If anyone has had experience doing this in Octave much appreciated. Thank you Misha -- View this message in context: http://www.nabble.com/Principle-components-analysis-on-a-large-dataset-tp25071274p25071274.html Sent from the Octave - General mailing list archive at Nabble.com. From colonel.sreekar at gmail.com Fri Aug 21 08:10:41 2009 From: colonel.sreekar at gmail.com (baalkikhaal) Date: Fri, 21 Aug 2009 06:10:41 -0700 (PDT) Subject: finding peaks from noisy sampled data Message-ID: <25079498.post@talk.nabble.com> is there a way to find peaks from a noisy sampled data, for example, from a FFT spectrum of a audio file.... ll be really thankful for any help -- View this message in context: http://www.nabble.com/finding-peaks-from-noisy-sampled-data-tp25079498p25079498.html Sent from the Octave - General mailing list archive at Nabble.com. From nasreddinhodja1208 at gmail.com Sun Aug 23 00:16:03 2009 From: nasreddinhodja1208 at gmail.com (Nasreddin Hodja) Date: Sat, 22 Aug 2009 22:16:03 -0700 Subject: can not get octave to plot Message-ID: Hello all, My OS: Mac OSX 10.5.6 My Octave version: 3.2.2 My GnuPlot version: 4.2.5 I installed both GnuPlot and Octave. Also installed control toolbox for octave, which works fine... But *when I try to use the ?plot? function in Octave I get the following error pasted below:** * FYI: I run X11 beforehand and I already set the DISPLAY to 0.0 in my .zshrc. The gnuterm is set to aqua (no idea what that is but it should be ok, as I followed many threads on this - though i don't think it changes anything when I set it to x11) ERROR is: octave-3.2.2:1> plot(1:10) error: __gnuplot_get_var__: Can not make fifo (No such file or directory) error: called from: error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__gnuplot_get_var__.m at line 69, column 7 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_axes__.m at line 39, column 18 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_figure__.m at line 93, column 3 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/gnuplot_drawnow.m at line 88, column 5 Could you offer any help? Thanks, --tolga -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090822/b7680e58/attachment.html From Pascal.Dupuis at worldonline.be Mon Aug 24 08:22:29 2009 From: Pascal.Dupuis at worldonline.be (Dupuis) Date: Mon, 24 Aug 2009 06:22:29 -0700 (PDT) Subject: bimodal data distribution Message-ID: <25116016.post@talk.nabble.com> Hello, I'm trying to extract parameters of a two levels signal described as x = N(m1, s1) with probability p x = N(m2, s2) with probability (1-p) |m1-m2| >> sqrt(s1^2+s2^2) The operation is similar to MatLab 'gmdistribution', identifying the parameters of a mixture of gaussian signals. I implemented the search like this: 1) use 'statistics' to get a number of indicators; 2) [p0, obj0, info0, iter0, nf0, lambda0] = sqp(p , 'bimodal_func', [], [], lb,ub); where the vector p contains 5 members: the ratio p defined above, m1, s1, m2, s2. Those values were initialised from the indicators: m1 and m3 are the first and third quartiles, p is set to 0.5, s1 and s2 are sqrt(2) * the standard deviation. 'lb' and 'ub' provides constraints on the result: 0 <= p <= 1; 0<= s1, s2 <= standard deviation, ... The bimodal_func is included, I have a few concerns. How could I correct them ? - data are passed through a global, I didn't see how to pass a supplemental parameter through sqp call - if I used gradient and hessian, it converges quadratically ... close to the minimum, and diverges otherwise. Is is possible with sqp to only use hessian close to the minimum, in the convergence region ? A practical criterion is that all eigenvalues should be > 0 - I'm also trying to the the Fisher information matrix at the solution. The definition on wikipedia is not clear; am I right in postulating that it is equal to hessian(p0)/length(x), where p0 is the optimal point ? Regards Pascal http://www.nabble.com/file/p25116016/bimodal_func.m bimodal_func.m -- View this message in context: http://www.nabble.com/bimodal-data-distribution-tp25116016p25116016.html Sent from the Octave - General mailing list archive at Nabble.com. From macy at sfo.com Mon Aug 24 11:41:00 2009 From: macy at sfo.com (macy at sfo.com) Date: Mon, 24 Aug 2009 09:41:00 -0700 (PDT) Subject: Principle components analysis on a large dataset In-Reply-To: <25071274.post@talk.nabble.com> References: <25071274.post@talk.nabble.com> Message-ID: <1718.66.81.50.5.1251132060.squirrel@cp01.sfo.com> Same problem with 10-20MB data files, so I used this .bat file echo off echo Expand Octave Memory cd\ cd "Program Files"\"GNU Octave 2.1.50"\bin regtool -i set "/HKCU/Software/GNU Octave/Cygwin/heap_chunk_in_mb" 1024 regtool -v list "/HKCU/Software/GNU Octave/Cygwin" cd\ echo DONE may be in there is something that will help. Robert > > Dear Sirs: > > Please pardon me I am very new to Octave. I have been using MATLAB. > > I was wondering if Octave would allow me to do principal components > analysis > on a very large > dataset. > > Specifically, our dataset has 68800 variables and around 6000 > observations. > Matlab gives "out of memory" errors. I have tried also doing princomp in > pieces, but this does not seem to quite work for our approach. > > Anything that might help much appreciated. If anyone has had experience > doing this in Octave much appreciated. > > Thank you > Misha > -- > View this message in context: > http://www.nabble.com/Principle-components-analysis-on-a-large-dataset-tp25071274p25071274.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > From Thomas.Treichl at gmx.net Mon Aug 24 13:28:24 2009 From: Thomas.Treichl at gmx.net (Thomas Treichl) Date: Mon, 24 Aug 2009 20:28:24 +0200 Subject: Fwd: can not get octave to plot - posting again In-Reply-To: References: Message-ID: <4A92DBC8.2020209@gmx.net> Hi, I put some Octave commands here - can you please copy and paste them into a running Octave session and then please send back all the output of these commands: ostream = __gnuplot_open_stream__ (2, gcf ()) gpin_name = tmpnam () [err, msg] = mkfifo (gpin_name, 6*8*8) Best regards, Thomas From lindnerben at gmx.net Mon Aug 24 14:24:43 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Mon, 24 Aug 2009 21:24:43 +0200 Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <25109928.post@talk.nabble.com> References: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> <25109928.post@talk.nabble.com> Message-ID: <4A92E8FB.4040906@gmx.net> leledumbo wrote: > Why is it still using the unofficial GCC 4.3.0? The official MinGW GCC 4.4.0 > is out! I don't think I get your reasoning. Are you complaining it's using a too old version or a too 'unofficial' version? benjamin From benjamin.lindner at gmx.at Mon Aug 24 14:26:18 2009 From: benjamin.lindner at gmx.at (Benjamin Lindner) Date: Mon, 24 Aug 2009 21:26:18 +0200 Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <25113309.post@talk.nabble.com> References: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> <20090824062321.49735.qmail@web3805.mail.bbt.yahoo.co.jp> <25113309.post@talk.nabble.com> Message-ID: <4A92E95A.5000100@gmx.at> leledumbo wrote: >> If you would like to do so, I can put my dependency libraries for GCC-4.4.0 > (MinGW Official) to my >> web site > > Please do, I've never succeeded in compiling Octave myself. Well, Here's the right place to ask questions. If you want to get help you should be more specific in your statements about what doesn't work or which step causes you problems. benjamin From rishiamrit at gmail.com Mon Aug 24 15:12:03 2009 From: rishiamrit at gmail.com (Rishi Amrit) Date: Mon, 24 Aug 2009 15:12:03 -0500 Subject: Building octave with large matrices support Message-ID: Hi, I'm trying to build octave to use large matices (>2GB). I read the note on http://wiki.octave.org/wiki.pl?EnableLargeArrays I'm running 64 bit Ubuntu, with BLAS, LAPACK, ARSUITE, SUITESPARSE etc installed from repositories. Just wondering do I need to build all these again from scratch before building octave with the instructions given on the above link ? Or by just enabling 64 bit flag in configuration of octave would work ? Thanks, Rishi -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090824/fb74eb97/attachment.html From dasergatskov at gmail.com Mon Aug 24 16:17:12 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 24 Aug 2009 16:17:12 -0500 Subject: Print plot error In-Reply-To: <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> Message-ID: <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> On Sun, Aug 23, 2009 at 12:40 PM, Rob Mahurin wrote: > I think the solution is an occasional waitpid(-1,0,WNOHANG), but I'm not I just added waitpid(-1, 0) to the end of print() function (in print.m) and that seems to solve the problem. Again, I am not sure if this is the solution, but at least can be a workaround for now. Thanks for the tip. Sincerely, Dmitri. -- From rob at utk.edu Mon Aug 24 16:39:08 2009 From: rob at utk.edu (Rob Mahurin) Date: Mon, 24 Aug 2009 17:39:08 -0400 Subject: Print plot error In-Reply-To: <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> Message-ID: <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> On Aug 24, 2009, at 5:17 PM, Dmitri A. Sergatskov wrote: > On Sun, Aug 23, 2009 at 12:40 PM, Rob Mahurin wrote: >> I think the solution is an occasional waitpid(-1,0,WNOHANG), but >> I'm not > > I just added > waitpid(-1, 0) > to the end of print() function (in print.m) and that seems to solve > the problem. > > Again, I am not sure if this is the solution, but at least can be a > workaround > for now. Oh! I didn't realize waitpid was also an Octave function. You probably want waitpid(-1,WNOHANG) so that print won't freeze if there is actually no child. Attached as a patch (which is not a changeset, sorry). This would be good for 3.2.3. Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu -------------- next part -------------- A non-text attachment was scrubbed... Name: print.patch Type: application/octet-stream Size: 404 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090824/c50cc1c2/attachment.obj From dasergatskov at gmail.com Mon Aug 24 17:19:31 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 24 Aug 2009 17:19:31 -0500 Subject: Print plot error In-Reply-To: <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> Message-ID: <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> On Mon, Aug 24, 2009 at 4:39 PM, Rob Mahurin wrote: >> for now. > > Oh! ?I didn't realize waitpid was also an Octave function. > > You probably want waitpid(-1,WNOHANG) so that print won't freeze if there is > actually no child. > > Attached as a patch (which is not a changeset, sorry). ?This would be good > for 3.2.3. > > Rob > > -- > Rob Mahurin > University of Manitoba, Dept. of Physics & Astronomy > at: ? ? Oak Ridge National Laboratory ? 865 207 2594 > ? ? ? ?Oak Ridge, Tennessee ? ? ? ? ? ?rob at utk.edu > With WNOHANG I see few (one or two) defunct processes remains after loop of ~100 prints. Dmitri. -- From bpabbott at mac.com Mon Aug 24 17:53:54 2009 From: bpabbott at mac.com (Ben Abbott) Date: Mon, 24 Aug 2009 18:53:54 -0400 Subject: Print plot error In-Reply-To: <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <19F20D58-1D01-43D8-8A79-113A855E38E6@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> Message-ID: <0FC19689-B4C5-4C10-98AB-68514B52837E@mac.com> On Aug 24, 2009, at 5:39 PM, Rob Mahurin wrote: > On Aug 24, 2009, at 5:17 PM, Dmitri A. Sergatskov wrote: >> On Sun, Aug 23, 2009 at 12:40 PM, Rob Mahurin wrote: >>> I think the solution is an occasional waitpid(-1,0,WNOHANG), but >>> I'm not >> >> I just added >> waitpid(-1, 0) >> to the end of print() function (in print.m) and that seems to solve >> the problem. >> >> Again, I am not sure if this is the solution, but at least can be a >> workaround >> for now. > > Oh! I didn't realize waitpid was also an Octave function. > > You probably want waitpid(-1,WNOHANG) so that print won't freeze if > there is actually no child. > > Attached as a patch (which is not a changeset, sorry). This would > be good for 3.2.3. > > Rob Regarding the patch, shouldn't WNOHANG be in quotes like below? + ## FIXME: we shouldn't leave zombie children, but clean them up if they happen + while (waitpid(-1,"WNOHANG")) + ## do nothing + endwhile Also what about children that are not zombies? Will such produce an infinite loop? Regarding the "zombies" does waitpid() kill them or just wait until the die? Ben From rob at utk.edu Mon Aug 24 19:10:17 2009 From: rob at utk.edu (Rob Mahurin) Date: Mon, 24 Aug 2009 20:10:17 -0400 Subject: Print plot error In-Reply-To: <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> Message-ID: On Aug 24, 2009, at 6:19 PM, Dmitri A. Sergatskov wrote: > On Mon, Aug 24, 2009 at 4:39 PM, Rob Mahurin wrote: >> You probably want waitpid(-1,WNOHANG) so that print won't freeze >> if there is actually no child. >> >> Attached as a patch (which is not a changeset, sorry). This would >> be good for 3.2.3. > > With WNOHANG I see few (one or two) defunct processes remains after > loop of ~100 prints. Sorry, I wasn't clear: it's safe to do while (0 < waitpid (-1, WNOHANG) ); endwhile which cleans up any & all errant children, doing nothing if there are none. That's not quite what I did in the patch, since I misunderstood waitpid's return values. Ben Abbott asks: > Also what about children that are not zombies? Will such produce an > infinite loop? Not as written here (this one is tested). > Regarding the "zombies" does waitpid() kill them or just wait until > the die? No. A "zombie" is a process that has already called exit() but is being kept in memory so that its parent can check its exit status. There's a little information in the man page for ps, and wikipedia has a "zombie process" entry. Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu -------------- next part -------------- A non-text attachment was scrubbed... Name: print.patch Type: application/octet-stream Size: 407 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090824/548059bf/attachment.obj -------------- next part -------------- From dasergatskov at gmail.com Mon Aug 24 19:53:59 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 24 Aug 2009 19:53:59 -0500 Subject: Print plot error In-Reply-To: <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> Message-ID: <892b16670908241753r700b47b9u21e260c0e1ceb5fe@mail.gmail.com> So the problem appears to be with "drawnow" function: octave:1> plot(rand(10)) octave:2> waitpid (-1,WNOHANG) ans = 0 octave:3> drawnow ("x11", "/dev/null") octave:4> waitpid (-1,WNOHANG) ans = 2304 octave:5> waitpid (-1,WNOHANG) ans = 0 octave:6> Dmitri. -- From bpabbott at mac.com Mon Aug 24 20:14:02 2009 From: bpabbott at mac.com (Ben Abbott) Date: Mon, 24 Aug 2009 21:14:02 -0400 Subject: Print plot error In-Reply-To: References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> Message-ID: On Aug 24, 2009, at 8:10 PM, Rob Mahurin wrote: > On Aug 24, 2009, at 6:19 PM, Dmitri A. Sergatskov wrote: >> On Mon, Aug 24, 2009 at 4:39 PM, Rob Mahurin wrote: >>> You probably want waitpid(-1,WNOHANG) so that print won't freeze >>> if there is actually no child. >>> >>> Attached as a patch (which is not a changeset, sorry). This would >>> be good for 3.2.3. >> >> With WNOHANG I see few (one or two) defunct processes remains after >> loop of ~100 prints. > > Sorry, I wasn't clear: it's safe to do > while (0 < waitpid (-1, WNOHANG) ); endwhile > > which cleans up any & all errant children, doing nothing if there > are none. > > That's not quite what I did in the patch, since I misunderstood > waitpid's return values. > > Ben Abbott asks: >> Also what about children that are not zombies? Will such produce an >> infinite loop? > > Not as written here (this one is tested). > >> Regarding the "zombies" does waitpid() kill them or just wait until >> the die? > > No. A "zombie" is a process that has already called exit() but is > being kept in memory so that its parent can check its exit status. > There's a little information in the man page for ps, and wikipedia > has a "zombie process" entry. > > Rob Sorry for my lack ... but will waitpid kill non-zombie children? There is an active gnuplot for each figure window. Would wiatid terminate those children as well? Ben From dasergatskov at gmail.com Mon Aug 24 20:23:16 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 24 Aug 2009 20:23:16 -0500 Subject: Print plot error In-Reply-To: References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> Message-ID: <892b16670908241823p389b0480u86b3fc08d5dbc2f3@mail.gmail.com> On Mon, Aug 24, 2009 at 8:14 PM, Ben Abbott wrote: > > Sorry for my lack ... but will waitpid kill non-zombie children? > waitpid does not kill processes. It just reads exit codes. > Ben > Dmitri. -- From rob at utk.edu Mon Aug 24 20:26:09 2009 From: rob at utk.edu (Rob Mahurin) Date: Mon, 24 Aug 2009 21:26:09 -0400 Subject: Print plot error In-Reply-To: References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> Message-ID: <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> On Aug 24, 2009, at 9:14 PM, Ben Abbott wrote: > Sorry for my lack ... but will waitpid kill non-zombie children? > > There is an active gnuplot for each figure window. Would wiatid > terminate those children as well? No, see the man page for the wait4() and waitpid() system calls. waitpid(-1,0) will hang if there are children still running, but waitpid(-1,WNOHANG) will just return zero. If there are not children running, waitpid(-1,anything) should just return -1. Don't believe me, test it. Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu From bpabbott at mac.com Mon Aug 24 20:25:56 2009 From: bpabbott at mac.com (Ben Abbott) Date: Mon, 24 Aug 2009 21:25:56 -0400 Subject: Print plot error In-Reply-To: <892b16670908241823p389b0480u86b3fc08d5dbc2f3@mail.gmail.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <892b16670908241823p389b0480u86b3fc08d5dbc2f3@mail.gmail.com> Message-ID: On Aug 24, 2009, at 9:23 PM, Dmitri A. Sergatskov wrote: > On Mon, Aug 24, 2009 at 8:14 PM, Ben Abbott wrote: > >> >> Sorry for my lack ... but will waitpid kill non-zombie children? >> > > waitpid does not kill processes. It just reads exit codes. > >> Ben >> > > Dmitri. > -- ok, ... , sorry for being so dense. I missed understanding that when Jon mentioned it before. Ben From bpabbott at mac.com Mon Aug 24 20:32:20 2009 From: bpabbott at mac.com (Ben Abbott) Date: Mon, 24 Aug 2009 21:32:20 -0400 Subject: Print plot error In-Reply-To: <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> Message-ID: <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> On Aug 24, 2009, at 9:26 PM, Rob Mahurin wrote: > On Aug 24, 2009, at 9:14 PM, Ben Abbott wrote: >> Sorry for my lack ... but will waitpid kill non-zombie children? >> >> There is an active gnuplot for each figure window. Would wiatid >> terminate those children as well? > > No, see the man page for the wait4() and waitpid() system calls. > > waitpid(-1,0) will hang if there are children still running, but > waitpid(-1,WNOHANG) will just return zero. > > If there are not children running, waitpid(-1,anything) should just > return -1. > > Don't believe me, test it. > > Rob Sorry, I don't mean to question you, only trying to learn about something I have no prior experience with. If neither of you get to it, I'll try to put together a quck changeset tomorrow (attributed to you and Dmitri). Ben From shermanj at umd.edu Mon Aug 24 22:46:36 2009 From: shermanj at umd.edu (James Sherman Jr.) Date: Mon, 24 Aug 2009 23:46:36 -0400 Subject: requesting help In-Reply-To: <97ea8cf40908202230g5b08f27eh8bad1a387a352d23@mail.gmail.com> References: <97ea8cf40908202230g5b08f27eh8bad1a387a352d23@mail.gmail.com> Message-ID: <6800c3890908242046k5fbe920aifb8667561d791d65@mail.gmail.com> What about octave do you want to know about? What materials are you looking for? Is there something that you need answered that isn't found on the octave.org website? On Fri, Aug 21, 2009 at 1:30 AM, aswin kumar wrote: > Sir, > ?????? i am student, want to know more about octave and want materils > ?????? so i kindly request you to provider necessary materials and help me. > ?????????????????????????????????????????????????? Aswin > ?????????????????????????????????????????????????? Final CSE > ?????????????????????????????????????????????????? IRTT > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > From colonel.sreekar at gmail.com Tue Aug 25 00:05:49 2009 From: colonel.sreekar at gmail.com (sreekar guddeti) Date: Tue, 25 Aug 2009 10:35:49 +0530 Subject: pwelch method Message-ID: hi, i used the pwelch() function to plot FFT of audio signal but the frequency range gets scaled to the range [0.0.5] what units are these data in ... and is there an option to specify the range to be in normal units, say [0, 20,000] Hz thanks in advance -- Sreekar Guddeti -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090825/25289c1e/attachment.html From colonel.sreekar at gmail.com Tue Aug 25 00:13:29 2009 From: colonel.sreekar at gmail.com (sreekar guddeti) Date: Tue, 25 Aug 2009 10:43:29 +0530 Subject: finding peaks from noisy sampled data Message-ID: is there a way to find peaks from a noisy sampled data, for example, from a FFT spectrum of a audio file...., but not necessarily a FFT file because we already have a pwelch() function maybe i need to specify the noise profile but there should be some function to filter noise i guess ll be really thankful for any help -- Sreekar Guddeti -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090825/78473e0c/attachment.html From highegg at gmail.com Tue Aug 25 01:43:39 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Tue, 25 Aug 2009 08:43:39 +0200 Subject: loading .xls files In-Reply-To: References: Message-ID: <69d8d540908242343o11c9586cg40a188b8c3a754fb@mail.gmail.com> On Tue, Aug 18, 2009 at 5:46 PM, Figueroa Arellano Wolfgang wrote: > Good evening > > > > How can I load a .xls file to octave. > > Convert it to CSV in the spreadsheet application and then use dlmread. hth -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From highegg at gmail.com Tue Aug 25 01:48:30 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Tue, 25 Aug 2009 08:48:30 +0200 Subject: bimodal data distribution In-Reply-To: <25116016.post@talk.nabble.com> References: <25116016.post@talk.nabble.com> Message-ID: <69d8d540908242348i3c1ec68bl4a9e78fbf672b75a@mail.gmail.com> On Mon, Aug 24, 2009 at 3:22 PM, Dupuis wrote: > > Hello, > I'm trying to extract parameters of a two levels signal described as > x = N(m1, s1) with probability p > x = N(m2, s2) with probability (1-p) > |m1-m2| >> sqrt(s1^2+s2^2) > > The operation is similar to MatLab 'gmdistribution', identifying the > parameters of a mixture of gaussian signals. I implemented the search like > this: > 1) use 'statistics' to get a number of indicators; > 2) [p0, obj0, info0, iter0, nf0, lambda0] = sqp(p , 'bimodal_func', [], [], > lb,ub); where the vector p contains 5 members: the ratio p defined above, > m1, s1, m2, s2. Those values were initialised from the indicators: m1 and m3 > are the first and third quartiles, p is set to 0.5, s1 and s2 are sqrt(2) * > the standard deviation. 'lb' and 'ub' provides constraints on the result: 0 > <= p <= 1; 0<= s1, s2 <= standard deviation, ... > The bimodal_func is included, I have a few concerns. How could I correct > them ? > - data are passed through a global, I didn't see how to pass a supplemental > parameter through sqp call Use an anonymous function handle. > - if I used gradient and hessian, it converges quadratically ... close to > the minimum, and diverges otherwise. Is is possible with sqp to only use > hessian close to the minimum, in the convergence region ? A practical > criterion is that all eigenvalues should be > 0 I don't think so, but it shouldn't be hard to modify. Of course, you can also augment your hessian yourself to ensure it's positive semidefinite. > - I'm also trying to the the Fisher information matrix at the solution. The > definition on wikipedia is not clear; am I right in postulating that it is > equal to hessian(p0)/length(x), where p0 is the optimal point ? > > Regards > > Pascal http://www.nabble.com/file/p25116016/bimodal_func.m bimodal_func.m > -- > View this message in context: http://www.nabble.com/bimodal-data-distribution-tp25116016p25116016.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From highegg at gmail.com Tue Aug 25 01:53:29 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Tue, 25 Aug 2009 08:53:29 +0200 Subject: Fwd: can not get octave to plot - posting again In-Reply-To: References: Message-ID: <69d8d540908242353p1df6d7edr7975493c077424dd@mail.gmail.com> On Mon, Aug 24, 2009 at 5:46 AM, Nasreddin Hodja wrote: > > Thank you for your responses. Ben's suggestion actually makes an empty plot > box pop - I did not have that before... But the plot window is blank and the > error I get is still the same. > > octave-3.2.2:1> setenv ("GNUTERM", "x11") > octave-3.2.2:2> plot(1:10) > > error: __gnuplot_get_var__: Can not make fifo (No such file or directory) > error: called from: > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__gnuplot_get_var__.m > at line 69, column 7 > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_axes__.m > at line 39, column 18 > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_figure__.m > at line 93, column 3 > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/gnuplot_drawnow.m > at line 88, column 5 > > > I tried Leo's suggestion as well...Created a .octaverc and pasted the line: > gnuplot_binary("/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot") > in it. The behavior is the same. So I assume location of gnuplot is known by > octave, but not really sure... When I do not type setenv ("GNUTERM", "x11") > I do get a pop up blank plot window but when I do, again the error is: > > octave-3.2.2:1>??????? setenv ("GNUTERM", "x11") > octave-3.2.2:2> plot(1:10) > error: __gnuplot_get_var__: Can not make fifo (No such file or directory) > error: called from: > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__gnuplot_get_var__.m > at line 69, column 7 > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_axes__.m > at line 39, column 18 > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/__go_draw_figure__.m > at line 93, column 3 > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.2.2/m/plot/gnuplot_drawnow.m > at line 88, column 5 > > just to check at the end: > octave-3.2.2:3> gnuplot_binary > ans = /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot > > > Any other thoughts? > > Thanks, > --tolga > > Maybe you're just missing write access to /tmp (or whatever OSX uses for temporary directory)? P_tmpdir returns the directory that needs to be writable by you. hth -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From leledumbo_cool at yahoo.co.id Tue Aug 25 02:15:22 2009 From: leledumbo_cool at yahoo.co.id (leledumbo) Date: Tue, 25 Aug 2009 00:15:22 -0700 (PDT) Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <4A92E95A.5000100@gmx.at> References: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> <20090824062321.49735.qmail@web3805.mail.bbt.yahoo.co.jp> <25113309.post@talk.nabble.com> <4A92E95A.5000100@gmx.at> Message-ID: <25129514.post@talk.nabble.com> > I don't think I get your reasoning. Are you complaining it's using a too > old version or a too 'unofficial' version? Unofficial. It's only modified a little from the vanilla source hence more Unix than Windows in many cases. > Well, Here's the right place to ask questions. > If you want to get help you should be more specific in your statements > about what doesn't work or which step causes you problems. Configure step, missing termcap AFAIR. And perhaps more libraries. -- View this message in context: http://www.nabble.com/OctaveForWindows-Wiki--%28CategoryInstall%29-is--updated-%282009-08-24%29-tp25109748p25129514.html Sent from the Octave - General mailing list archive at Nabble.com. From highegg at gmail.com Tue Aug 25 02:20:18 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Tue, 25 Aug 2009 09:20:18 +0200 Subject: Building octave with large matrices support In-Reply-To: References: Message-ID: <69d8d540908250020w58eb4fdci54a81a5bf25f4662@mail.gmail.com> On Mon, Aug 24, 2009 at 10:12 PM, Rishi Amrit wrote: > Hi, > > ?? I'm trying to build octave to use large matices (>2GB). I read the note > on http://wiki.octave.org/wiki.pl?EnableLargeArrays > > I'm running 64 bit Ubuntu, with BLAS, LAPACK, ARSUITE, SUITESPARSE etc > installed from repositories. Just wondering do I need to build all these > again from scratch before building octave?with the instructions given on the > above link ? Or by just enabling 64 bit flag in configuration of octave > would work ? > > Thanks, > Yes, that is essential. Octave's index type (octave_idx_type) must match the Fortran default integer, otherwise you'll see failures (even segfaults). Also, there's currently no way to use a mixture (say, 32-bit BLAS with 64-bit SuiteSparse and 64-bit Octave) - that would be straightforward but big and tedious change (you'd need to specify a separate index type for each library and let configure sort it all out). This also is why 64-bit builds get little testing - nobody actually uses them, so expect problems if you go that way. You should also note that the limit is 2e9 elements, not 2GB - e.g. for doubles it's 16GB, actually. hth -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From lindnerben at gmx.net Tue Aug 25 03:33:01 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Tue, 25 Aug 2009 10:33:01 +0200 Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) In-Reply-To: <25129514.post@talk.nabble.com> References: <20090824024030.17875.qmail@web3811.mail.bbt.yahoo.co.jp> <20090824062321.49735.qmail@web3805.mail.bbt.yahoo.co.jp> <25113309.post@talk.nabble.com> <4A92E95A.5000100@gmx.at> <25129514.post@talk.nabble.com> Message-ID: <20090825083301.189590@gmx.net> -------- Original-Nachricht -------- > Datum: Tue, 25 Aug 2009 00:15:22 -0700 (PDT) > Von: leledumbo > An: help-octave at octave.org > Betreff: Re: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-24) > > > I don't think I get your reasoning. Are you complaining it's using a too > > old version or a too 'unofficial' version? > > Unofficial. I'm a bit surprised. I'd have granted you that it's not the most recent version of gcc, but I'd not have picked the "officiality". > It's only modified a little from the vanilla source hence more > Unix than Windows in many cases. Did you actually research this? Can you post some cases where it should be "more windows" or where it fails due to being "too much unix"? Otherwise it'll be hard to deal with them. Or are you merely judging from the 'unofficial' status? How much modification would be required to make it more acceptable? (What's an 'official' gcc for win32 platform anyway?) I use the one I use because *) it works *) it provides a shared libstdc++, which is not perfect but also works. Bug reports, change proposals, patches and feedback is always more than welcome and I'll try to incorporate them. My octave/mingw binaries will move to newer versions of gcc, but if you research a bit you'll see that Mingw's gcc has serious threading issues, and TDM's most recent port (4.4.1) also has severe issues with execution speed. So yes, there are more recent versions of gcc, and yes there is a Mingw version of a more recent release, but I have not switched yet. Being 'official' or 'unofficial' is no indication of quality. So is the number of patches against vanilla sources. It's a bit different philosophy that the Mingw project and TDM follow, but that does not disqualify either of them. Have you encountered bugs in TDM's port which are fixed in mingw's port? Then please report them at the appropriate bug trackers. Open source software lives and breathes from feedback of users. BTW, do you know that there are x64 versions of gcc for win64 which are *not* provided by the mingw project (and hence also 'unofficial'?). They look very good, and I'll certainly going to use them for trying w64 builds of octave. > > > Well, Here's the right place to ask questions. > > If you want to get help you should be more specific in your statements > > about what doesn't work or which step causes you problems. > > Configure step, missing termcap AFAIR. And perhaps more libraries. Well, missing termcap indicates you did not build ncurses libraries. Missing libraries indicate exactly that - they are missing. You can't actually blame them for being missing, nor octave for requesting them. Have you taken a look at the patches and scripts at the octave-forge repository? Everything I use for the binary installers is there. Many patches originate from michaels msvc builds, it's by far not all my brains there. Give it a try and report back. That's how it works in open source. benjamin -- Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser From loris.bennett at fu-berlin.de Tue Aug 25 05:39:40 2009 From: loris.bennett at fu-berlin.de (Loris Bennett) Date: Tue, 25 Aug 2009 12:39:40 +0200 Subject: Adding missing linker flags for AIX? Message-ID: <87ocq4i3df.fsf@slate.zedat.fu-berlin.de> Hi, On AIX the build fails at points such as: g++ -shared -o colloc.oct colloc.o -L../libcruft -lcruft -L../liboctave -loctave -L. -loctinterp -lessl -lblas -lreadline -lncurses -ldl -lessl -lblas -lz -lm -L/opt/pware/lib -lz -lm -lxlf90 -L/usr/lpp/xlf/lib -lxlopt -lxlf -lxlomp_ser with ld: 0706-006 Cannot find or open library file: -l cruft ld:open(): A file or directory in the path name does not exist. ld: 0706-006 Cannot find or open library file: -l octave ld:open(): A file or directory in the path name does not exist. ld: 0706-006 Cannot find or open library file: -l octinterp ld:open(): A file or directory in the path name does not exist. The solution is to add the flag -Wl,-brtl to the compiler call. Unfortunately there are many such points. Ideally 'configure' would recongnize AIX and do the right thing, but is there some way to locally add to the list of flags as a workaround? Cheers, Loris -- Dr. Loris Bennett Computer Centre Freie Universit?t Berlin Germany From highegg at gmail.com Tue Aug 25 09:10:01 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Tue, 25 Aug 2009 16:10:01 +0200 Subject: Adding missing linker flags for AIX? In-Reply-To: <87ocq4i3df.fsf@slate.zedat.fu-berlin.de> References: <87ocq4i3df.fsf@slate.zedat.fu-berlin.de> Message-ID: <69d8d540908250710m1276249bw88675df0261e12a1@mail.gmail.com> On Tue, Aug 25, 2009 at 12:39 PM, Loris Bennett wrote: > Hi, > > On AIX the build fails at points such as: > > ?g++ -shared -o colloc.oct colloc.o -L../libcruft -lcruft > ?-L../liboctave -loctave -L. -loctinterp -lessl -lblas -lreadline > ?-lncurses -ldl -lessl -lblas -lz -lm -L/opt/pware/lib -lz -lm > ?-lxlf90 -L/usr/lpp/xlf/lib -lxlopt -lxlf -lxlomp_ser > > with > > ?ld: 0706-006 Cannot find or open library file: -l cruft > ? ? ? ? ?ld:open(): A file or directory in the path name does not exist. > ?ld: 0706-006 Cannot find or open library file: -l octave > ? ? ? ? ?ld:open(): A file or directory in the path name does not exist. > ?ld: 0706-006 Cannot find or open library file: -l octinterp > ? ? ? ? ?ld:open(): A file or directory in the path name does not exist. > > The solution is to add the flag > > ?-Wl,-brtl > > to the compiler call. > > Unfortunately there are many such points. Ideally 'configure' would > recongnize AIX and do the right thing, but is there some way to > locally add to the list of flags as a workaround? > > Cheers, > > Loris > > -- > Dr. Loris Bennett > Computer Centre > Freie Universit?t Berlin > Germany > I think you can use configure LDFLAGS=-Wl,-brtl If AIX is recognized by Autoconf, it should be easy to do that automatically in configure. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From maxim.cournoyer at gmail.com Tue Aug 25 10:11:13 2009 From: maxim.cournoyer at gmail.com (Maxim Cournoyer) Date: Tue, 25 Aug 2009 11:11:13 -0400 Subject: Command subtitution in octave / matlab ? Message-ID: <1251213073.29570.25.camel@maxim-desktop> Hello! I'm trying to figure out something, but I'm stuck. Here's what I'm trying to do : I have two matrices, one named data, which contains multiple columns of SPICE results, and the other named labels, which contains the title of each row. Here's an example, for the sake of clarity : labels = { [1,1] = time [2,1] = vin [3,1] = v_offset [4,1] = vg [5,1] = vinp ... etc. } data = 0.00000 0.00000 0.90000 0.90000 0.90000 0.00000 0.00063 0.90000 0.90000 0.90031 0.00000 0.00126 0.90000 0.90000 0.90063 0.00000 0.00251 0.90000 0.90000 0.90126 0.00000 0.00503 0.90000 0.90000 0.90251 0.00000 0.01005 0.90000 0.90000 0.90503 ... etc. Now, I would like to create a new matrix (column vector) for each column of my data, and name these matrices by their corresponding labels. Say : time = data(:,1), vin = data(:,2), etc. I tried : labels(1) = data(:,1). But it only associates time with the 1st value of data(:,1) So, to recapitulate, my question is : How can I use the string in labels(1) to define a new variable? An analogy with bash would be : $(labels(1)) = data(:,1), the use of a command substitution. I can't find any equivalent in Octave / Matlab. Thanks to anyone who can enlighten me on this matter! Maxim -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090825/fceb6e35/attachment.html From l.butler at ed.ac.uk Tue Aug 25 10:48:39 2009 From: l.butler at ed.ac.uk (Leo Butler) Date: Tue, 25 Aug 2009 16:48:39 +0100 (BST) Subject: Command subtitution in octave / matlab ? In-Reply-To: <1251213073.29570.25.camel@maxim-desktop> References: <1251213073.29570.25.camel@maxim-desktop> Message-ID: On Tue, 25 Aug 2009, Maxim Cournoyer wrote: < Hello! < < I'm trying to figure out something, but I'm stuck. < < Here's what I'm trying to do : I have two matrices, one named data, < which contains multiple columns of SPICE results, and the other named < labels, which contains the title of each row. Here's an example, for the < sake of clarity : < < labels = < { < [1,1] = time < [2,1] = vin < [3,1] = v_offset < [4,1] = vg < [5,1] = vinp < ... etc. < } < < data = < 0.00000 0.00000 0.90000 0.90000 0.90000 < 0.00000 0.00063 0.90000 0.90000 0.90031 < 0.00000 0.00126 0.90000 0.90000 0.90063 < 0.00000 0.00251 0.90000 0.90000 0.90126 < 0.00000 0.00503 0.90000 0.90000 0.90251 < 0.00000 0.01005 0.90000 0.90000 0.90503 < ... etc. < < Now, I would like to create a new matrix (column vector) for each column < of my data, and name these matrices by their corresponding labels. < < Say : time = data(:,1), vin = data(:,2), etc. < < I tried : labels(1) = data(:,1). But it only associates time with the < 1st value of data(:,1) < < So, to recapitulate, my question is : How can I use the string in < labels(1) to define a new variable? < An analogy with bash would be : $(labels(1)) = data(:,1), the use of a < command substitution. I can't find any equivalent in Octave / Matlab. < < Thanks to anyone who can enlighten me on this matter! See help strcat help eval Leo. -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From bpabbott at mac.com Tue Aug 25 10:49:35 2009 From: bpabbott at mac.com (Ben Abbott) Date: Tue, 25 Aug 2009 11:49:35 -0400 Subject: Print plot error In-Reply-To: <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> Message-ID: <26012606513370259790980364940338890655-Webmail@me.com> On Monday, August 24, 2009, at 09:32PM, "Ben Abbott" wrote: > >On Aug 24, 2009, at 9:26 PM, Rob Mahurin wrote: > >> On Aug 24, 2009, at 9:14 PM, Ben Abbott wrote: >>> Sorry for my lack ... but will waitpid kill non-zombie children? >>> >>> There is an active gnuplot for each figure window. Would wiatid >>> terminate those children as well? >> >> No, see the man page for the wait4() and waitpid() system calls. >> >> waitpid(-1,0) will hang if there are children still running, but >> waitpid(-1,WNOHANG) will just return zero. >> >> If there are not children running, waitpid(-1,anything) should just >> return -1. >> >> Don't believe me, test it. >> >> Rob > >Sorry, I don't mean to question you, only trying to learn about >something I have no prior experience with. > >If neither of you get to it, I'll try to put together a quck changeset >tomorrow (attributed to you and Dmitri). > >Ben New problem. I'm presently unable to build the developers sources, and am running 3.2.2 instead. octave:9> waitpid (-1,"WNOHANG") error: invalid conversion from string to real scalar error: octave_base_value::int_value (): wrong type argument `sq_string' error: waitpid: OPTIONS must be an integer My c/c++ skills are not to be trusted. Can someone look into a fix for this? Ben From rob at utk.edu Tue Aug 25 11:05:27 2009 From: rob at utk.edu (Rob Mahurin) Date: Tue, 25 Aug 2009 12:05:27 -0400 Subject: Print plot error In-Reply-To: <26012606513370259790980364940338890655-Webmail@me.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <89A32ECD-7BCE-46D5-A593-3272D1E38E58@mac.com> <892b16670908221216u23e400d3p3621d53a9f09e001@mail.gmail.com> <892b16670908221236k6d192919yce0b55000dbb0b3f@mail.gmail.com> <762CD1D8-1235-48E2-A4AB-E941C0A6B0B2@mac.com> <892b16670908221529r68bb2d1vdb3f71c3ecde748e@mail.gmail.com> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> <26012606513370259790980364940338890655-Webmail@me.com> Message-ID: On Aug 25, 2009, at 11:49 AM, Ben Abbott wrote: > New problem. I'm presently unable to build the developers sources, > and am running 3.2.2 instead. > > octave:9> waitpid (-1,"WNOHANG") > error: invalid conversion from string to real scalar > error: octave_base_value::int_value (): wrong type argument > `sq_string' > error: waitpid: OPTIONS must be an integer > > My c/c++ skills are not to be trusted. Can someone look into a fix > for this? see "help WNOHANG", and take off the quotes. Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu From dasergatskov at gmail.com Tue Aug 25 11:05:38 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Tue, 25 Aug 2009 11:05:38 -0500 Subject: Print plot error In-Reply-To: <26012606513370259790980364940338890655-Webmail@me.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> <26012606513370259790980364940338890655-Webmail@me.com> Message-ID: <892b16670908250905y29821baeueb3ad9c6d7c83fb7@mail.gmail.com> On Tue, Aug 25, 2009 at 10:49 AM, Ben Abbott wrote: > On Monday, August 24, 2009, at 09:32PM, "Ben Abbott" wrote: >> >>On Aug 24, 2009, at 9:26 PM, Rob Mahurin wrote: >> >>> On Aug 24, 2009, at 9:14 PM, Ben Abbott wrote: >>>> Sorry for my lack ... but will waitpid kill non-zombie children? >>>> >>>> There is an active gnuplot for each figure window. Would wiatid >>>> terminate those children as well? >>> >>> No, see the man page for the wait4() and waitpid() system calls. >>> >>> waitpid(-1,0) will hang if there are children still running, but >>> waitpid(-1,WNOHANG) will just return zero. >>> >>> If there are not children running, waitpid(-1,anything) should just >>> return -1. >>> >>> Don't believe me, test it. >>> >>> Rob >> >>Sorry, I don't mean to question you, only trying to learn about >>something I have no prior experience with. >> >>If neither of you get to it, I'll try to put together a quck changeset >>tomorrow (attributed to you and Dmitri). >> >>Ben > > New problem. I'm presently unable to build the developers sources, and am running 3.2.2 instead. > > octave:9> waitpid (-1,"WNOHANG") There should be no quotes. WNOHANG is a function: octave:1> WNOHANG ans = 1 octave:2> help WNOHANG `WNOHANG' is a built-in function -- Built-in Function: WNOHANG () Return the numerical value of the option argument that may be passed to `waitpid' to indicate that it should return its status immediately instead of waiting for a process to exit. See also: waitpid, WUNTRACED, WCONTINUE Dmitri. -- From bpabbott at mac.com Tue Aug 25 11:35:13 2009 From: bpabbott at mac.com (Ben Abbott) Date: Tue, 25 Aug 2009 12:35:13 -0400 Subject: Print plot error In-Reply-To: <892b16670908250905y29821baeueb3ad9c6d7c83fb7@mail.gmail.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> <26012606513370259790980364940338890655-Webmail@me.com> <892b16670908250905y29821baeueb3ad9c6d7c83fb7@mail.gmail.com> Message-ID: <149820580002056539775995928522688938201-Webmail@me.com> On Tuesday, August 25, 2009, at 12:05PM, "Dmitri A. Sergatskov" wrote: >On Tue, Aug 25, 2009 at 10:49 AM, Ben Abbott wrote: >> On Monday, August 24, 2009, at 09:32PM, "Ben Abbott" wrote: >>> >>>On Aug 24, 2009, at 9:26 PM, Rob Mahurin wrote: >>> >>>> On Aug 24, 2009, at 9:14 PM, Ben Abbott wrote: >>>>> Sorry for my lack ... but will waitpid kill non-zombie children? >>>>> >>>>> There is an active gnuplot for each figure window. Would wiatid >>>>> terminate those children as well? >>>> >>>> No, see the man page for the wait4() and waitpid() system calls. >>>> >>>> waitpid(-1,0) will hang if there are children still running, but >>>> waitpid(-1,WNOHANG) will just return zero. >>>> >>>> If there are not children running, waitpid(-1,anything) should just >>>> return -1. >>>> >>>> Don't believe me, test it. >>>> >>>> Rob >>> >>>Sorry, I don't mean to question you, only trying to learn about >>>something I have no prior experience with. >>> >>>If neither of you get to it, I'll try to put together a quck changeset >>>tomorrow (attributed to you and Dmitri). >>> >>>Ben >> >> New problem. I'm presently unable to build the developers sources, and am running 3.2.2 instead. >> >> octave:9> waitpid (-1,"WNOHANG") > >There should be no quotes. WNOHANG is a function: > >octave:1> WNOHANG >ans = 1 >octave:2> help WNOHANG >`WNOHANG' is a built-in function > > -- Built-in Function: WNOHANG () > Return the numerical value of the option argument that may be > passed to `waitpid' to indicate that it should return its status > immediately instead of waiting for a process to exit. > > See also: waitpid, WUNTRACED, WCONTINUE > >Dmitri. Dmitri, Rob, Thanks for the correction. Please try the attached changeset. Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: changeset.patch Type: application/octet-stream Size: 1352 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090825/80d0cee9/attachment.obj From rob at utk.edu Tue Aug 25 11:46:22 2009 From: rob at utk.edu (Rob Mahurin) Date: Tue, 25 Aug 2009 12:46:22 -0400 Subject: Print plot error In-Reply-To: <149820580002056539775995928522688938201-Webmail@me.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> <26012606513370259790980364940338890655-Webmail@me.com> <892b16670908250905y29821baeueb3ad9c6d7c83fb7@mail.gmail.com> <149820580002056539775995928522688938201-Webmail@me.com> Message-ID: <5FC129DF-08CE-49E2-86DD-85A96CFDC748@utk.edu> On Aug 25, 2009, at 12:35 PM, Ben Abbott wrote: > Dmitri, Rob, > > Thanks for the correction. > > Please try the attached changeset. Why the sleep() in the loop? Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu From bpabbott at mac.com Tue Aug 25 12:31:43 2009 From: bpabbott at mac.com (Ben Abbott) Date: Tue, 25 Aug 2009 13:31:43 -0400 Subject: Print plot error In-Reply-To: <5FC129DF-08CE-49E2-86DD-85A96CFDC748@utk.edu> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> <26012606513370259790980364940338890655-Webmail@me.com> <892b16670908250905y29821baeueb3ad9c6d7c83fb7@mail.gmail.com> <149820580002056539775995928522688938201-Webmail@me.com> <5FC129DF-08CE-49E2-86DD-85A96CFDC748@utk.edu> Message-ID: <3FFC3A1D-D779-45AB-9284-F83B960C5B5D@mac.com> On Aug 25, 2009, at 12:46 PM, Rob Mahurin wrote: > On Aug 25, 2009, at 12:35 PM, Ben Abbott wrote: >> Dmitri, Rob, >> >> Thanks for the correction. >> >> Please try the attached changeset. > > > Why the sleep() in the loop? > > Rob Just giving some time to waitpid to have the desired effect before calling it again. If you don't think that a good idea, I'll remove it. Ben From jwe at octave.org Tue Aug 25 12:49:38 2009 From: jwe at octave.org (John W. Eaton) Date: Tue, 25 Aug 2009 13:49:38 -0400 Subject: Print plot error In-Reply-To: <149820580002056539775995928522688938201-Webmail@me.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> <26012606513370259790980364940338890655-Webmail@me.com> <892b16670908250905y29821baeueb3ad9c6d7c83fb7@mail.gmail.com> <149820580002056539775995928522688938201-Webmail@me.com> Message-ID: <19092.9266.312863.300692@segfault.lan> On 25-Aug-2009, Ben Abbott wrote: | Please try the attached changeset. This change will likely work but I think the real bug is elswhere and that there is a better fix. I'll try to post something soon. jwe From bpabbott at mac.com Tue Aug 25 13:46:38 2009 From: bpabbott at mac.com (Ben Abbott) Date: Tue, 25 Aug 2009 14:46:38 -0400 Subject: Print plot error In-Reply-To: <19092.9266.312863.300692@segfault.lan> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> <26012606513370259790980364940338890655-Webmail@me.com> <892b16670908250905y29821baeueb3ad9c6d7c83fb7@mail.gmail.com> <149820580002056539775995928522688938201-Webmail@me.com> <19092.9266.312863.300692@segfault.lan> Message-ID: <99053861223956443559170150118446383796-Webmail@me.com> On Tuesday, August 25, 2009, at 01:49PM, "John W. Eaton" wrote: >On 25-Aug-2009, Ben Abbott wrote: > >| Please try the attached changeset. > >This change will likely work but I think the real bug is elswhere >and that there is a better fix. I'll try to post something soon. > >jwe Ok. Then I'll hold on onto this changeset. Ben From jwe at octave.org Tue Aug 25 13:59:53 2009 From: jwe at octave.org (John W. Eaton) Date: Tue, 25 Aug 2009 14:59:53 -0400 Subject: Print plot error In-Reply-To: <99053861223956443559170150118446383796-Webmail@me.com> References: <7F4EA8DB-C2C1-4ACC-82D9-E48F3CFF347B@yccd.edu> <3B5AA3C4-3DB3-4F87-825E-121C88E01F5B@utk.edu> <892b16670908241417p521ff5ddn49671623bcd3b888@mail.gmail.com> <69B2B6DB-F2F9-4590-8D99-C5089BBE7EB1@utk.edu> <892b16670908241519n30c44a15p19b9f7722d83f5d5@mail.gmail.com> <9E710B0A-51C3-4488-8B82-A76A7EE60F07@utk.edu> <70E51B4E-72B4-40A2-8125-7F3FE7CB77BE@mac.com> <26012606513370259790980364940338890655-Webmail@me.com> <892b16670908250905y29821baeueb3ad9c6d7c83fb7@mail.gmail.com> <149820580002056539775995928522688938201-Webmail@me.com> <19092.9266.312863.300692@segfault.lan> <99053861223956443559170150118446383796-Webmail@me.com> Message-ID: <19092.13481.134935.878081@segfault.lan> On 25-Aug-2009, Ben Abbott wrote: | On Tuesday, August 25, 2009, at 01:49PM, "John W. Eaton" wrote: | >On 25-Aug-2009, Ben Abbott wrote: | > | >| Please try the attached changeset. | > | >This change will likely work but I think the real bug is elswhere | >and that there is a better fix. I'll try to post something soon. | > | >jwe | | Ok. Then I'll hold on onto this changeset. I have some questions about what we should do to fix this problem so I'm starting a new thread on the maintainers list. jwe From johannes at zellner.org Tue Aug 25 14:25:21 2009 From: johannes at zellner.org (Dr. Johannes Zellner) Date: Tue, 25 Aug 2009 21:25:21 +0200 Subject: graphics window should stay open if I leave octave Message-ID: <103840bf0908251225p1cd93929of6fcd457808cf9d8@mail.gmail.com> Hello, I'd like the plot window (or windows) to stay open if I run octave non-interactively like this octave -q some_script.m {arguments...} currently, the plots generated by the script will disappear immediately after the script finishes. Is there any way to keep the graphics open? Best regards -- Johannes From carlo.defalco at gmail.com Tue Aug 25 14:45:47 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Tue, 25 Aug 2009 21:45:47 +0200 Subject: graphics window should stay open if I leave octave In-Reply-To: <103840bf0908251225p1cd93929of6fcd457808cf9d8@mail.gmail.com> References: <103840bf0908251225p1cd93929of6fcd457808cf9d8@mail.gmail.com> Message-ID: On 25 Aug 2009, at 21:25, Dr. Johannes Zellner wrote: > Hello, > > I'd like the plot window (or windows) to stay open if I run octave > non-interactively like this > > octave -q some_script.m {arguments...} > > currently, the plots generated by the script will disappear > immediately after the script finishes. > > Is there any way to keep the graphics open? > > Best regards add the command pause (); at the end of your script or launch Octave with the option --persist HTH, c. From joenat75 at yahoo.de Wed Aug 26 02:08:21 2009 From: joenat75 at yahoo.de (Joenat) Date: Wed, 26 Aug 2009 09:08:21 +0200 Subject: octave compilation - opensuse 11.1 Message-ID: <4A94DF65.2070000@yahoo.de> Hello, I just tried to compile and install octave 3.2.2 on severall opensuse 11.1 machines. Therfore I tried to install all necessary libraries and programms need as it was mentioned during the configuration process. Nearly all *AMD* libraries I couldn't install. But still I tried to make the compilation but was getting to one point where the compilation stopped every time. Just take a look in the file I attached. Does someone happens to know about the failure? If yes - where you able to solve it and how. Because I would like to install octave 3.2.2 on several machines. Best wishes and great thanks Josef ---------------------------------------------------------------------- latest massage from the make process: g++ -shared -o __delaunayn__.oct pic/__delaunayn__.o -L../libcruft -lcruft -L../liboctave -loctave -L. -loctinterp -lumfpack -lamd -lfftw3 -lfftw3f -lreadline -lncurses -ldl -lcblas -lf77blas -latlas -lhdf5 -lz -lm -L/opt/intel/Compiler/11.0/081/mkl/lib/em64t -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../lib64 -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../.. -L/lib/../lib64 -L/usr/lib/../lib64 -lhdf5 -lz -lfrtbegin -lg2c -lm g++ -c -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O2 ./DLD-FUNCTIONS/__dsearchn__.cc -o pic/__dsearchn__.o g++ -shared -o __dsearchn__.oct pic/__dsearchn__.o -L../libcruft -lcruft -L../liboctave -loctave -L. -loctinterp -lumfpack -lamd -lfftw3 -lfftw3f -lreadline -lncurses -ldl -lcblas -lf77blas -latlas -lhdf5 -lz -lm -L/opt/intel/Compiler/11.0/081/mkl/lib/em64t -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../lib64 -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../.. -L/lib/../lib64 -L/usr/lib/../lib64 -lhdf5 -lz -lfrtbegin -lg2c -lm g++ -c -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O2 ./DLD-FUNCTIONS/__glpk__.cc -o pic/__glpk__.o g++ -shared -o __glpk__.oct pic/__glpk__.o -L../libcruft -lcruft -L../liboctave -loctave -L. -loctinterp -lumfpack -lamd -lfftw3 -lfftw3f -lreadline -lncurses -ldl -lcblas -lf77blas -latlas -lhdf5 -lz -lm -L/opt/intel/Compiler/11.0/081/mkl/lib/em64t -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../lib64 -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../.. -L/lib/../lib64 -L/usr/lib/../lib64 -lhdf5 -lz -lfrtbegin -lg2c -lm -lglpk g++ -c -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O2 ./DLD-FUNCTIONS/__lin_interpn__.cc -o pic/__lin_interpn__.o g++ -shared -o __lin_interpn__.oct pic/__lin_interpn__.o -L../libcruft -lcruft -L../liboctave -loctave -L. -loctinterp -lumfpack -lamd -lfftw3 -lfftw3f -lreadline -lncurses -ldl -lcblas -lf77blas -latlas -lhdf5 -lz -lm -L/opt/intel/Compiler/11.0/081/mkl/lib/em64t -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../lib64 -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../.. -L/lib/../lib64 -L/usr/lib/../lib64 -lhdf5 -lz -lfrtbegin -lg2c -lm g++ -c -I/usr/include/GraphicsMagick -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O2 ./DLD-FUNCTIONS/__magick_read__.cc -o pic/__magick_read__.o g++ -shared -o __magick_read__.oct pic/__magick_read__.o -L../libcruft -lcruft -L../liboctave -loctave -L. -loctinterp -lumfpack -lamd -lfftw3 -lfftw3f -lreadline -lncurses -ldl -lcblas -lf77blas -latlas -lhdf5 -lz -lm -L/opt/intel/Compiler/11.0/081/mkl/lib/em64t -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../../../lib64 -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3-hammer/../../.. -L/lib/../lib64 -L/usr/lib/../lib64 -lhdf5 -lz -lfrtbegin -lg2c -lm -L/usr/lib64 -L/usr/lib64 -L/usr/lib -L/usr/lib -lGraphicsMagick++ -lGraphicsMagick -llcms -lfreetype -lXext -lSM -lICE -lX11 -lbz2 -lz -lm -lgomp -lpthread -lltdl /usr/bin/ld: cannot find -lbz2 collect2: ld gab 1 als Ende-Status zur?ck make[2]: *** [__magick_read__.oct] Fehler 1 make[2]: Leaving directory `/local/Programme/Octave/octave-3.2.2/src' make[1]: *** [src] Fehler 2 make[1]: Leaving directory `/local/Programme/Octave/octave-3.2.2' make: *** [all] Fehler 2 ------------------------------------------ From highegg at gmail.com Wed Aug 26 07:21:15 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Wed, 26 Aug 2009 14:21:15 +0200 Subject: octave compilation - opensuse 11.1 In-Reply-To: <4A94DF65.2070000@yahoo.de> References: <4A94DF65.2070000@yahoo.de> Message-ID: <69d8d540908260521l340988e9n705c9b2185a86393@mail.gmail.com> On Wed, Aug 26, 2009 at 9:08 AM, Joenat wrote: > Hello, > > I just tried to compile and install octave 3.2.2 on severall opensuse > 11.1 machines. Therfore I tried to install all necessary libraries and > programms need as it was mentioned during the configuration process. > Nearly all *AMD* libraries I couldn't install. > But still I tried to make the compilation but was getting to one point > where the compilation stopped every time. > Just take a look in the file I attached. > Does someone happens to know about the failure? If yes - where you able > to solve it and how. Because I would like to install octave 3.2.2 on > several machines. > Best wishes and great thanks > Josef Install libbz2-devel. This should probably be a dependency of GraphicsMagick++-devel. Since -lbz2 is not needed explicitly but rather inferred from GraphicsMagick++-config, erasing it manually from MAGICK_LIBS in Makeconf should also work. hth PS. If you really have the Intel compilers and MKL installed (judging by the paths I see in your dumps), utilizing those will likely give you a higher performance Octave binary than the GCC + ATLAS you're actually using now. OTOH, you won't be able to redistribute the binaries, should you need to do so. Also, I strongly advise you against linking any obsolete gcc 3.3.3 runtime libraries in. cheers -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From sedwards2 at cinci.rr.com Wed Aug 26 08:32:40 2009 From: sedwards2 at cinci.rr.com (Stuart Edwards) Date: Wed, 26 Aug 2009 09:32:40 -0400 Subject: User input file selection Message-ID: <359FA468-2C08-4D42-99A6-CFBF723AE796@cinci.rr.com> Hi - This is probably a trivial question, but has me stumped. I'm writing a script that requires the user to input the name of a data file, and then load and process the contents. I tried: > datafile=input("enter the name of the datafile ", "s") > load datafile after inputing the file name, this returns an error 'could not find the file datafile' and > datafile=input("enter the name of the datafile ", "s") > load(datafile) seems to load the name of the datafile as a string and subsequent processing merely shuffles the characters in the file name around. I've tried various other syntax 'guesses' but no success. Any suggestions? Thanks for your time. Stu From andres.sepulveda at gmail.com Wed Aug 26 08:41:39 2009 From: andres.sepulveda at gmail.com (Andres Sepulveda) Date: Wed, 26 Aug 2009 09:41:39 -0400 Subject: Octave in live USB? Message-ID: Hi, Does anyone knows of a live USB linux distribution that includes octave (w/ octcdf)? The idea is to distribute a pendrive to some students so they can run the programs we use in class. Andres From rob at utk.edu Wed Aug 26 08:47:40 2009 From: rob at utk.edu (Rob Mahurin) Date: Wed, 26 Aug 2009 09:47:40 -0400 Subject: User input file selection In-Reply-To: <359FA468-2C08-4D42-99A6-CFBF723AE796@cinci.rr.com> References: <359FA468-2C08-4D42-99A6-CFBF723AE796@cinci.rr.com> Message-ID: <0825AE66-ACD9-412B-B0FC-4C9D86FF05E8@utk.edu> On Aug 26, 2009, at 9:32 AM, Stuart Edwards wrote: > This is probably a trivial question, but has me stumped. I'm writing > a script that requires the user to input the name of a data file, and > then load and process the contents. > >> datafile=input("enter the name of the datafile ", "s") >> load datafile > > after inputing the file name, this returns an error 'could not find > the file datafile' Right, 'load datafile' is the same as 'load("datafile")'. >> datafile=input("enter the name of the datafile ", "s") >> load(datafile) > > seems to load the name of the datafile as a string and subsequent > processing merely shuffles the characters in the file name around. > I've tried various other syntax 'guesses' but no success. Right, because datafile is the string containing the filename. Try data = load(datafile). Rob -- Rob Mahurin University of Manitoba, Dept. of Physics & Astronomy at: Oak Ridge National Laboratory 865 207 2594 Oak Ridge, Tennessee rob at utk.edu From pjgl2 at cam.ac.uk Wed Aug 26 10:14:04 2009 From: pjgl2 at cam.ac.uk (P.J.G. Long) Date: 26 Aug 2009 16:14:04 +0100 Subject: Octave in live USB? In-Reply-To: References: Message-ID: On Aug 26 2009, Andres Sepulveda wrote: We have a distribution that can be written to USB. We normally distribute it to our students via DVD, but it has the software on board to run under an emulator in windows and also generate a bootable USB stick. NB it is quite full with a large range of Engineering software and data. If you are interested I can send you a PDF with further info Regards Peter Long > Hi, > > Does anyone knows of a live USB linux distribution that includes >octave (w/ octcdf)? > > The idea is to distribute a pendrive to some students so they can >run the programs we use in class. > > Andres >_______________________________________________ >Help-octave mailing list >Help-octave at octave.org >https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -- Peter J G Long PhD Senior Design Engineer Cambridge University Engineering Department Trumpington Street Cambridge CB2 1PZ Tel 44 -(0) 1223 -332779 Fax 44 -(0) 1223 -332741 From jwe at octave.org Wed Aug 26 15:22:43 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 26 Aug 2009 16:22:43 -0400 Subject: Building octave with large matrices support In-Reply-To: <69d8d540908250020w58eb4fdci54a81a5bf25f4662@mail.gmail.com> References: <69d8d540908250020w58eb4fdci54a81a5bf25f4662@mail.gmail.com> Message-ID: <19093.39315.466708.135278@segfault.lan> On 25-Aug-2009, Jaroslav Hajek wrote: | Yes, that is essential. Octave's index type (octave_idx_type) must | match the Fortran default integer, otherwise you'll see failures (even | segfaults). Also, there's currently no way to use a mixture (say, | 32-bit BLAS with 64-bit SuiteSparse and 64-bit Octave) - that would be | straightforward but big and tedious change (you'd need to specify a | separate index type for each library and let configure sort it all | out). Yes, it might be possible, but I don't have much interest in introducing this extra complexity. I would like to improve the configure script to ensure that the libraries have the correct integer size when Octave is configured with the --enable-64 option. As it is now, there are no checks, so it is easy to build a version that won't really work properly. jwe From johannes at zellner.org Wed Aug 26 16:16:29 2009 From: johannes at zellner.org (Dr. Johannes Zellner) Date: Wed, 26 Aug 2009 23:16:29 +0200 Subject: Size of graphics window Message-ID: <103840bf0908261416x11ddb3a6s2339d5c00db5929f@mail.gmail.com> Hi, can I control the initial size of the graphics window (octave on windows) -- Johannes From Jeffrey.C.Bailey at nasa.gov Wed Aug 26 17:00:52 2009 From: Jeffrey.C.Bailey at nasa.gov (Bailey, Jeffrey C. (MSFC-NNM05AB50C)[RAYTHEON]) Date: Wed, 26 Aug 2009 17:00:52 -0500 Subject: text rotate patch Message-ID: <4A95B094.2010203@nasa.gov> I saw on the web a 'patch' for text rotation. It has stuff listed below. Being new to the system, I wasn't sure what I needed to do with it. Is it script that I download and run, do I just edit the appropriate matlab like m file, or perhaps get the real patch somewhere else. Thanks, Jeff | | | | * graphics.h (text::text_properties::rotation): New data member. | > * graphics.cc (text::text_properties::text_properties, | > text::text_properties::set, text::text_properties::get, | > text::text_properties::factory_defaults): Handle rotation property. | > | > | > Index: scripts/plot/__go_draw_axes__.m | > =================================================================== | > RCS file: /cvs/octave/scripts/plot/__go_draw_axes__.m,v | > retrieving revision 1.19 | > diff -u -u -r1.19 __go_draw_axes__.m | > --- scripts/plot/__go_draw_axes__.m 9 May 2007 16:46:50 -0000 1.19 | > +++ scripts/plot/__go_draw_axes__.m 14 Jun 2007 16:23:59 -0000 | > @@ -525,14 +525,17 @@ | > lpos = obj.position; | > label = obj.string; | > halign = obj.horizontalalignment; | > + angle = obj.rotation; | > if (nd == 3) | > - fprintf (plot_stream, "set label \"%s\" at %g,%g,%g %s;\n", | > + fprintf (plot_stream, | > + "set label \"%s\" at %g,%g,%g %s rotate by %f;\n", | > undo_string_escapes (label), | > - lpos(1), lpos(2), lpos(3), halign); | > + lpos(1), lpos(2), lpos(3), halign, angle); | > else | > - fprintf (plot_stream, "set label \"%s\" at %g,%g %s;\n", | > + fprintf (plot_stream, | > + "set label \"%s\" at %g,%g %s rotate by %f;\n", | > undo_string_escapes (label), | > - lpos(1), lpos(2), halign); | > + lpos(1), lpos(2), halign, angle); | > endif From tmacchant at yahoo.co.jp Wed Aug 26 17:45:32 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Thu, 27 Aug 2009 07:45:32 +0900 (JST) Subject: Size of graphics window In-Reply-To: <103840bf0908261416x11ddb3a6s2339d5c00db5929f@mail.gmail.com> Message-ID: <20090826224532.11888.qmail@web3814.mail.bbt.yahoo.co.jp> Hello --- "Dr. Johannes Zellner" wrote: > Hi, > > can I control the initial size of the graphics window (octave on windows) Do you want control size of gnuplot window? If you would like to change default size, change a graphic window size by mouse dragging and then click graphic windows bar by the right mouse button. A menu will appear. Goto Options ->Update C:\Cocument and setting\(LogOnName)\Application Data\wgnuplot.ini. You can also change default position of the window, default font, and line style. If you want change size from the script, please use a tool like sed or awk to modify the C:\Cocument and setting\(LogOnName)\Application Data\wgnuplot.ini. Regards Tatsuro -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From bpabbott at mac.com Wed Aug 26 17:57:37 2009 From: bpabbott at mac.com (Ben Abbott) Date: Wed, 26 Aug 2009 18:57:37 -0400 Subject: text rotate patch In-Reply-To: <4A95B094.2010203@nasa.gov> References: <4A95B094.2010203@nasa.gov> Message-ID: <5271B092-1A42-453E-ADD6-F8D34B6F312D@mac.com> On Aug 26, 2009, at 6:00 PM, Bailey, Jeffrey C. (MSFC-NNM05AB50C) [RAYTHEON] wrote: > I saw on the web a 'patch' for text rotation. It has stuff listed > below. Being new to the system, I wasn't sure what I needed to do > with > it. Is it script that I download and run, do I just edit the > appropriate matlab like m file, or perhaps get the real patch > somewhere > else. > > Thanks, > Jeff You shouldn't need to patch anything to rotate text objects. What version of Octave are you running? I have Octave 3.0.5 and 3.2.2 running. For each of these rotation works for me. plot (1:10) text (5, 5, "test for rotated text", "rotation", 45) Ben From bpabbott at mac.com Wed Aug 26 18:02:20 2009 From: bpabbott at mac.com (Ben Abbott) Date: Wed, 26 Aug 2009 19:02:20 -0400 Subject: Size of graphics window In-Reply-To: <103840bf0908261416x11ddb3a6s2339d5c00db5929f@mail.gmail.com> References: <103840bf0908261416x11ddb3a6s2339d5c00db5929f@mail.gmail.com> Message-ID: On Aug 26, 2009, at 5:16 PM, Dr. Johannes Zellner wrote: > Hi, > > can I control the initial size of the graphics window (octave on > windows) > > -- > Johannes If you are running Octave 3.2.x, gnuplot 4.2.5 (or greater), and are using x11 then you can set the original position by ... figure (1, "position", [100, 100, 500, 500]) Ben From Jeffrey.C.Bailey at nasa.gov Wed Aug 26 18:10:47 2009 From: Jeffrey.C.Bailey at nasa.gov (Bailey, Jeffrey C. (MSFC-NNM05AB50C)[RAYTHEON]) Date: Wed, 26 Aug 2009 18:10:47 -0500 Subject: text rotate patch In-Reply-To: <4A95B094.2010203@nasa.gov> References: <4A95B094.2010203@nasa.gov> Message-ID: <4A95C0F7.1080206@nasa.gov> Ben, I just tried your example again and it worked, but I was not running some of my other code. Perhaps the other code messed it up somehow? Jeff Bailey, Jeffrey C. (MSFC-NNM05AB50C)[RAYTHEON] wrote: > I saw on the web a 'patch' for text rotation. It has stuff listed > below. Being new to the system, I wasn't sure what I needed to do with > it. Is it script that I download and run, do I just edit the > appropriate matlab like m file, or perhaps get the real patch somewhere > else. > > Thanks, > Jeff > > > | > | > | > | * graphics.h (text::text_properties::rotation): New data member. > | > * graphics.cc (text::text_properties::text_properties, > | > text::text_properties::set, text::text_properties::get, > | > text::text_properties::factory_defaults): Handle rotation property. > | > > | > > | > Index: scripts/plot/__go_draw_axes__.m > | > =================================================================== > | > RCS file: /cvs/octave/scripts/plot/__go_draw_axes__.m,v > | > retrieving revision 1.19 > | > diff -u -u -r1.19 __go_draw_axes__.m > | > --- scripts/plot/__go_draw_axes__.m 9 May 2007 16:46:50 -0000 1.19 > | > +++ scripts/plot/__go_draw_axes__.m 14 Jun 2007 16:23:59 -0000 > | > @@ -525,14 +525,17 @@ > | > lpos = obj.position; > | > label = obj.string; > | > halign = obj.horizontalalignment; > | > + angle = obj.rotation; > | > if (nd == 3) > | > - fprintf (plot_stream, "set label \"%s\" at %g,%g,%g %s;\n", > | > + fprintf (plot_stream, > | > + "set label \"%s\" at %g,%g,%g %s rotate by %f;\n", > | > undo_string_escapes (label), > | > - lpos(1), lpos(2), lpos(3), halign); > | > + lpos(1), lpos(2), lpos(3), halign, angle); > | > else > | > - fprintf (plot_stream, "set label \"%s\" at %g,%g %s;\n", > | > + fprintf (plot_stream, > | > + "set label \"%s\" at %g,%g %s rotate by %f;\n", > | > undo_string_escapes (label), > | > - lpos(1), lpos(2), halign); > | > + lpos(1), lpos(2), halign, angle); > | > endif > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave From sedwards2 at cinci.rr.com Wed Aug 26 19:08:43 2009 From: sedwards2 at cinci.rr.com (Stuart Edwards) Date: Wed, 26 Aug 2009 20:08:43 -0400 Subject: User input file selection In-Reply-To: <0825AE66-ACD9-412B-B0FC-4C9D86FF05E8@utk.edu> References: <359FA468-2C08-4D42-99A6-CFBF723AE796@cinci.rr.com> <0825AE66-ACD9-412B-B0FC-4C9D86FF05E8@utk.edu> Message-ID: <4BF1F2F0-F244-4776-AA0D-03EAFE6814C8@cinci.rr.com> thank you! On Aug 26, 2009, at 9:47 AM, Rob Mahurin wrote: > On Aug 26, 2009, at 9:32 AM, Stuart Edwards wrote: >> This is probably a trivial question, but has me stumped. I'm writing >> a script that requires the user to input the name of a data file, and >> then load and process the contents. >> >>> datafile=input("enter the name of the datafile ", "s") >>> load datafile >> >> after inputing the file name, this returns an error 'could not find >> the file datafile' > > Right, 'load datafile' is the same as 'load("datafile")'. > >>> datafile=input("enter the name of the datafile ", "s") >>> load(datafile) >> >> seems to load the name of the datafile as a string and subsequent >> processing merely shuffles the characters in the file name around. >> I've tried various other syntax 'guesses' but no success. > > Right, because datafile is the string containing the filename. > Try data = load(datafile). > > Rob > > -- > Rob Mahurin > University of Manitoba, Dept. of Physics & Astronomy > at: Oak Ridge National Laboratory 865 207 2594 > Oak Ridge, Tennessee rob at utk.edu > From rustys36 at charter.net Wed Aug 26 22:47:55 2009 From: rustys36 at charter.net (Rusty Humphrey) Date: Wed, 26 Aug 2009 20:47:55 -0700 Subject: FW: single versus double quotes: What's the difference Message-ID: <58A061E45F2547B2A450A1AE9A2FCC54@SonjaBlue> Follow-up. Now it's working with both single and double quotes. Clearly, I had something else wrong. I just wish I knew what it was. Oh well. And I found the reference in the manual that there is no difference between single and double quotes for strings. Rusty Humphrey. _____ From: Rusty Humphrey [mailto:rustys36 at charter.net] Sent: Wednesday, August 26, 2009 6:47 PM To: 'help at octave.org' Subject: single versus double quotes: What's the difference It should be clear from the subject: that this is from a neophyte. I have just spent a frustrating hour or so trying to rotate text on a plot using the text function. I kept using the form "Rotation", 90. for the property, value pair. It didn't work until I tried 'Rotation', 90. Is there a nice document that describes what the difference in single and double quotes is? I have the manual, but I can't find it. Probably there. But a pointer to the page would be much appreciated. Rusty Humphrey Rustys36 at charter.net -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090826/c430a4c9/attachment-0001.html From jwe at octave.org Wed Aug 26 22:55:10 2009 From: jwe at octave.org (John W. Eaton) Date: Wed, 26 Aug 2009 23:55:10 -0400 Subject: FW: single versus double quotes: What's the difference In-Reply-To: <58A061E45F2547B2A450A1AE9A2FCC54@SonjaBlue> References: <58A061E45F2547B2A450A1AE9A2FCC54@SonjaBlue> Message-ID: <19094.926.868023.578072@segfault.lan> On 26-Aug-2009, Rusty Humphrey wrote: | Follow-up. Now it's working with both single and double quotes. Clearly, I | had something else wrong. I just wish I knew what it was. Oh well. | | And I found the reference in the manual that there is no difference between | single and double quotes for strings. What version of Octave are you using? There is a difference, for at least five years now. Note the difference between toascii ("\n") toascii ('\n') This is explained in the current version of the manual, and even the old version here: http://www.octave.org/doc/interpreter/Strings.html#Strings (which reminds me, the manual on the web should probably be updated to the version distributed with 3.2.2; I'll try to do that soon). jwe From xaerochina at gmail.com Wed Aug 26 23:42:30 2009 From: xaerochina at gmail.com (Chengqi Chang) Date: Thu, 27 Aug 2009 12:42:30 +0800 Subject: Octave in live USB? In-Reply-To: References: Message-ID: The key to this problem is not how to install Octave into a USB stick but how to install a linux in USB. According to my experience, it is very easy to install Ubuntu into USB sticks. Several steps: 1. Insert Ubuntu live CD (I chose Ubuntu 8.04), insert the USB stick 2. Boot from Ubuntu live CD, 3. Select the "install " menu. 4. When being asked about "Disk Partition", choose "manual" 5. Select the USB stick, part it into two partitions. One is mounted as "/", the rest is mounted as "swap". The swap partition can be quite small --- since USB speed is very slow, swap space in the USB stick will rarely be used. Which also means you may need large RAM. 6. If you've already installed a linux on the hard disk, make sure the swap partition on hard disk is not mounted. 7. Click "Next" or "OK" until the last step before copying files. In that step, you are asked to confirm all your choices.(As I am awared, it is the 7th step of Ubuntu 8.04 installation). There is a button on the right side of the window, by clicking which you can choose where to install "GRUB" Now you have three choices: 1st: install GRUB into the USB stick. Then each time you turn on the computer, you choose "Boot from USB" to start Ubuntu on USB stick. A problem usually occurs that: when you boot from CD, the USB stick is "hd1"(The hard disk is HD0); however, when you boot from USB stick directly, it may becomes "HD0"(Correspondingly, the hard drive becomes HD1). Therefore, if the booting process halts at the GRUB menu, you may have to modify "menu.lst" of GRUB. 2nd: Choose not to install GRUB. If there is already a GRUB installed on the hard disk, just add a menu item, which points to the linux image in the USB stick, into "menu.lst" file. 3rd: Choose not to install GRUB. If the system is MS's Windows 2000 or XP or Vista, you can download GRUB4DOS, and add a menu item into "menu.lst" file pointing to linux image in the USB stick. To install Octave, you can simply run "aptitude" and then add "Octave". Till now, you've successfully installed a linux with Octave into a Flash disk. It works exactly the same as that in hard drives, except for the slow reading and writing speed. Fortunately, computation speed is not undermined. Have fun! -- Best Regards! --------------------------- Sincerely Yours Chengqi Chang China Center for Economic Research Mail: XaeroChina at Gmail.com Personal Website: http://macro2.cn From johannes at zellner.org Thu Aug 27 02:15:42 2009 From: johannes at zellner.org (Dr. Johannes Zellner) Date: Thu, 27 Aug 2009 09:15:42 +0200 Subject: bandpass filter for 2D Data Message-ID: <103840bf0908270015v1719da3cq4748af28064102d1@mail.gmail.com> Hi does anyone have an implementation of a 2D bandpass filter? Suppose I've 2d data in a matrix of 1000 x 1000 pixels which represents a spatial extension of 1 m (1 mm per pixel). Now I'd like to filter away all frequencies below a wavelength of 50 mm and above a wavelength of 150 mm, so the resulting data should only have frequencies corresponding to wavelengths between 50 and 150 mm. Any octave examples for this? -- Johannes From johannes at zellner.org Thu Aug 27 03:05:46 2009 From: johannes at zellner.org (Dr. Johannes Zellner) Date: Thu, 27 Aug 2009 10:05:46 +0200 Subject: colorbar (windows version) Message-ID: <103840bf0908270105p1642f501u9475867820c758be@mail.gmail.com> Hi, I get the attached colorbar on windows octave-3.2.0 with a simple colorbar('EastOutside') Apparently, the color scale is wider than the margin of the colorbar. Any ideas how to correct this? [image: colorbar.png] -- Johannes -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090827/33f69b5b/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 6246 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090827/33f69b5b/attachment.png From lindnerben at gmx.net Thu Aug 27 03:37:17 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Thu, 27 Aug 2009 10:37:17 +0200 Subject: colorbar (windows version) In-Reply-To: <103840bf0908270105p1642f501u9475867820c758be@mail.gmail.com> References: <103840bf0908270105p1642f501u9475867820c758be@mail.gmail.com> Message-ID: <20090827083717.229890@gmx.net> > Hi, > > I get the attached colorbar on windows octave-3.2.0 with a simple > colorbar('EastOutside') > > Apparently, the color scale is wider than the margin of the colorbar. > > Any ideas how to correct this? > Could you post a small code example creating a plot showing the effect you see? Which terminal are you using? Do you see this on screen or only if you print it? benjamin -- Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser From tmacchant at yahoo.co.jp Thu Aug 27 04:52:47 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Thu, 27 Aug 2009 18:52:47 +0900 (JST) Subject: colorbar (windows version) In-Reply-To: <103840bf0908270105p1642f501u9475867820c758be@mail.gmail.com> Message-ID: <20090827095247.31185.qmail@web3804.mail.bbt.yahoo.co.jp> Hello The problem seems to be specific to combination windows terminal of gnuplot for windows and octave 3.2.x. On octave-3.2.0 for cygwin, in which gnuplot works on x11 terminal, colorbar("EastOutside") works as expected. On octave-3.0.5/mingw32, colorbar("EastOutside") works as expected. The command colorbar("EastOutside") print('colorbar.png','-dpng') on octave-3.2.2/mingw32 produces the colorbar.png as expected. I looked to see colorbar.m in 3.2.2_gcc-4.3.0\share\octave\3.2.2\m\plot. The code of colorbar was changed to large amount from that in 3.0.5. However I could not find what was wrong. Any suggestions?? ************** BTW Hello Benjamin, colorbar("EastOutside") print('colorbar.emf','-demf') does not works correct. The color is empty. It is a bug of gnuplot Version 4.3.0-2008-11-21 CVS. With the latest gnuplot 4.3.0 for windows colorbar("EastOutside") print('colorbar.emf','-demf') works fine. In addition gnuplot Version 4.3.0-2008-11-21 CVS has a bug in copy graph in clipboard. If paste the graph from copied into clipboard from windows terminal as emf style, all lines in the graph is dashed. I suggest you to update the gnuplot 4.3.0 from newer cvs trees. Regards Tatsuro --- "Dr. Johannes Zellner" wrote: > Hi, > > I get the attached colorbar on windows octave-3.2.0 with a simple > colorbar('EastOutside') > > Apparently, the color scale is wider than the margin of the colorbar. > > Any ideas how to correct this? > > [image: colorbar.png] > > -- > Johannes > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From tmacchant at yahoo.co.jp Thu Aug 27 04:54:03 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Thu, 27 Aug 2009 18:54:03 +0900 (JST) Subject: colorbar (windows version) In-Reply-To: <20090827083717.229890@gmx.net> Message-ID: <20090827095403.58142.qmail@web3801.mail.bbt.yahoo.co.jp> Hello colorbar("EastOutside") is enough to see it. --- Benjamin Lindner wrote: > > > Hi, > > > > I get the attached colorbar on windows octave-3.2.0 with a simple > > colorbar('EastOutside') > > > > Apparently, the color scale is wider than the margin of the colorbar. > > > > Any ideas how to correct this? > > > > Could you post a small code example creating a plot showing the effect you see? > Which terminal are you using? > Do you see this on screen or only if you print it? > > benjamin > -- > Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 - > sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From tmacchant at yahoo.co.jp Thu Aug 27 05:37:51 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Thu, 27 Aug 2009 19:37:51 +0900 (JST) Subject: colorbar (windows version) In-Reply-To: <20090827095247.31185.qmail@web3804.mail.bbt.yahoo.co.jp> Message-ID: <20090827103751.88687.qmail@web3808.mail.bbt.yahoo.co.jp> Hello --- Tatsuro MATSUOKA wrote: BTW Hello Benjamin, colorbar("EastOutside") print('colorbar.emf','-demf') does not works correct. The color is empty. It is a bug of gnuplot Version 4.3.0-2008-11-21 CVS. With the latest gnuplot 4.3.0 for windows colorbar("EastOutside") print('colorbar.emf','-demf') works fine. In addition gnuplot Version 4.3.0-2008-11-21 CVS has a bug in copy graph in clipboard. If paste the graph from copied into clipboard from windows terminal as emf style, all lines in the graph is dashed. ********************* If you would like to test the latest gnuplot 4.30 (cvs) for windows, please visit the below http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/ Although the octave special patch is not attached but it is enough to see the difference concerning bug of gnuplot indicated the above. Regards Tatsuro -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From highegg at gmail.com Thu Aug 27 06:00:57 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Thu, 27 Aug 2009 13:00:57 +0200 Subject: Building octave with large matrices support In-Reply-To: <19093.39315.466708.135278@segfault.lan> References: <69d8d540908250020w58eb4fdci54a81a5bf25f4662@mail.gmail.com> <19093.39315.466708.135278@segfault.lan> Message-ID: <69d8d540908270400jfb1d72ble72aaafc4f8a2c68@mail.gmail.com> On Wed, Aug 26, 2009 at 10:22 PM, John W. Eaton wrote: > On 25-Aug-2009, Jaroslav Hajek wrote: > > | Yes, that is essential. Octave's index type (octave_idx_type) must > | match the Fortran default integer, otherwise you'll see failures (even > | segfaults). Also, there's currently no way to use a mixture (say, > | 32-bit BLAS with 64-bit SuiteSparse and 64-bit Octave) - that would be > | straightforward but big and tedious change (you'd need to specify a > | separate index type for each library and let configure sort it all > | out). > > Yes, it might be possible, but I don't have much interest in > introducing this extra complexity. > > I would like to improve the configure script to ensure that the > libraries have the correct integer size when Octave is configured with > the --enable-64 option. ?As it is now, there are no checks, so it is > easy to build a version that won't really work properly. > BLAS and LAPACK are already checked against the Fortran conventions, including integer return values (ISAMAX). I think we should at least check that the Fortran integer matches octave_idx_type, which is an assumption made throughout Octave sources. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From tmacchant at yahoo.co.jp Thu Aug 27 06:05:23 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Thu, 27 Aug 2009 20:05:23 +0900 (JST) Subject: colorbar (windows version) In-Reply-To: <20090827103751.88687.qmail@web3808.mail.bbt.yahoo.co.jp> Message-ID: <20090827110523.77238.qmail@web3801.mail.bbt.yahoo.co.jp> Hello --- Tatsuro MATSUOKA wrote: > In addition gnuplot Version 4.3.0-2008-11-21 CVS has a bug in copy graph in clipboard. > If paste the graph from copied into clipboard from windows terminal as emf style, all lines in > the > graph is dashed. Sorry the above is my misleadings. Even in the latest version, the above also occur. Regards Tatsuro -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From bpabbott at mac.com Thu Aug 27 06:13:35 2009 From: bpabbott at mac.com (Ben Abbott) Date: Thu, 27 Aug 2009 07:13:35 -0400 Subject: colorbar (windows version) In-Reply-To: <20090827095247.31185.qmail@web3804.mail.bbt.yahoo.co.jp> References: <20090827095247.31185.qmail@web3804.mail.bbt.yahoo.co.jp> Message-ID: <3E9B9457-A217-4787-9F2D-A63A10EF1AD5@mac.com> On Aug 27, 2009, at 5:52 AM, Tatsuro MATSUOKA wrote: > Hello > > The problem seems to be specific to combination windows terminal of > gnuplot for windows and octave > 3.2.x. This problem is also seen when using the "aqua" terminal on Mac OSX. I think it is a gnuplot bug. Ben From janert at ieee.org Thu Aug 27 00:06:56 2009 From: janert at ieee.org (Philipp K. Janert) Date: Wed, 26 Aug 2009 22:06:56 -0700 Subject: Gnuplot Book: Finally (finally!) in print! Message-ID: <200908262206.56189.janert@ieee.org> After what at times seemed like an interminable delay, the Gnuplot book is finally available in printed form! This means that anybody who pre-ordered the book should by now already have their copy or receive it within the next few days. I wanted to thank all of you who contributed questions and comments, or pointed out errors in the draft version of the manuscript. It really made a difference! More details are available on the publisher's site: www.manning.com/janert and the book is available from any bookseller, including Amazon: http://www.amazon.com/gp/product/1933988398 I wanted to thank everyone for their patience and also wanted to apologize again for the delay. I hope you will find that it was worth it. Best, Ph. From johannes at zellner.org Thu Aug 27 04:22:56 2009 From: johannes at zellner.org (Dr. Johannes Zellner) Date: Thu, 27 Aug 2009 11:22:56 +0200 Subject: colorbar (windows version) In-Reply-To: <20090827083717.229890@gmx.net> References: <103840bf0908270105p1642f501u9475867820c758be@mail.gmail.com> <20090827083717.229890@gmx.net> Message-ID: <103840bf0908270222o350a6403qd3cf1b5ec7ea94c5@mail.gmail.com> peaks(); colorbar('EastOutside'); generates the attached image (windows octave-3.2.0, windows terminal). - This bug appears in all variants of colorbar (e.g. also 'North' ...) - "print -dgif fred.gif" prints it correctly, so the bug seems to be only present in the "windows terminal" - wgnuplot's colorbox works correctly (wgnuplot as shipped with my octave installation) [image: peaks.png] -- Johannes 2009/8/27 Benjamin Lindner > > > Hi, > > > > I get the attached colorbar on windows octave-3.2.0 with a simple > > colorbar('EastOutside') > > > > Apparently, the color scale is wider than the margin of the colorbar. > > > > Any ideas how to correct this? > > > > Could you post a small code example creating a plot showing the effect you > see? > Which terminal are you using? > Do you see this on screen or only if you print it? > > benjamin > -- > Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 - > sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090827/2f33b46e/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 46975 bytes Desc: not available Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090827/2f33b46e/attachment-0001.png From rustys36 at charter.net Wed Aug 26 20:47:19 2009 From: rustys36 at charter.net (Rusty Humphrey) Date: Wed, 26 Aug 2009 18:47:19 -0700 Subject: single versus double quotes: What's the difference Message-ID: <78A80FC2D5C64C1FB2680B66F6C352ED@SonjaBlue> It should be clear from the subject: that this is from a neophyte. I have just spent a frustrating hour or so trying to rotate text on a plot using the text function. I kept using the form "Rotation", 90. for the property, value pair. It didn't work until I tried 'Rotation', 90. Is there a nice document that describes what the difference in single and double quotes is? I have the manual, but I can't find it. Probably there. But a pointer to the page would be much appreciated. Rusty Humphrey Rustys36 at charter.net -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090826/78732c3b/attachment.html From steve53 at earthlink.net Thu Aug 27 10:20:11 2009 From: steve53 at earthlink.net (Steven Levine) Date: Thu, 27 Aug 2009 08:20:11 -0700 Subject: single versus double quotes: What's the difference In-Reply-To: <78A80FC2D5C64C1FB2680B66F6C352ED@SonjaBlue> Message-ID: In <78A80FC2D5C64C1FB2680B66F6C352ED at SonjaBlue>, on 08/26/09 at 06:47 PM, "Rusty Humphrey" said: Hi, >property, value pair. It didn't work until I tried 'Rotation', 90. Is >there a nice document that describes what the difference in single and >double quotes is? I have the manual, but I can't find it. Probably >there. But a pointer to the page would be much appreciated. See http://www.gnu.org/software/octave/doc/interpreter/Strings.html#Strings Steven -- ---------------------------------------------------------------------- "Steven Levine" eCS/Warp/DIY etc. www.scoug.com www.ecomstation.com ---------------------------------------------------------------------- From macy at sfo.com Thu Aug 27 12:46:01 2009 From: macy at sfo.com (macy at sfo.com) Date: Thu, 27 Aug 2009 10:46:01 -0700 (PDT) Subject: bandpass filter for 2D Data In-Reply-To: <103840bf0908270015v1719da3cq4748af28064102d1@mail.gmail.com> References: <103840bf0908270015v1719da3cq4748af28064102d1@mail.gmail.com> Message-ID: <1199.66.81.51.220.1251395161.squirrel@cp01.sfo.com> Color? If luminance, only I would (symbolically represented) >> image1 = lowpass(image,20); >> image2 = lowpass(image,50); >> then, >> imageresult = image1 - image2; I low pass filter my 2D images using a custom filter function I wrote that preserves the 'slope' at the edges. Does NOT preserve curvature, but at least doesn't "squash" the edges towards zero. Robert > Hi > > does anyone have an implementation of a 2D bandpass filter? > > Suppose I've 2d data in a matrix of 1000 x 1000 pixels which > represents a spatial extension of 1 m (1 mm per pixel). > Now I'd like to filter away all frequencies below a wavelength of 50 > mm and above a wavelength of 150 mm, > so the resulting data should only have frequencies corresponding to > wavelengths between 50 and 150 mm. > > Any octave examples for this? > > -- > Johannes From johannes at zellner.org Thu Aug 27 13:23:44 2009 From: johannes at zellner.org (Dr. Johannes Zellner) Date: Thu, 27 Aug 2009 20:23:44 +0200 Subject: bandpass filter for 2D Data In-Reply-To: <1199.66.81.51.220.1251395161.squirrel@cp01.sfo.com> References: <103840bf0908270015v1719da3cq4748af28064102d1@mail.gmail.com> <1199.66.81.51.220.1251395161.squirrel@cp01.sfo.com> Message-ID: <103840bf0908271123m503240f3n676c98a47037a69d@mail.gmail.com> Do you have some code of your low pass filter? -- Johannes 2009/8/27 : > Color? > > If luminance, only I would (symbolically represented) > >>> image1 = lowpass(image,20); >>> image2 = lowpass(image,50); >>> then, >>> imageresult = image1 - image2; > > I low pass filter my 2D images using a custom filter function I wrote that > preserves the 'slope' at the edges. ?Does NOT preserve curvature, but at > least doesn't "squash" the edges towards zero. > > Robert > >> Hi >> >> does anyone have an implementation of a 2D bandpass filter? >> >> Suppose I've 2d data in a matrix of 1000 x 1000 pixels which >> represents a spatial extension of 1 m (1 mm per pixel). >> Now I'd like to filter away all frequencies below a wavelength of 50 >> mm and above a wavelength of 150 mm, >> so the resulting data should only have frequencies corresponding to >> wavelengths between 50 and 150 mm. >> >> Any octave examples for this? >> >> -- >> Johannes > > > From rustys36 at charter.net Thu Aug 27 14:23:51 2009 From: rustys36 at charter.net (Rusty Humphrey) Date: Thu, 27 Aug 2009 12:23:51 -0700 Subject: FW: single versus double quotes: What's the difference Message-ID: -----Original Message----- From: John W. Eaton [mailto:jwe at octave.org] Sent: Thursday, August 27, 2009 6:13 AM To: Rusty Humphrey Cc: 'John W. Eaton' Subject: RE: single versus double quotes: What's the difference Please reply on the mailing list so others may comment. Thanks, jwe On 26-Aug-2009, Rusty Humphrey wrote: | Version 3.0.3 | | Rusty Humphrey | | -----Original Message----- | From: John W. Eaton [mailto:jwe at octave.org] | Sent: Wednesday, August 26, 2009 8:55 PM | To: Rusty Humphrey | Cc: help at octave.org | Subject: FW: single versus double quotes: What's the difference | | On 26-Aug-2009, Rusty Humphrey wrote: | | | Follow-up. Now it's working with both single and double quotes. Clearly, | I | | had something else wrong. I just wish I knew what it was. Oh well. | | | | And I found the reference in the manual that there is no difference | between | | single and double quotes for strings. | | What version of Octave are you using? There is a difference, for at | least five years now. Note the difference between | | toascii ("\n") | toascii ('\n') | | This is explained in the current version of the manual, and even the | old version here: | | http://www.octave.org/doc/interpreter/Strings.html#Strings | | (which reminds me, the manual on the web should probably be updated to | the version distributed with 3.2.2; I'll try to do that soon). | | jwe | From i.am.mr.sleepyhead at gmail.com Thu Aug 27 14:58:09 2009 From: i.am.mr.sleepyhead at gmail.com (Derek Tsui) Date: Thu, 27 Aug 2009 15:58:09 -0400 Subject: parsing system call output Message-ID: <1bfaba5f0908271258v73b37fe9vefc71b7533249fb@mail.gmail.com> Hi, does anyone know of a function or way to parse the output returned from a system call? I am using system to query mysql db. Example [status, output] = system ("mysql -u root -N -e 'SELECT * FROM t' "); disp(output) would return something like 0 10 1021 5 11 1 1 0 10 1021 5 15 1 1 0 10 1021 5 16 1 1 But if I do size(output) it is [1 x] , one dimensional. I am trying to parse output and put the values into a matrix. Could anyone help? Thanks, Derek -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090827/1dab46bf/attachment.html From jpswensen at comcast.net Thu Aug 27 14:58:15 2009 From: jpswensen at comcast.net (John Swensen) Date: Thu, 27 Aug 2009 15:58:15 -0400 Subject: bandpass filter for 2D Data In-Reply-To: <103840bf0908270015v1719da3cq4748af28064102d1@mail.gmail.com> References: <103840bf0908270015v1719da3cq4748af28064102d1@mail.gmail.com> Message-ID: <34E32CF1-2D99-44C6-A0F2-2D71BC0E2032@comcast.net> On Aug 27, 2009, at 3:15 AM, Dr. Johannes Zellner wrote: > Hi > > does anyone have an implementation of a 2D bandpass filter? > > Suppose I've 2d data in a matrix of 1000 x 1000 pixels which > represents a spatial extension of 1 m (1 mm per pixel). > Now I'd like to filter away all frequencies below a wavelength of 50 > mm and above a wavelength of 150 mm, > so the resulting data should only have frequencies corresponding to > wavelengths between 50 and 150 mm. > > Any octave examples for this? > > -- > Johannes > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave I don't know if there is an example of how to do this, but I think I remember doing the following pseudocode in my computer visions class: 1) perform the 2D FFT 2) figure out, based on your spatial sampling frequency, how much one "pixel" in the magnitude portion of the 2D FFT is 3) set everything but an annulus whose larger radius equates to 150mm wavelength and inner radius equates to 50mm to zero. 4) Perform the inverse 2D FFT Someone please correct me if this doesn't work, but I think this ends up being a fairly quick way to do what you ask and easy to implement. John Swensen From carlo.defalco at gmail.com Thu Aug 27 15:37:48 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Thu, 27 Aug 2009 22:37:48 +0200 Subject: parsing system call output In-Reply-To: <1bfaba5f0908271258v73b37fe9vefc71b7533249fb@mail.gmail.com> References: <1bfaba5f0908271258v73b37fe9vefc71b7533249fb@mail.gmail.com> Message-ID: <0CE1C691-7F28-43E8-82BE-0902FAF290A2@gmail.com> On 27 Aug 2009, at 21:58, Derek Tsui wrote: > Hi, does anyone know of a function or way to parse the output > returned from a system call? I am using system to query mysql db. > > Example > [status, output] = system ("mysql -u root -N -e 'SELECT * FROM t' "); > > disp(output) would return something like > 0 10 1021 5 11 1 1 > 0 10 1021 5 15 1 1 > 0 10 1021 5 16 1 1 > > But if I do size(output) it is [1 x] , one dimensional. > > I am trying to parse output and put the values into a matrix. Could > anyone help? the output of system is a string, if it reprsents a matrix of numbers like in the example above you can convert it by simply doing [status, output] = system ("mysql -u root -N -e 'SELECT * FROM t' "); output = str2num (output); > Thanks, > Derek c. From jwe at octave.org Thu Aug 27 16:24:25 2009 From: jwe at octave.org (John W. Eaton) Date: Thu, 27 Aug 2009 17:24:25 -0400 Subject: Building octave with large matrices support In-Reply-To: <69d8d540908270400jfb1d72ble72aaafc4f8a2c68@mail.gmail.com> References: <69d8d540908250020w58eb4fdci54a81a5bf25f4662@mail.gmail.com> <19093.39315.466708.135278@segfault.lan> <69d8d540908270400jfb1d72ble72aaafc4f8a2c68@mail.gmail.com> Message-ID: <19094.63881.529202.480384@segfault.lan> On 27-Aug-2009, Jaroslav Hajek wrote: | BLAS and LAPACK are already checked against the Fortran conventions, | including integer return values (ISAMAX). Does the check fail if the integer sizes don't match? | I think we should at least check that the Fortran integer matches | octave_idx_type, which is an assumption made throughout Octave | sources. Yes, this should be done so that the Fortran code that is distributed with Octave will compile correctly, but we also need to check all other libraries that we link with and that we pass octave_idx_type values to. What's the best way to do that? I assume it will require running test programs. Maybe we should move any further discussion to the maintainers list? jwe From highegg at gmail.com Fri Aug 28 01:18:19 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Fri, 28 Aug 2009 08:18:19 +0200 Subject: Building octave with large matrices support In-Reply-To: <19094.63881.529202.480384@segfault.lan> References: <69d8d540908250020w58eb4fdci54a81a5bf25f4662@mail.gmail.com> <19093.39315.466708.135278@segfault.lan> <69d8d540908270400jfb1d72ble72aaafc4f8a2c68@mail.gmail.com> <19094.63881.529202.480384@segfault.lan> Message-ID: <69d8d540908272318k288eb06fgc343d06a5979d3e@mail.gmail.com> On Thu, Aug 27, 2009 at 11:24 PM, John W. Eaton wrote: > On 27-Aug-2009, Jaroslav Hajek wrote: > > | BLAS and LAPACK are already checked against the Fortran conventions, > | including integer return values (ISAMAX). > > Does the check fail if the integer sizes don't match? > It doesn't need to. I don't think there's a good way to safely inquire the integer size used in BLAS, but if your Fortran uses 64bit and BLAS 32bit, you may get garbage in the upper 32bit of the result from ISAMAX, hence the test will fail. But you may also get zero as a side effect (if the output is via a 64-bit register that is zeroed first). Hmmm. Maybe I can improve the test even further. The problem is that args are passed by pointers, so as long as no argument is actually outside the 32-bit range, it won't make a difference. And you certainly don't want a configure test with an 8GB array... The converse, i.e. 32-bit Fortran calling 64-bit BLAS, is almost bound to fail in the existing test. > | I think we should at least check that the Fortran integer matches > | octave_idx_type, which is an assumption made throughout Octave > | sources. > > Yes, this should be done so that the Fortran code that is distributed > with Octave will compile correctly, but we also need to check all > other libraries that we link with and that we pass octave_idx_type > values to. ?What's the best way to do that? ?I assume it will require > running test programs. ?Maybe we should move any further discussion to > the maintainers list? > > jwe > The problem is most imminent in Fortran 77-style libraries, which typically don't provide any header files. That includes BLAS and LAPACK, ARPACK and QRUPDATE. The latter three less likely, because they will typically be compiled by system's Fortran compiler using default settings. But there are lots of BLASes. I'll see what I can do. -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From carlo.defalco at gmail.com Fri Aug 28 03:44:08 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Fri, 28 Aug 2009 10:44:08 +0200 Subject: vectorization quiz Message-ID: <55538F1C-C35F-40ED-94D6-05F7FC56676D@gmail.com> Hi, I've just come back to work after holidays but my brain seems not to have noticed, I'm sure there is an easy way to vectorize the following code but I just can't see it at the moment... Here is the code: for iel = 1:nel for iqn = 1:nqn shg(:,:,iqn,iel) = J(:, :, iqn, iel) * shg(:,:,iqn,iel); endfor endfor where nel and nqn are possibly very large and size(J(:, :, iqn, iel)) = size(shg(:,:,iqn,iel)) = [2 2] Can anyone suggest a way to speed this up? Thanks in advance, c. From jthoo at yccd.edu Fri Aug 28 09:15:30 2009 From: jthoo at yccd.edu (John B. Thoo) Date: Fri, 28 Aug 2009 07:15:30 -0700 Subject: Tab-completion Message-ID: <6954688B-219A-45A2-AB02-F1C06E7940ED@yccd.edu> Hi. I have a question about Tab-completion. I'm using Octave 3.2.2 on Mac OS X 10.4.11. If I want to drill down to the folder ~/Desktop/NumMethPractice/ for example, in Octave I type octave-3.2.2:1> cd ~/Des and press Tab to complete the name: octave-3.2.2:1> cd ~/Desktop/ But if I continue now to type octave-3.2.2:1> cd ~/Desktop/Num then press Tab to complete the name, nothing happens. Instead I have to go to a new line and type octave-3.2.2:2> cd Num and now pressing Tab completes the name to give octave-3.2.2:2> cd NumMethPractice/ What am I doing wrong? Thanks. ---John. From mishrapi at ge.com Fri Aug 28 07:42:17 2009 From: mishrapi at ge.com (mishrapiyush) Date: Fri, 28 Aug 2009 05:42:17 -0700 (PDT) Subject: External C DLL crashes Octave Message-ID: <25189231.post@talk.nabble.com> Hi all, I followed the example on wiki (http://wiki.octave.org/wiki.pl?OctaveLinkToWindowsDLLs) to compile my c/c++ code into an .oct file but when I try to call this function, octave crashes. A snippet of my codes is attached below for your reference. I had compiled mycode.cpp as Win DLL using MS Visual Studio 2008 and tested it on Matlab. Next I had copied the mycode.dll and mycode.lib into my Octave project folder and compiled them with mycodewrapper.cc to generate func1.oct, which I call in a matlab function. I have recetly started using Octave and have spent hours researching the process of integrating external function calls. In my opinion, the manual (Appendix A.1.9) does not do a good job of explaining C/C++ integration and should be supplemented with wiki entry mentioned above, which itself misses to mention that when linking the wrapper with external code, it should be done with .lib file and not the .dll file. I would very much appreciate any help in further resolving this problem. Thanks for your time. ----------------------------dllmain.cpp------------------------------ #include "stdafx.h" BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } ----------------------------mycode.cpp------------------------------ #include #include extern "C" unsigned int func1(double *x); unsigned int func1(double *x) { ... } ----------------------------mycodewrapper.cc------------------------------ #include extern "C" { unsigned int func1(double *x); } DEFUN_DLD (func1, args, , "usage func1('double')" ) { octave_value_list retval; Matrix B = args(0).matrix_value(); double* A; *A = B.data(0); retval(0) = (double) func1( A ); return retval; } -- View this message in context: http://www.nabble.com/External-C-DLL-crashes-Octave-tp25189231p25189231.html Sent from the Octave - General mailing list archive at Nabble.com. From sergstesh at yahoo.com Fri Aug 28 10:30:15 2009 From: sergstesh at yahoo.com (Sergei Steshenko) Date: Fri, 28 Aug 2009 08:30:15 -0700 (PDT) Subject: bandpass filter for 2D Data In-Reply-To: <34E32CF1-2D99-44C6-A0F2-2D71BC0E2032@comcast.net> Message-ID: <68503.48905.qm@web35208.mail.mud.yahoo.com> --- On Thu, 8/27/09, John Swensen wrote: > From: John Swensen > Subject: Re: bandpass filter for 2D Data > To: "Dr. Johannes Zellner" > Cc: help-octave at octave.org > Date: Thursday, August 27, 2009, 12:58 PM > > On Aug 27, 2009, at 3:15 AM, Dr. Johannes Zellner wrote: > > > Hi > > > > does anyone have an implementation of a 2D bandpass > filter? > > > > Suppose I've 2d data in a matrix of 1000 x 1000 pixels > which > > represents a spatial extension of 1 m (1 mm per > pixel). > > Now I'd like to filter away all frequencies below a > wavelength of 50 > > mm and above a wavelength of 150 mm, > > so the resulting data should only have frequencies > corresponding to > > wavelengths between 50 and 150 mm. > > > > Any octave examples for this? > > > > --? > > Johannes > > _______________________________________________ > > Help-octave mailing list > > Help-octave at octave.org > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > I don't know if there is an example of how to do this, but > I think I? > remember doing the following pseudocode in my computer > visions class: > > 1) perform the 2D FFT > 2) figure out, based on your spatial sampling frequency, > how much one? > "pixel" in the magnitude portion of the 2D FFT is > 3) set everything but an annulus whose larger radius > equates to 150mm? > wavelength and inner radius equates to 50mm to zero. > 4) Perform the inverse 2D FFT > > Someone please correct me if this doesn't work, but I think > this ends? > up being a fairly quick way to do what you ask and easy to > implement. > > John Swensen > _______________________________________________ Your approach is essentially correct, however, with any inverse FFT brickwall filter (the one you propose) causes a lot of ringing in the reconstituted signal. Regards, Sergei. From jpswensen at comcast.net Fri Aug 28 10:32:40 2009 From: jpswensen at comcast.net (John Swensen) Date: Fri, 28 Aug 2009 11:32:40 -0400 Subject: bandpass filter for 2D Data In-Reply-To: <68503.48905.qm@web35208.mail.mud.yahoo.com> References: <68503.48905.qm@web35208.mail.mud.yahoo.com> Message-ID: <350867D7-665F-422A-8A1B-C7B6FD2EECBE@comcast.net> On Aug 28, 2009, at 11:30 AM, Sergei Steshenko wrote: > > > --- On Thu, 8/27/09, John Swensen wrote: > >> From: John Swensen >> Subject: Re: bandpass filter for 2D Data >> To: "Dr. Johannes Zellner" >> Cc: help-octave at octave.org >> Date: Thursday, August 27, 2009, 12:58 PM >> >> On Aug 27, 2009, at 3:15 AM, Dr. Johannes Zellner wrote: >> >>> Hi >>> >>> does anyone have an implementation of a 2D bandpass >> filter? >>> >>> Suppose I've 2d data in a matrix of 1000 x 1000 pixels >> which >>> represents a spatial extension of 1 m (1 mm per >> pixel). >>> Now I'd like to filter away all frequencies below a >> wavelength of 50 >>> mm and above a wavelength of 150 mm, >>> so the resulting data should only have frequencies >> corresponding to >>> wavelengths between 50 and 150 mm. >>> >>> Any octave examples for this? >>> >>> -- >>> Johannes >>> _______________________________________________ >>> Help-octave mailing list >>> Help-octave at octave.org >>> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave >> >> I don't know if there is an example of how to do this, but >> I think I >> remember doing the following pseudocode in my computer >> visions class: >> >> 1) perform the 2D FFT >> 2) figure out, based on your spatial sampling frequency, >> how much one >> "pixel" in the magnitude portion of the 2D FFT is >> 3) set everything but an annulus whose larger radius >> equates to 150mm >> wavelength and inner radius equates to 50mm to zero. >> 4) Perform the inverse 2D FFT >> >> Someone please correct me if this doesn't work, but I think >> this ends >> up being a fairly quick way to do what you ask and easy to >> implement. >> >> John Swensen >> _______________________________________________ > > > Your approach is essentially correct, however, with any inverse FFT > brickwall filter (the one you propose) causes a lot of ringing in the > reconstituted signal. > > Regards, > Sergei. > > > Yeah, I thought about that afterward, but hadn't got around to correcting myself. To solve that problem you use a difference of 2D Guassians to generate the annulus. I don't quite remember now how to set the variance of the Gaussians to get the desired cutoff frequencies, though. Thanks for pointing out my error, John From tmacchant at yahoo.co.jp Fri Aug 28 14:17:08 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Sat, 29 Aug 2009 04:17:08 +0900 (JST) Subject: External C DLL crashes Octave In-Reply-To: <25189231.post@talk.nabble.com> Message-ID: <20090828191709.28536.qmail@web3809.mail.bbt.yahoo.co.jp> Hello Please show the version of octave and whether it is MSVC version or MinGW Version. Regards Tatsuro --- mishrapiyush wrote: > > Hi all, > > I followed the example on wiki > (http://wiki.octave.org/wiki.pl?OctaveLinkToWindowsDLLs) to compile my c/c++ > code into an .oct file but when I try to call this function, octave crashes. > A snippet of my codes is attached below for your reference. > > I had compiled mycode.cpp as Win DLL using MS Visual Studio 2008 and tested > it on Matlab. Next I had copied the mycode.dll and mycode.lib into my Octave > project folder and compiled them with mycodewrapper.cc to generate > func1.oct, which I call in a matlab function. > > I have recetly started using Octave and have spent hours researching the > process of integrating external function calls. In my opinion, the manual > (Appendix A.1.9) does not do a good job of explaining C/C++ integration and > should be supplemented with wiki entry mentioned above, which itself misses > to mention that when linking the wrapper with external code, it should be > done with .lib file and not the .dll file. I would very much appreciate any > help in further resolving this problem. Thanks for your time. > > ----------------------------dllmain.cpp------------------------------ > #include "stdafx.h" > > BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID > lpReserved ) { > switch (ul_reason_for_call) > { > case DLL_PROCESS_ATTACH: > case DLL_THREAD_ATTACH: > case DLL_THREAD_DETACH: > case DLL_PROCESS_DETACH: > break; > } > return TRUE; > } > ----------------------------mycode.cpp------------------------------ > #include > #include > > extern "C" unsigned int func1(double *x); > > unsigned int func1(double *x) > { > ... > } > ----------------------------mycodewrapper.cc------------------------------ > #include > > extern "C" { > unsigned int func1(double *x); > } > DEFUN_DLD (func1, args, , "usage func1('double')" ) { > octave_value_list retval; > Matrix B = args(0).matrix_value(); > double* A; > *A = B.data(0); > retval(0) = (double) func1( A ); > return retval; > } > > -- > View this message in context: > http://www.nabble.com/External-C-DLL-crashes-Octave-tp25189231p25189231.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From mishrapi at ge.com Fri Aug 28 14:44:02 2009 From: mishrapi at ge.com (mishrapiyush) Date: Fri, 28 Aug 2009 12:44:02 -0700 (PDT) Subject: External C DLL crashes Octave In-Reply-To: <20090828191709.28536.qmail@web3809.mail.bbt.yahoo.co.jp> References: <25189231.post@talk.nabble.com> <20090828191709.28536.qmail@web3809.mail.bbt.yahoo.co.jp> Message-ID: <25195846.post@talk.nabble.com> Tatsuro, Thanks for replying to promptly.. I am using Octave 3.2.0, which is the latest Win binary. I believe it is the MinGW version. I am able to compile and call the sample application (d_gcc) but was having problem with my Cpp code. In the meantime, I have found the reason of crash - it was due to an error in my DEFUN_DLD function. Basically, I want to pass an array of Doubles to my C function, say, as follows: x = [10 100 1000 10000] %array of Doubles mycodewrapper(x) %containing func1 as stated earlier, func1 is defined as follows: extern "C" unsigned int func1(double *x); I have tried: Matrix B = args(0).matrix_value(); double* A = B.Rep->data;" but rep is now protected and hence compilation fails. Could you recommend a good way to convert args of DEFUN_DLD into a pointer of doubles. Is there a variation on "double* A = B.data()" which will allow me to cast const double* to double*? Thanks again, Piyush Tatsuro MATSUOKA-2 wrote: > > Hello > > Please show the version of octave and whether it is MSVC version or MinGW > Version. > > Regards > > Tatsuro > --- mishrapiyush wrote: > >> >> Hi all, >> >> I followed the example on wiki >> (http://wiki.octave.org/wiki.pl?OctaveLinkToWindowsDLLs) to compile my >> c/c++ >> code into an .oct file but when I try to call this function, octave >> crashes. >> A snippet of my codes is attached below for your reference. >> >> I had compiled mycode.cpp as Win DLL using MS Visual Studio 2008 and >> tested >> it on Matlab. Next I had copied the mycode.dll and mycode.lib into my >> Octave >> project folder and compiled them with mycodewrapper.cc to generate >> func1.oct, which I call in a matlab function. >> >> I have recetly started using Octave and have spent hours researching the >> process of integrating external function calls. In my opinion, the manual >> (Appendix A.1.9) does not do a good job of explaining C/C++ integration >> and >> should be supplemented with wiki entry mentioned above, which itself >> misses >> to mention that when linking the wrapper with external code, it should be >> done with .lib file and not the .dll file. I would very much appreciate >> any >> help in further resolving this problem. Thanks for your time. >> >> ----------------------------dllmain.cpp------------------------------ >> #include "stdafx.h" >> >> BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID >> lpReserved ) { >> switch (ul_reason_for_call) >> { >> case DLL_PROCESS_ATTACH: >> case DLL_THREAD_ATTACH: >> case DLL_THREAD_DETACH: >> case DLL_PROCESS_DETACH: >> break; >> } >> return TRUE; >> } >> ----------------------------mycode.cpp------------------------------ >> #include >> #include >> >> extern "C" unsigned int func1(double *x); >> >> unsigned int func1(double *x) >> { >> ... >> } >> ----------------------------mycodewrapper.cc------------------------------ >> #include >> >> extern "C" { >> unsigned int func1(double *x); >> } >> DEFUN_DLD (func1, args, , "usage func1('double')" ) { >> octave_value_list retval; >> Matrix B = args(0).matrix_value(); >> double* A; >> *A = B.data(0); >> retval(0) = (double) func1( A ); >> return retval; >> } >> >> -- >> View this message in context: >> http://www.nabble.com/External-C-DLL-crashes-Octave-tp25189231p25189231.html >> Sent from the Octave - General mailing list archive at Nabble.com. >> >> _______________________________________________ >> Help-octave mailing list >> Help-octave at octave.org >> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave >> > > > -------------------------------------- > Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions > http://pr.mail.yahoo.co.jp/ec10years/ > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > -- View this message in context: http://www.nabble.com/External-C-DLL-crashes-Octave-tp25189231p25195846.html Sent from the Octave - General mailing list archive at Nabble.com. From highegg at gmail.com Fri Aug 28 15:01:18 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Fri, 28 Aug 2009 22:01:18 +0200 Subject: External C DLL crashes Octave In-Reply-To: <25195846.post@talk.nabble.com> References: <25189231.post@talk.nabble.com> <20090828191709.28536.qmail@web3809.mail.bbt.yahoo.co.jp> <25195846.post@talk.nabble.com> Message-ID: <69d8d540908281301n575b548bke4400cddd1ff9505@mail.gmail.com> On Fri, Aug 28, 2009 at 9:44 PM, mishrapiyush wrote: > > Tatsuro, > > ?Thanks for replying to promptly.. I am using Octave 3.2.0, which is the > latest Win binary. I believe it is the MinGW version. I am able to compile > and call the sample application (d_gcc) but was having problem with my Cpp > code. > > ? In the meantime, I have found the reason of crash - it was due to an > error in my DEFUN_DLD function. Basically, I want to pass an array of > Doubles to my C function, say, as follows: > x = [10 100 1000 10000] %array of Doubles > mycodewrapper(x) %containing func1 > > as stated earlier, func1 is defined as follows: > extern "C" unsigned int func1(double *x); > > I have tried: > Matrix B = args(0).matrix_value(); > double* A = B.Rep->data;" > ?but rep is now protected and hence compilation fails. > > Could you recommend a good way to convert args of DEFUN_DLD into a pointer > of doubles. Is there a variation on "double* A = B.data()" which will allow > me to cast const double* to double*? > B.Rep->data would be wrong anyway. B.fortran_vec() correctly extracts a writable pointer. hth -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From jwe at octave.org Fri Aug 28 15:08:29 2009 From: jwe at octave.org (John W. Eaton) Date: Fri, 28 Aug 2009 16:08:29 -0400 Subject: External C DLL crashes Octave In-Reply-To: <69d8d540908281301n575b548bke4400cddd1ff9505@mail.gmail.com> References: <25189231.post@talk.nabble.com> <20090828191709.28536.qmail@web3809.mail.bbt.yahoo.co.jp> <25195846.post@talk.nabble.com> <69d8d540908281301n575b548bke4400cddd1ff9505@mail.gmail.com> Message-ID: <19096.14653.83524.802014@segfault.lan> On 28-Aug-2009, Jaroslav Hajek wrote: | On Fri, Aug 28, 2009 at 9:44 PM, mishrapiyush wrote: | > | > Tatsuro, | > | > ?Thanks for replying to promptly.. I am using Octave 3.2.0, which is the | > latest Win binary. I believe it is the MinGW version. I am able to compile | > and call the sample application (d_gcc) but was having problem with my Cpp | > code. | > | > ? In the meantime, I have found the reason of crash - it was due to an | > error in my DEFUN_DLD function. Basically, I want to pass an array of | > Doubles to my C function, say, as follows: | > x = [10 100 1000 10000] %array of Doubles | > mycodewrapper(x) %containing func1 | > | > as stated earlier, func1 is defined as follows: | > extern "C" unsigned int func1(double *x); | > | > I have tried: | > Matrix B = args(0).matrix_value(); | > double* A = B.Rep->data;" | > ?but rep is now protected and hence compilation fails. | > | > Could you recommend a good way to convert args of DEFUN_DLD into a pointer | > of doubles. Is there a variation on "double* A = B.data()" which will allow | > me to cast const double* to double*? | > | | B.Rep->data would be wrong anyway. B.fortran_vec() correctly extracts | a writable pointer. Jaroslav is correct, but does your function actually need to modify its argument? If not, better to declare the argument "const double*" and then pas "B.data ()" to your function. Also, arguments passed to Octave functions are strictly copy on write, so any modification you do make to the contents of B will not appear in the calling context unless you explicitly return the modified value as an output from your function. jwe From mishrapi at ge.com Fri Aug 28 16:15:25 2009 From: mishrapi at ge.com (mishrapiyush) Date: Fri, 28 Aug 2009 14:15:25 -0700 (PDT) Subject: External C DLL crashes Octave In-Reply-To: <19096.14653.83524.802014@segfault.lan> References: <25189231.post@talk.nabble.com> <20090828191709.28536.qmail@web3809.mail.bbt.yahoo.co.jp> <25195846.post@talk.nabble.com> <69d8d540908281301n575b548bke4400cddd1ff9505@mail.gmail.com> <19096.14653.83524.802014@segfault.lan> Message-ID: <25197060.post@talk.nabble.com> Thank you Jaroslav and John. "double* A = B.fortran_vec()" worked like a charm! Just out of curiosity, I also tried type casting "double* A = (double *)B.data()" and that seems to work as well, but I have decided to go with fortran_vec. I also found that I was passing array in row-major format while Matlab and Fortran work on column-major format, so I had to pass transpose of original Matrix to ensure correct execution. John, the reason I am converting the pointer to double * is compatibility of my cpp code - to use the same code on both Matlab and Octave until I am confident of the port. But, I want to ask you guys if I can return an array of double from my function as well? Can I just say: func1(C, A); retval(0) = C; where C is a pointer to doubles. Thanks, Piyush John W. Eaton-3 wrote: > > On 28-Aug-2009, Jaroslav Hajek wrote: > > | On Fri, Aug 28, 2009 at 9:44 PM, mishrapiyush wrote: > | > > | > Tatsuro, > | > > | > ?Thanks for replying to promptly.. I am using Octave 3.2.0, which is > the > | > latest Win binary. I believe it is the MinGW version. I am able to > compile > | > and call the sample application (d_gcc) but was having problem with my > Cpp > | > code. > | > > | > ? In the meantime, I have found the reason of crash - it was due to an > | > error in my DEFUN_DLD function. Basically, I want to pass an array of > | > Doubles to my C function, say, as follows: > | > x = [10 100 1000 10000] %array of Doubles > | > mycodewrapper(x) %containing func1 > | > > | > as stated earlier, func1 is defined as follows: > | > extern "C" unsigned int func1(double *x); > | > > | > I have tried: > | > Matrix B = args(0).matrix_value(); > | > double* A = B.Rep->data;" > | > ?but rep is now protected and hence compilation fails. > | > > | > Could you recommend a good way to convert args of DEFUN_DLD into a > pointer > | > of doubles. Is there a variation on "double* A = B.data()" which will > allow > | > me to cast const double* to double*? > | > > | > | B.Rep->data would be wrong anyway. B.fortran_vec() correctly extracts > | a writable pointer. > > Jaroslav is correct, but does your function actually need to modify > its argument? If not, better to declare the argument "const double*" > and then pas "B.data ()" to your function. Also, arguments passed to > Octave functions are strictly copy on write, so any modification you > do make to the contents of B will not appear in the calling context > unless you explicitly return the modified value as an output from your > function. > > jwe > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > -- View this message in context: http://www.nabble.com/External-C-DLL-crashes-Octave-tp25189231p25197060.html Sent from the Octave - General mailing list archive at Nabble.com. From tmacchant at yahoo.co.jp Fri Aug 28 17:27:31 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Sat, 29 Aug 2009 07:27:31 +0900 (JST) Subject: External C DLL crashes Octave In-Reply-To: <25195846.post@talk.nabble.com> Message-ID: <20090828222731.76730.qmail@web3807.mail.bbt.yahoo.co.jp> Hello If you would like to link to your *.dll source code from octave on MinGW, it is required link with ().dll.a which is produced by MinGW , to my knowledge. For examplle, in the libraries on the GnuWin32 project xxx.dll files. For VC++, xxx.lib anf xxx.def are prepared and for MinGW compiler xxx.dll.a is prepared. Perhaps there are methods build .dll files and linking files (.lib and .def or .dll.a ) for VC++ and MinGW but I do not the way to do that. I think it is easy to build all binaries by MinGW compiler that shipped with octave/mingw32 package. In addition, it is better use to mkoctfile command to build oct files. I have little knowledge of VC++ complier so that I cannot mention anything to use VC++ for octave/mingw32. Regards Tatsuro --- mishrapiy wrote: > > Tatsuro, > > Thanks for replying to promptly.. I am using Octave 3.2.0, which is the > latest Win binary. I believe it is the MinGW version. I am able to compile > and call the sample application (d_gcc) but was having problem with my Cpp > code. > > In the meantime, I have found the reason of crash - it was due to an > error in my DEFUN_DLD function. Basically, I want to pass an array of > Doubles to my C function, say, as follows: > x = [10 100 1000 10000] %array of Doubles > mycodewrapper(x) %containing func1 > > as stated earlier, func1 is defined as follows: > extern "C" unsigned int func1(double *x); > > I have tried: > Matrix B = args(0).matrix_value(); > double* A = B.Rep->data;" > but rep is now protected and hence compilation fails. > > Could you recommend a good way to convert args of DEFUN_DLD into a pointer > of doubles. Is there a variation on "double* A = B.data()" which will allow > me to cast const double* to double*? > > Thanks again, > Piyush > > > Tatsuro MATSUOKA-2 wrote: > > > > Hello > > > > Please show the version of octave and whether it is MSVC version or MinGW > > Version. > > > > Regards > > > > Tatsuro > > --- mishrapiyush wrote: > > > >> > >> Hi all, > >> > >> I followed the example on wiki > >> (http://wiki.octave.org/wiki.pl?OctaveLinkToWindowsDLLs) to compile my > >> c/c++ > >> code into an .oct file but when I try to call this function, octave > >> crashes. > >> A snippet of my codes is attached below for your reference. > >> > >> I had compiled mycode.cpp as Win DLL using MS Visual Studio 2008 and > >> tested > >> it on Matlab. Next I had copied the mycode.dll and mycode.lib into my > >> Octave > >> project folder and compiled them with mycodewrapper.cc to generate > >> func1.oct, which I call in a matlab function. > >> > >> I have recetly started using Octave and have spent hours researching the > >> process of integrating external function calls. In my opinion, the manual > >> (Appendix A.1.9) does not do a good job of explaining C/C++ integration > >> and > >> should be supplemented with wiki entry mentioned above, which itself > >> misses > >> to mention that when linking the wrapper with external code, it should be > >> done with .lib file and not the .dll file. I would very much appreciate > >> any > >> help in further resolving this problem. Thanks for your time. > >> > >> ----------------------------dllmain.cpp------------------------------ > >> #include "stdafx.h" > >> > >> BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID > >> lpReserved ) { > >> switch (ul_reason_for_call) > >> { > >> case DLL_PROCESS_ATTACH: > >> case DLL_THREAD_ATTACH: > >> case DLL_THREAD_DETACH: > >> case DLL_PROCESS_DETACH: > >> break; > >> } > >> return TRUE; > >> } > >> ----------------------------mycode.cpp------------------------------ > >> #include > >> #include > >> > >> extern "C" unsigned int func1(double *x); > >> > >> unsigned int func1(double *x) > >> { > >> ... > >> } > >> ----------------------------mycodewrapper.cc------------------------------ > >> #include > >> > >> extern "C" { > >> unsigned int func1(double *x); > >> } > >> DEFUN_DLD (func1, args, , "usage func1('double')" ) { > >> octave_value_list retval; > >> Matrix B = args(0).matrix_value(); > >> double* A; > >> *A = B.data(0); > >> retval(0) = (double) func1( A ); > >> return retval; > >> } > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/External-C-DLL-crashes-Octave-tp25189231p25189231.html > >> Sent from the Octave - General mailing list archive at Nabble.com. > >> > >> _______________________________________________ > >> Help-octave mailing list > >> Help-octave at octave.org > >> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > >> > > > > > > -------------------------------------- > > Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions > > http://pr.mail.yahoo.co.jp/ec10years/ > > _______________________________________________ > > Help-octave mailing list > > Help-octave at octave.org > > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > > > > > > -- > View this message in context: > http://www.nabble.com/External-C-DLL-crashes-Octave-tp25189231p25195846.html > Sent from the Octave - General mailing list archive at Nabble.com. > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From rcrummett at gmail.com Fri Aug 28 23:07:54 2009 From: rcrummett at gmail.com (Ron Crummett) Date: Fri, 28 Aug 2009 21:07:54 -0700 Subject: exit error Message-ID: I'm getting what I believe to be a bizarre error every time I close out of Octave. When I type 'exit' I get the following message: error: Permission denied terminate called after throwing an instance of 'octave_execution_exception' panic: Aborted -- stopping myself... attempting to save variables to 'octave-core'... save to 'octave-core' complete Aborted Granted, I am at this point closed out of Octave, but...well, any idea why this might be happening? I'm using version 3.2.0 -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090828/8a91295b/attachment-0001.html From jwe at octave.org Fri Aug 28 23:20:52 2009 From: jwe at octave.org (John W. Eaton) Date: Sat, 29 Aug 2009 00:20:52 -0400 Subject: exit error In-Reply-To: References: Message-ID: <19096.44196.226422.400616@segfault.lan> On 28-Aug-2009, Ron Crummett wrote: | I'm getting what I believe to be a bizarre error every time I close out of | Octave. When I type 'exit' I get the following message: | | error: Permission denied | terminate called after throwing an instance of 'octave_execution_exception' | panic: Aborted -- stopping myself... | attempting to save variables to 'octave-core'... | save to 'octave-core' complete | Aborted | | Granted, I am at this point closed out of Octave, but...well, any idea why | this might be happening? I'm using version 3.2.0 What is the permission/ownership of your ~/.octave_hist file? jwe From rcrummett at gmail.com Fri Aug 28 23:28:15 2009 From: rcrummett at gmail.com (Ron Crummett) Date: Fri, 28 Aug 2009 21:28:15 -0700 Subject: exit error In-Reply-To: <19096.44196.226422.400616@segfault.lan> References: <19096.44196.226422.400616@segfault.lan> Message-ID: AHA! That did it. Thanks! -Ron On Fri, Aug 28, 2009 at 9:20 PM, John W. Eaton wrote: > On 28-Aug-2009, Ron Crummett wrote: > > | I'm getting what I believe to be a bizarre error every time I close out > of > | Octave. When I type 'exit' I get the following message: > | > | error: Permission denied > | terminate called after throwing an instance of > 'octave_execution_exception' > | panic: Aborted -- stopping myself... > | attempting to save variables to 'octave-core'... > | save to 'octave-core' complete > | Aborted > | > | Granted, I am at this point closed out of Octave, but...well, any idea > why > | this might be happening? I'm using version 3.2.0 > > What is the permission/ownership of your ~/.octave_hist file? > > jwe > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090828/1ce4fb29/attachment.html From highegg at gmail.com Sat Aug 29 00:36:32 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Sat, 29 Aug 2009 07:36:32 +0200 Subject: External C DLL crashes Octave In-Reply-To: <25197060.post@talk.nabble.com> References: <25189231.post@talk.nabble.com> <20090828191709.28536.qmail@web3809.mail.bbt.yahoo.co.jp> <25195846.post@talk.nabble.com> <69d8d540908281301n575b548bke4400cddd1ff9505@mail.gmail.com> <19096.14653.83524.802014@segfault.lan> <25197060.post@talk.nabble.com> Message-ID: <69d8d540908282236x754d4acfw1c39eb4f0ea964e8@mail.gmail.com> On Fri, Aug 28, 2009 at 11:15 PM, mishrapiyush wrote: > > Thank you Jaroslav and John. "double* A = B.fortran_vec()" worked like a > charm! Just out of curiosity, I also tried type casting "double* A = (double > *)B.data()" and that seems to work as well, but I have decided to go with > fortran_vec. If you're sure your function is not modifying the data, then that is OK, and will actually be more efficient (no copying). Otherwise, it is wrong. I'd suggest using const_cast in the former case - that is more C++ish. Even better is to fix the called function so that it accepts const double*. > I also found that I was passing array in row-major format while > Matlab and Fortran work on column-major format, so I had to pass transpose > of original Matrix to ensure correct execution. Octave also uses column-major format. > > John, the reason I am converting the pointer to double * is compatibility of > my cpp code - to use the same code on both Matlab and Octave until I am > confident of the port. That's no problem - converting double * to a const double * is automatic, so it's still a good idea to declare the argument const double * if it is a read-only pointer. > But, I want to ask you guys if I can return an array > of double from my function as well? Can I just say: > > func1(C, A); > retval(0) = C; > > where C is a pointer to doubles. > No. C must be one of the Array classes - NDArray, Matrix, ColumnVector etc. regards -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From highegg at gmail.com Sat Aug 29 01:00:31 2009 From: highegg at gmail.com (Jaroslav Hajek) Date: Sat, 29 Aug 2009 08:00:31 +0200 Subject: vectorization quiz In-Reply-To: <55538F1C-C35F-40ED-94D6-05F7FC56676D@gmail.com> References: <55538F1C-C35F-40ED-94D6-05F7FC56676D@gmail.com> Message-ID: <69d8d540908282300h3b247579s7c252a33a7bb5d87@mail.gmail.com> On Fri, Aug 28, 2009 at 10:44 AM, Carlo de Falco wrote: > Hi, > I've just come back to work after holidays but my brain seems not to > have noticed, > I'm sure there is an easy way to vectorize the following code but I > just can't see it at the moment... > > Here is the code: > > ?for iel = 1:nel > ? ? for iqn = 1:nqn > ? ? ? shg(:,:,iqn,iel) = J(:, :, iqn, iel) * shg(:,:,iqn,iel); > ? ? endfor > ? endfor > > where nel and nqn are possibly very large and size(J(:, :, iqn, iel)) > = size(shg(:,:,iqn,iel)) = [2 2] > > Can anyone suggest a way to speed this up? > Thanks in advance, > c. Since the leading dims are so tiny, you could even write the matrix multiply loop explicitly for i=1:2; for j = 1:2 shg1(i,j,:,:) = J(i,1,:,:) .* shg(1,j,:,:) + J(i,2,:,:) .* shg(2,j,:,:) endfor;endfor Since each slice on RHS is extracted twice, this could also be sped up by caching them first in a cell array. For a more universal solution to multiplying arrays of matrices, see http://octave.sourceforge.net/doc/f/arraymm.html regards -- RNDr. Jaroslav Hajek computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz From dasergatskov at gmail.com Sat Aug 29 10:43:09 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 29 Aug 2009 10:43:09 -0500 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: References: Message-ID: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> On Sat, Aug 29, 2009 at 12:23 AM, Alex Lancaster wrote: > which produces the error: > > warning: lo_ieee_init: unrecognized floating point format! > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > warning: autoload: `./__java__.oct' is not an absolute file name > mkdir (/tmp/oct-Me8WmG) > untar (/var/tmp/java-1.2.6.tar.gz, /tmp/oct-Me8WmG) > error: memory exhausted or requested size too large for range of Octave's index type -- eval failed > > I'm not sure how to debug much further than this. > I can reproduce this error on FC11 (i386) with octave 3.2.2 as well. I did few steps futher: try to install java package from the octave prompt: octave:1> pkg install java-1.2.6.tar.gz warning: lo_ieee_init: unrecognized floating point format! warning: lo_ieee_init: unrecognized floating point format! warning: lo_ieee_init: unrecognized floating point format! __java__.cc: In function ?void initialize_jvm()?: __java__.cc:385: warning: deprecated conversion from string constant to ?char*? ... < few warnings deleted > ... 2 problems (2 warnings)error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt octave:1> Then I tried to build the package in bash shell with ./configure and make, then it succeeds: 2 problems (2 warnings)rm -f octave.jar jar cf octave.jar org/octave/ClassHelper.class org/octave/OctClassLoader.class org/octave/Octave.class org/octave/OctaveReference.class org/octave/Matrix.class It appears to me that it is this "jar cf ... " command that crashes octave's pkg. So may be it is an octave bug. Crossposting to the octave mailing list... > More details available on the Fedora downstream bug: > > https://bugzilla.redhat.com/show_bug.cgi?id=510841 > > Note that ppc, ppc64 and x86_64 builds all seem to complete correctly. > > Alex > > Dmitri. -- From jwe at octave.org Sat Aug 29 11:07:09 2009 From: jwe at octave.org (John W. Eaton) Date: Sat, 29 Aug 2009 12:07:09 -0400 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> Message-ID: <19097.21037.808667.60387@segfault.lan> On 29-Aug-2009, Dmitri A. Sergatskov wrote: | On Sat, Aug 29, 2009 at 12:23 AM, Alex | Lancaster wrote: | | > which produces the error: | > | > warning: lo_ieee_init: unrecognized floating point format! I think the first thing to do is find why this is happening. It may not solve your other problems, but this is a serious error for Octave, so you should find out why it is happening and fix it. Maybe we should make it fatal instead of just a warning. jwe From dasergatskov at gmail.com Sat Aug 29 11:31:04 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 29 Aug 2009 11:31:04 -0500 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <19097.21037.808667.60387@segfault.lan> References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> Message-ID: <892b16670908290931x2df6e8a8q4ba0152d30dbd510@mail.gmail.com> On Sat, Aug 29, 2009 at 11:07 AM, John W. Eaton wrote: > On 29-Aug-2009, Dmitri A. Sergatskov wrote: > > | On Sat, Aug 29, 2009 at 12:23 AM, Alex > | Lancaster wrote: > | > | > which produces the error: > | > > | > warning: lo_ieee_init: unrecognized floating point format! > > I think the first thing to do is find why this is happening. ?It may > not solve your other problems, but this is a serious error for Octave, > so you should find out why it is happening and fix it. ?Maybe we > should make it fatal instead of just a warning. > > jwe > I suspect it might be the ATLAS lib does some funny optimization replacing fp math with SSE. Is there a simple test program (fortran or c) that would repet the failing test? Dmitri. -- From jwe at octave.org Sat Aug 29 11:44:31 2009 From: jwe at octave.org (John W. Eaton) Date: Sat, 29 Aug 2009 12:44:31 -0400 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <892b16670908290931x2df6e8a8q4ba0152d30dbd510@mail.gmail.com> References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> <892b16670908290931x2df6e8a8q4ba0152d30dbd510@mail.gmail.com> Message-ID: <19097.23279.905801.819343@segfault.lan> On 29-Aug-2009, Dmitri A. Sergatskov wrote: | On Sat, Aug 29, 2009 at 11:07 AM, John W. Eaton wrote: | > On 29-Aug-2009, Dmitri A. Sergatskov wrote: | > | > | On Sat, Aug 29, 2009 at 12:23 AM, Alex | > | Lancaster wrote: | > | | > | > which produces the error: | > | > | > | > warning: lo_ieee_init: unrecognized floating point format! | > | > I think the first thing to do is find why this is happening. ?It may | > not solve your other problems, but this is a serious error for Octave, | > so you should find out why it is happening and fix it. ?Maybe we | > should make it fatal instead of just a warning. | > | > jwe | > | | I suspect it might be the ATLAS lib does some funny optimization | replacing fp math with SSE. Is there a simple test program | (fortran or c) that would repet the failing test? The IEEE init function is octave_ieee_init in liboctave/lo-ieee.cc. Run Octave under GDB, set a breakpoint in this function, then step through it to see what is going on. jwe From jwe at octave.org Sat Aug 29 11:50:16 2009 From: jwe at octave.org (John W. Eaton) Date: Sat, 29 Aug 2009 12:50:16 -0400 Subject: Tab-completion In-Reply-To: <6954688B-219A-45A2-AB02-F1C06E7940ED@yccd.edu> References: <6954688B-219A-45A2-AB02-F1C06E7940ED@yccd.edu> Message-ID: <19097.23624.844952.157579@segfault.lan> On 28-Aug-2009, John B. Thoo wrote: | Hi. I have a question about Tab-completion. I'm using Octave 3.2.2 | on Mac OS X 10.4.11. | | If I want to drill down to the folder | | ~/Desktop/NumMethPractice/ | | for example, in Octave I type | | octave-3.2.2:1> cd ~/Des | | and press Tab to complete the name: | | octave-3.2.2:1> cd ~/Desktop/ | | But if I continue now to type | | octave-3.2.2:1> cd ~/Desktop/Num | | then press Tab to complete the name, nothing happens. Instead I have | to go to a new line and type | | octave-3.2.2:2> cd Num | | and now pressing Tab completes the name to give | | octave-3.2.2:2> cd NumMethPractice/ | | What am I doing wrong? Probably nothing, it's just that filename completion isn't really as functional as it should be. The particular problem here is that Octave normally sets / to be a work-break character for readline completion. It shouldn't do this if it is completing a filename, but the trick is to know when filename completion is happening vs when variable and function name completion is happening. It is not a simple as it seems. I would welcome patches to fix this problem provided that the changes don't break other things. For example, see the recent thread https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2009-August/012986.html jwe From dasergatskov at gmail.com Sat Aug 29 20:10:11 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 29 Aug 2009 20:10:11 -0500 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <19097.21037.808667.60387@segfault.lan> References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> Message-ID: <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> On Sat, Aug 29, 2009 at 11:07 AM, John W. Eaton wrote: > On 29-Aug-2009, Dmitri A. Sergatskov wrote: > > | On Sat, Aug 29, 2009 at 12:23 AM, Alex > | Lancaster wrote: > | > | > which produces the error: > | > > | > warning: lo_ieee_init: unrecognized floating point format! > > I think the first thing to do is find why this is happening. ?It may > not solve your other problems, but this is a serious error for Octave, > so you should find out why it is happening and fix it. ?Maybe we > should make it fatal instead of just a warning. > > jwe > OK. I compiled octave 3.2.3_rc1 against self-compiled combined lapack-3.2.1 + ATLAS-3.9.14 and the ieee warning gone and java package compiles and installs fine. (I had tried 3.2.3_rc1 against Fedora's lapack/blas or ATLAS and it was failing the same way as 3.2.2). Dmitri. -- From dasergatskov at gmail.com Sat Aug 29 20:34:57 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Sat, 29 Aug 2009 20:34:57 -0500 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> Message-ID: <892b16670908291834m4d548791i7066fe902baf3c31@mail.gmail.com> BTW, while looking into this, I checked netlib's paranoia (against gcc version 4.4.1 20090725 (Red Hat 4.4.1-2)) While on x86_64 it passed all tests with flying colors even with highest level of optimization, on i386 it failed quite miserably: =============================== gcc -O0 -o paranoia paranoia.c -lm Running test of square root(x). Testing if sqrt(X * X) == X for 20 Integers X. Test for sqrt monotonicity. sqrt has passed a test for Monotonicity. Testing whether sqrt is rounded or chopped. Square root is neither chopped nor correctly rounded. Observed errors run from -5.0000000e-01 to 5.0000000e-01 ulps. Testing X^((X + 1) / (X - 1)) vs. exp(2) = 7.38905609893065218e+00 as X -> 1. DEFECT: Calculated 7.38905609548934539e+00 for (1 + (-1.11022302462515654e-16) ^ (-1.80143985094819840e+16); differs from correct value by -3.44130679508225512e-09 . This much error may spoil financial calculations involving tiny interest rates. ==================== Now trying with -O2 Checking for guard digit in *, /, and -. SERIOUS DEFECT: - lacks Guard Digit, so cancellation is obscured. Checking rounding on multiply, divide and add/subtract. * is neither chopped nor correctly rounded. / is neither chopped nor correctly rounded. Addition/Subtraction neither rounds nor chops. Sticky bit used incorrectly or not at all. FLAW: lack(s) of guard digits or failure(s) to correctly round or chop (noted above) count as one flaw in the final tally below. Running test of square root(x). Testing if sqrt(X * X) == X for 20 Integers X. Test for sqrt monotonicity. DEFECT: sqrt(X) is non-monotonic for X near 2.0000000e+00 . Testing whether sqrt is rounded or chopped. Square root is neither chopped nor correctly rounded. Observed errors run from -5.5000000e+00 to 5.0000000e-01 ulps. SERIOUS DEFECT: sqrt gets too many last digits wrong. Testing powers Z^i for small Integers Z and i. DEFECT: computing (1.30000000000000000e+01) ^ (1.70000000000000000e+01) yielded 8.65041591938133811e+18; which compared unequal to correct 8.65041591938133914e+18 ; they differ by -1.02400000000000000e+03 . Errors like this may invalidate financial calculations involving interest rates. Similar discrepancies have occurred 4 times. Seeking Underflow thresholds UfThold and E0. FAILURE: multiplication gets too many last digits wrong. Smallest strictly positive number found is E0 = 0 . FAILURE: Either accuracy deteriorates as numbers approach a threshold = 0.00000000000000000e+00 coming down from 0.00000000000000000e+00 or else multiplication gets too many last digits wrong. Testing X^((X + 1) / (X - 1)) vs. exp(2) = 7.38905609893065041e+00 as X -> 1. DEFECT: Calculated 1.00000000000000000e+00 for (1 + (0.00000000000000000e+00) ^ (inf); differs from correct value by -6.38905609893065041e+00 . This much error may spoil financial calculations involving tiny interest rates. Searching for Overflow threshold: This may generate an error. Can `Z = -Y' overflow? Trying it on Y = -inf . finds a FLAW: -(-Y) differs from Y. Overflow threshold is V = -inf . Overflow saturates at V0 = inf . No Overflow should be signaled for V * 1 = -inf nor for V / 1 = -inf . Any overflow signal separating this * from the one above is a DEFECT. FAILURE: Comparisons involving +--inf, +-inf and +-0 are confused by Overflow. SERIOUS DEFECT: X / X differs from 1 when X = -inf instead, X / X - 1/2 - 1/2 = nan . SERIOUS DEFECT: X / X differs from 1 when X = 0.00000000000000000e+00 instead, X / X - 1/2 - 1/2 = nan . The number of FAILUREs encountered = 4. The number of SERIOUS DEFECTs discovered = 4. The number of DEFECTs discovered = 3. The number of FLAWs discovered = 2. The arithmetic diagnosed has unacceptable Serious Defects. Potentially fatal FAILURE may have spoiled this program's subsequent diagnoses. END OF TEST. =========================================== -mieee-fp does not seem to change anything.... FWIW. Dmitri. -- From jwe at octave.org Sat Aug 29 21:21:56 2009 From: jwe at octave.org (John W. Eaton) Date: Sat, 29 Aug 2009 22:21:56 -0400 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> Message-ID: <19097.57924.852567.279897@segfault.lan> On 29-Aug-2009, Dmitri A. Sergatskov wrote: | On Sat, Aug 29, 2009 at 11:07 AM, John W. Eaton wrote: | > On 29-Aug-2009, Dmitri A. Sergatskov wrote: | > | > | On Sat, Aug 29, 2009 at 12:23 AM, Alex | > | Lancaster wrote: | > | | > | > which produces the error: | > | > | > | > warning: lo_ieee_init: unrecognized floating point format! | > | > I think the first thing to do is find why this is happening. ?It may | > not solve your other problems, but this is a serious error for Octave, | > so you should find out why it is happening and fix it. ?Maybe we | > should make it fatal instead of just a warning. | > | > jwe | > | | OK. I compiled octave 3.2.3_rc1 against self-compiled combined | lapack-3.2.1 + ATLAS-3.9.14 and the ieee warning gone and java package | compiles and installs fine. (I had tried 3.2.3_rc1 against Fedora's | lapack/blas or | ATLAS and it was failing the same way as 3.2.2). I was thinking that the version of ATLAS or BLAS shouldn't have anything to do with this warning, but then I realized that we now use D1MACH to compute some machine constants and then compare them against some known values to determine the floating point format (see liboctave/mach-info.cc). The D1MACH function in Octave used to be implemented using some old code from netlib (machar.c) but now uses the DLAMCH function from LAPACK. So I suppose the warning about unrecognized floating point format could happen if the DLAMCH function is miscompiled. jwe From rcrummett at gmail.com Sat Aug 29 22:02:27 2009 From: rcrummett at gmail.com (Ron Crummett) Date: Sat, 29 Aug 2009 20:02:27 -0700 Subject: Package Install Errors Message-ID: Hi - I'm trying to install a few packages under 3.2.0. Some of the packages install fine, others give me an error like this one from the Linear Algebra Toolbox: >> pkg install linear-algebra-1.0.8.tar.gz couldn't create installation directory /usr/lib/octave/packages/3.2/linear-algebra-1.0.8 : Permission denied error: called from `pkg>copy_files' in file /usr/share/octave/3.2.0/m/pkg/pkg.m near line 1473, column 13 error: called from: error: /usr/share/octave/3.2.0/m/pkg/pkg.m at line 756, column 5 error: /usr/share/octave/3.2.0/m/pkg/pkg.m at line 287, column 7 Again, I have installed some packages without problems, so I don't think it's an issue of permissions. Has anyone else had this problem, or does anyone know what needs to change? Thanks. -Ron -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090829/6b34e3ad/attachment.html From tmacchant at yahoo.co.jp Sun Aug 30 02:03:39 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Sun, 30 Aug 2009 16:03:39 +0900 (JST) Subject: Package Install Errors In-Reply-To: Message-ID: <20090830070339.24101.qmail@web3809.mail.bbt.yahoo.co.jp> Hello Please specify your platform (Windows-MinGW, MacOSX, Debian, etc.) and show you are get octave binaries from the distribution or get them by building from sources. BTW , for the question about of the octave-forge package is better to be done on the Mailing list of Octave-Forge project. The description about this, you can find the top page octave-forge homepage as If you have questions regarding software downloaded from Octave-Forge, send a message to the repository mailing list. https://lists.sourceforge.net/lists/listinfo/octave-dev Please use the above when you ask the matter concerning to the octave-forge package from the next post. Regards Tatsuro --- Ron Crummett wrote: > Hi - > > I'm trying to install a few packages under 3.2.0. Some of the packages > install fine, others give me an error like this one from the Linear Algebra > Toolbox: > > >> pkg install linear-algebra-1.0.8.tar.gz > couldn't create installation directory > /usr/lib/octave/packages/3.2/linear-algebra-1.0.8 : Permission denied > error: called from `pkg>copy_files' in file > /usr/share/octave/3.2.0/m/pkg/pkg.m near line 1473, column 13 > error: called from: > error: /usr/share/octave/3.2.0/m/pkg/pkg.m at line 756, column 5 > error: /usr/share/octave/3.2.0/m/pkg/pkg.m at line 287, column 7 > > Again, I have installed some packages without problems, so I don't think > it's an issue of permissions. Has anyone else had this problem, or does > anyone know what needs to change? Thanks. > > -Ron > > _______________________________________________ > Help-octave mailing list > Help-octave at octave.org > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave > -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From tmacchant at yahoo.co.jp Sun Aug 30 03:03:14 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Sun, 30 Aug 2009 17:03:14 +0900 (JST) Subject: Package Install Errors In-Reply-To: <20090830070339.24101.qmail@web3809.mail.bbt.yahoo.co.jp> Message-ID: <20090830080315.70595.qmail@web3807.mail.bbt.yahoo.co.jp> Hello --- Tatsuro MATSUOKA wrote: > BTW , for the question about of the octave-forge package is better to be done on the Mailing > list of > Octave-Forge project. The description about this, you can find the top page octave-forge > homepage as > > If you have questions regarding software downloaded from Octave-Forge, send a message to the > repository mailing list. > > https://lists.sourceforge.net/lists/listinfo/octave-dev > > Please use the above when you ask the matter concerning to the octave-forge package from the > next > post. Sorry the problem is not specific to the linear-algebra-1.0.8.tar.gz so that help at octave.org is proper ML. -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From tmacchant at yahoo.co.jp Sun Aug 30 03:39:19 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Sun, 30 Aug 2009 17:39:19 +0900 (JST) Subject: Package Install Errors In-Reply-To: <20090830070339.24101.qmail@web3809.mail.bbt.yahoo.co.jp> Message-ID: <20090830083919.82073.qmail@web3811.mail.bbt.yahoo.co.jp> > --- Ron Crummett wrote: > > > Hi - > > > > I'm trying to install a few packages under 3.2.0. Some of the packages > > install fine, others give me an error like this one from the Linear Algebra > > Toolbox: > > > > >> pkg install linear-algebra-1.0.8.tar.gz > > couldn't create installation directory > > /usr/lib/octave/packages/3.2/linear-algebra-1.0.8 : Permission denied > > error: called from `pkg>copy_files' in file > > /usr/share/octave/3.2.0/m/pkg/pkg.m near line 1473, column 13 > > error: called from: > > error: /usr/share/octave/3.2.0/m/pkg/pkg.m at line 756, column 5 > > error: /usr/share/octave/3.2.0/m/pkg/pkg.m at line 287, column 7 > > > > Again, I have installed some packages without problems, so I don't think > > it's an issue of permissions. Has anyone else had this problem, or does > > anyone know what needs to change? Thanks. The pkg install command use temporary directory to extract a package, carry out configureation and make binaries. I suspect that your temporary directory does allow 'w' attribution. Please type tmpnam at the octave prompt octave>tmpnam and get the name the temporary directory name and confirm the attribution of the temporary directory octave>ls -l (tmp diretoryname)/.. Regards Tatsuro -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From lindnerben at gmx.net Sun Aug 30 06:31:29 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Sun, 30 Aug 2009 13:31:29 +0200 Subject: colorbar (windows version) In-Reply-To: <20090827095247.31185.qmail@web3804.mail.bbt.yahoo.co.jp> References: <20090827095247.31185.qmail@web3804.mail.bbt.yahoo.co.jp> Message-ID: <4A9A6311.1080506@gmx.net> Tatsuro MATSUOKA wrote: > Hello > > The problem seems to be specific to combination windows terminal of gnuplot for windows and octave > 3.2.x. > > On octave-3.2.0 for cygwin, in which gnuplot works on x11 terminal, colorbar("EastOutside") works as > expected. > > On octave-3.0.5/mingw32, colorbar("EastOutside") works as expected. > > The command > colorbar("EastOutside") > print('colorbar.png','-dpng') > > on octave-3.2.2/mingw32 produces the colorbar.png as expected. > > I looked to see colorbar.m in 3.2.2_gcc-4.3.0\share\octave\3.2.2\m\plot. > The code of colorbar was changed to large amount from that in 3.0.5. > However I could not find what was wrong. > > Any suggestions?? > > ************** > BTW > Hello Benjamin, > colorbar("EastOutside") > print('colorbar.emf','-demf') > > does not works correct. > The color is empty. > It is a bug of gnuplot Version 4.3.0-2008-11-21 CVS. > With the latest gnuplot 4.3.0 for windows > > colorbar("EastOutside") > print('colorbar.emf','-demf') > > works fine. > > In addition gnuplot Version 4.3.0-2008-11-21 CVS has a bug in copy graph in clipboard. > If paste the graph from copied into clipboard from windows terminal as emf style, all lines in the > graph is dashed. > > I suggest you to update the gnuplot 4.3.0 from newer cvs trees. Yes I did that already (at least to a newer shapshot). benjamin From lindnerben at gmx.net Sun Aug 30 07:00:26 2009 From: lindnerben at gmx.net (Benjamin Lindner) Date: Sun, 30 Aug 2009 14:00:26 +0200 Subject: External C DLL crashes Octave In-Reply-To: <25189231.post@talk.nabble.com> References: <25189231.post@talk.nabble.com> Message-ID: <4A9A69DA.9030204@gmx.net> mishrapiyush wrote: > Hi all, > > I followed the example on wiki > (http://wiki.octave.org/wiki.pl?OctaveLinkToWindowsDLLs) to compile my c/c++ > code into an .oct file but when I try to call this function, octave crashes. > A snippet of my codes is attached below for your reference. > > I had compiled mycode.cpp as Win DLL using MS Visual Studio 2008 and tested > it on Matlab. Next I had copied the mycode.dll and mycode.lib into my Octave > project folder and compiled them with mycodewrapper.cc to generate > func1.oct, which I call in a matlab function. > > I have recetly started using Octave and have spent hours researching the > process of integrating external function calls. In my opinion, the manual > (Appendix A.1.9) does not do a good job of explaining C/C++ integration and > should be supplemented with wiki entry mentioned above, which itself misses > to mention that when linking the wrapper with external code, it should be > done with .lib file and not the .dll file. I would very much appreciate any > help in further resolving this problem. Thanks for your time. Well, the fact that you cannot link against a .dll file is fairly obvious, in the sense that it is the way how it is done. If you want to link to a shared library you will need the appropriate import library along with corresponding header files. But if you have the source code available, I'd recommend to compile it from source rather than to use a compiled .dll. It works either way, but it might give you less problems. Move the common core alorithm into a separate source code file and write separate wrappers for octave and matlab. You might have spared you some of the hours of researching of you took a look at many examples on dynamically loaded functions in the examples/ subdirectory of the octave source code, or the source code of the .oct functions which are distributed along with octave. benjamin From david at davidatwilliams.plus.com Sun Aug 30 09:04:20 2009 From: david at davidatwilliams.plus.com (Tokumboh) Date: Sun, 30 Aug 2009 07:04:20 -0700 (PDT) Subject: Problems with installing octave3.2.2 on ubuntu Message-ID: <25211828.post@talk.nabble.com> I first have to admit I am no expert in ubuntu but I have managed to inistall octave 3.0.1 using the standard sudo apt-get install octave command and would like to upgrade to 3.2.2 so I could use some of the packages available So I downloaded octave3.2.2.tar.gz and unzipped it and have tried to follow the instructions on the configure and get the following in the config log http://www.nabble.com/file/p25211828/config.log config.log I am presuming there are loads of errors but the first one seems to be a missing header file and some of the earlier lack of commands such as arch (I am not sure there is one!!!) may also be hindering progress I suppose my first question is there an easier way? Thanks -- View this message in context: http://www.nabble.com/Problems-with-installing-octave3.2.2-on-ubuntu-tp25211828p25211828.html Sent from the Octave - General mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090830/1d129d25/attachment.html From matthias at brennwald.org Sun Aug 30 13:08:43 2009 From: matthias at brennwald.org (Matthias Brennwald) Date: Sun, 30 Aug 2009 20:08:43 +0200 Subject: Problems with installing octave3.2.2 on ubuntu In-Reply-To: References: Message-ID: On Aug 30, 2009, at 7:03 PM, help-octave-request at octave.org wrote: > Message: 1 > Date: Sun, 30 Aug 2009 07:04:20 -0700 (PDT) > From: Tokumboh > Subject: Problems with installing octave3.2.2 on ubuntu > To: help-octave at octave.org > Message-ID: <25211828.post at talk.nabble.com> > Content-Type: text/plain; charset="us-ascii" > > > I first have to admit I am no expert in ubuntu but I have managed to > inistall > octave 3.0.1 using the standard sudo apt-get install octave command > and > would like to upgrade to 3.2.2 so I could use some of the packages > available > > So I downloaded octave3.2.2.tar.gz and unzipped it and have tried to > follow > the instructions on the configure and get the following in the > config log > http://www.nabble.com/file/p25211828/config.log config.log > > I am presuming there are loads of errors but the first one seems to > be a > missing header file and some of the earlier lack of commands such as > arch (I > am not sure there is one!!!) may also be hindering progress > > I suppose my first question is there an easier way? > > Thanks You need to install some headers and other stuff before you can compile Octave. Assuming that Octave 3.2.2 does not require anything else than the version available from the Ubuntu repositories, you can get everything you need by running: sudo apt-get build-dep Octave This will install everything needed to build Octave. Then, try running './configure', 'make' and 'make install'. If you're lucky, you'll have Octave 3.2.2 running after that. Matthias ---- Matthias Brennwald, K?ferholzstrasse 173, CH-8046 Z?rich, +41 44 364 17 03 From david at davidatwilliams.plus.com Sun Aug 30 13:44:47 2009 From: david at davidatwilliams.plus.com (Tokumboh) Date: Sun, 30 Aug 2009 11:44:47 -0700 (PDT) Subject: Problems with installing octave3.2.2 on ubuntu In-Reply-To: <25211828.post@talk.nabble.com> References: <25211828.post@talk.nabble.com> Message-ID: <25214426.post@talk.nabble.com> Thanks I'll give that a go Tokumboh wrote: > > I first have to admit I am no expert in ubuntu but I have managed to > inistall octave 3.0.1 using the standard sudo apt-get install octave > command and would like to upgrade to 3.2.2 so I could use some of the > packages available > > So I downloaded octave3.2.2.tar.gz and unzipped it and have tried to > follow the instructions on the configure and get the following in the > config log http://www.nabble.com/file/p25211828/config.log config.log > > I am presuming there are loads of errors but the first one seems to be a > missing header file and some of the earlier lack of commands such as arch > (I am not sure there is one!!!) may also be hindering progress > > I suppose my first question is there an easier way? > > Thanks > > > -- View this message in context: http://www.nabble.com/Problems-with-installing-octave3.2.2-on-ubuntu-tp25211828p25214426.html Sent from the Octave - General mailing list archive at Nabble.com. From michael.goffioul at gmail.com Sun Aug 30 16:01:35 2009 From: michael.goffioul at gmail.com (Michael Goffioul) Date: Sun, 30 Aug 2009 23:01:35 +0200 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <19097.57924.852567.279897@segfault.lan> References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> <19097.57924.852567.279897@segfault.lan> Message-ID: <128f38bd0908301401r21b04c4ag49d1f77f5d1aa968@mail.gmail.com> On Sun, Aug 30, 2009 at 4:21 AM, John W. Eaton wrote: > I was thinking that the version of ATLAS or BLAS shouldn't have > anything to do with this warning, but then I realized that we now use > D1MACH to compute some machine constants and then compare them against > some known values to determine the floating point format (see > liboctave/mach-info.cc). ?The D1MACH function in Octave used to be > implemented using some old code from netlib (machar.c) but now uses > the DLAMCH function from LAPACK. ?So I suppose the warning about > unrecognized floating point format could happen if the DLAMCH function > is miscompiled. I remember that I had a similar problem when using MSVC/f2c. I don't remember exactly all bits and pieces (as I don't have my laptop under the hand), but I had to disable optimization when compiling the related files in LAPACK. Michael. From jwe at octave.org Sun Aug 30 22:35:31 2009 From: jwe at octave.org (John W. Eaton) Date: Sun, 30 Aug 2009 23:35:31 -0400 Subject: Building octave with large matrices support In-Reply-To: <69d8d540908272318k288eb06fgc343d06a5979d3e@mail.gmail.com> References: <69d8d540908250020w58eb4fdci54a81a5bf25f4662@mail.gmail.com> <19093.39315.466708.135278@segfault.lan> <69d8d540908270400jfb1d72ble72aaafc4f8a2c68@mail.gmail.com> <19094.63881.529202.480384@segfault.lan> <69d8d540908272318k288eb06fgc343d06a5979d3e@mail.gmail.com> Message-ID: <19099.17667.340664.777757@segfault.lan> I replied to this message on the maintainers list since I think that list is more appropriate for this discussion. jwe From carlo.defalco at gmail.com Mon Aug 31 03:40:16 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Mon, 31 Aug 2009 10:40:16 +0200 Subject: vectorization quiz In-Reply-To: <69d8d540908282300h3b247579s7c252a33a7bb5d87@mail.gmail.com> References: <55538F1C-C35F-40ED-94D6-05F7FC56676D@gmail.com> <69d8d540908282300h3b247579s7c252a33a7bb5d87@mail.gmail.com> Message-ID: <420ba0760908310140l11a17253ief1fef42494b6d63@mail.gmail.com> 2009/8/29 Jaroslav Hajek : > On Fri, Aug 28, 2009 at 10:44 AM, Carlo de Falco wrote: >> Hi, >> I've just come back to work after holidays but my brain seems not to >> have noticed, >> I'm sure there is an easy way to vectorize the following code but I >> just can't see it at the moment... >> >> Here is the code: >> >> ?for iel = 1:nel >> ? ? for iqn = 1:nqn >> ? ? ? shg(:,:,iqn,iel) = J(:, :, iqn, iel) * shg(:,:,iqn,iel); >> ? ? endfor >> ? endfor >> >> where nel and nqn are possibly very large and size(J(:, :, iqn, iel)) >> = size(shg(:,:,iqn,iel)) = [2 2] >> >> Can anyone suggest a way to speed this up? >> Thanks in advance, >> c. > > Since the leading dims are so tiny, you could even write the matrix > multiply loop explicitly > for i=1:2; for j = 1:2 > ?shg1(i,j,:,:) = J(i,1,:,:) .* shg(1,j,:,:) + J(i,2,:,:) .* shg(2,j,:,:) > endfor;endfor yes that's actually what I came up with myself but I don't like it very much... > Since each slice on RHS is extracted twice, this could also be sped up > by caching them first in a cell array. > > For a more universal solution to multiplying arrays of matrices, see > http://octave.sourceforge.net/doc/f/arraymm.html This looks much better! I was not aware of this function, thanks for the pointer! > regards c. From tmacchant at yahoo.co.jp Mon Aug 31 05:58:45 2009 From: tmacchant at yahoo.co.jp (Tatsuro MATSUOKA) Date: Mon, 31 Aug 2009 19:58:45 +0900 (JST) Subject: OctaveForWindows Wiki (CategoryInstall) is updated (2009-08-31) Message-ID: <20090831105845.43837.qmail@web3809.mail.bbt.yahoo.co.jp> Hello OctaveForWindows Wiki (CategoryInstall) is updated. http://wiki.octave.org/wiki.pl?OctaveForWindows Topic Octave 3.2.2 on cygwin-1.7.0 is released. Regards Tatsuro -------------------------------------- Thanks 10 years! Yahoo! Shopping and Yahoo! Auctions http://pr.mail.yahoo.co.jp/ec10years/ From alexl at users.sourceforge.net Mon Aug 31 01:28:01 2009 From: alexl at users.sourceforge.net (Alex Lancaster) Date: Sun, 30 Aug 2009 23:28:01 -0700 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> (Dmitri A. Sergatskov's message of "Sat\, 29 Aug 2009 20\:10\:11 -0500") References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> Message-ID: > On 29-Aug-2009, Dmitri A. Sergatskov wrote: >> On Sat, Aug 29, 2009 at 11:07 AM, John W. Eaton wrote: >>> On 29-Aug-2009, Dmitri A. Sergatskov wrote: >> >> | On Sat, Aug 29, 2009 at 12:23 AM, Alex >> | Lancaster wrote: >> | >> | > which produces the error: >> | > >> | > warning: lo_ieee_init: unrecognized floating point format! >> >> I think the first thing to do is find why this is happening. ?It may >> not solve your other problems, but this is a serious error for Octave, >> so you should find out why it is happening and fix it. ?Maybe we >> should make it fatal instead of just a warning. >> >> jwe > OK. I compiled octave 3.2.3_rc1 against self-compiled combined > lapack-3.2.1 + ATLAS-3.9.14 and the ieee warning gone and java > package compiles and installs fine. (I had tried 3.2.3_rc1 against > Fedora's lapack/blas or ATLAS and it was failing the same way as > 3.2.2). Hi Dmitri, That's good news. So what do we need to do to fix this in Fedora rawhide? Update to octave 3.2.3_rc1 for one, obviously, and then do we need to upgrade Fedora's lapack and Atlas packages, or are there additional configuration changes in their (or octave/octave-forge) spec files? Alex From dasergatskov at gmail.com Mon Aug 31 09:13:54 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 31 Aug 2009 09:13:54 -0500 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> Message-ID: <892b16670908310713g6df41d52o62edcc7de58592d3@mail.gmail.com> On Mon, Aug 31, 2009 at 1:28 AM, Alex Lancaster wrote: > Hi Dmitri, > > That's good news. ?So what do we need to do to fix this in Fedora > rawhide? ?Update to octave 3.2.3_rc1 for one, obviously, and then do > we need to upgrade Fedora's lapack and Atlas packages, or are there > additional configuration changes in their (or octave/octave-forge) > spec files? > The main issue is that gcc 4.4.1 appears to have problems on i386. That leads to mis-compiled DLAMCH routine from lapack 3.1.1. I do not know why the problem goes avay with lapack 3.2.1, perhaps it is re-written and more robust now, or it gets compiled with different optimization flags. As things stands now, the octave 3.2.2 (from RPM package) on i386 will not pass "make check" test. > Alex > Dmitri. -- From kmccollough at vixs.com Mon Aug 31 09:19:11 2009 From: kmccollough at vixs.com (Kelvin McCollough) Date: Mon, 31 Aug 2009 10:19:11 -0400 Subject: gnuplot not working in RHEL4 32 bit Message-ID: I have tried recompiling numerous times but the results have been consistenly unsatisfying. It should be noted that I am able to successfully install and plot on a 64 bit machine with RHEL4. Here are the error messages - does anyone know where to look or what might be preventing the tool from working with gnuplot? using octave-3.2.2 with gnuplot 4.3.0. bones:octave-3.2.2 >run-octave warning: lo_ieee_init: unrecognized floating point format! GNU Octave, version 3.2.2 Copyright (C) 2009 John W. Eaton and others. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Octave was configured for "i686-pc-linux-gnu". Additional information about Octave is available at http://www.octave.org. Please contribute if you find this software useful. For more information, visit http://www.octave.org/help-wanted.html Report bugs to (but first, please read http://www.octave.org/bugs.html to learn how to write a helpful report). For information about changes from previous versions, type `news'. octave:1> plot(1:10) error: get: invalid handle (= 1.79769e+308) error: called from: error: /z/users/kmccollough/projects/octave-3.2.2/scripts/plot/__plt_get_axis_arg__.m at line 57, column 9 error: /z/users/kmccollough/projects/octave-3.2.2/scripts/plot/plot.m at line 178, column 18 octave:1> __gnuplot_version__ ans = 4.3.0 octave:2> Thanks, kelvin ________________________________ IMPORTANT CONFIDENTIALITY NOTICE This message and any attached documents contain information from ViXS Systems, Inc. and are confidential and privileged and further subject to any confidentiality agreement between the parties. The information is intended to be viewed only by the individual(s) or entity(ies) to whom the message is addressed. If you are not the intended recipient, be aware that reading, disclosing, copying, distributing or using the contents of this transmission is prohibited. Please notify us immediately if you have received this transmission in error, and delete this message along with any attached files. -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090831/52fa2409/attachment-0001.html From carlo.defalco at gmail.com Mon Aug 31 09:53:25 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Mon, 31 Aug 2009 16:53:25 +0200 Subject: large sparse matrix Message-ID: <420ba0760908310753i7fe60591l9d4d657a6db9dade@mail.gmail.com> Hi, I am using the OSX binary version of octave 3.2.2. I am having trouble solving a linear system with a large but quite sparse coefficient matrix, the problem can be reproduced by: octave-3.2.2:1> mat = sprandn (20e3,20e3,6e-3); octave-3.2.2:2> rhs = ones (20e3, 1); octave-3.2.2:3> x = mat\rhs; octave-3.2.2(56985) malloc: *** mmap(size=2147483648) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug although large, this system seems much smaller than the amount of memory I have on my machine (4Gb), and also smaller than the 32 bit indexing limits. Is this a bug or is there some other limits I should consider that I am forgetting? c. From jwe at octave.org Mon Aug 31 10:10:56 2009 From: jwe at octave.org (John W. Eaton) Date: Mon, 31 Aug 2009 11:10:56 -0400 Subject: gnuplot not working in RHEL4 32 bit In-Reply-To: References: Message-ID: <19099.59392.918490.996138@segfault.lan> On 31-Aug-2009, Kelvin McCollough wrote: | I have tried recompiling numerous times but the results have been consistenly unsatisfying. It should be noted that I am able to successfully install and plot on a 64 bit machine with RHEL4. Here are the error messages - does anyone know where to look or what might be preventing the tool from working with gnuplot? | | using octave-3.2.2 with gnuplot 4.3.0. | | bones:octave-3.2.2 >run-octave | warning: lo_ieee_init: unrecognized floating point format! This is likely your problem. See this thread: https://www-old.cae.wisc.edu/pipermail/help-octave/2009-August/015895.html jwe From dbateman at free.fr Mon Aug 31 10:23:00 2009 From: dbateman at free.fr (dbateman) Date: Mon, 31 Aug 2009 08:23:00 -0700 (PDT) Subject: large sparse matrix In-Reply-To: <420ba0760908310753i7fe60591l9d4d657a6db9dade@mail.gmail.com> References: <420ba0760908310753i7fe60591l9d4d657a6db9dade@mail.gmail.com> Message-ID: <25225293.post@talk.nabble.com> Carlo de Falco-2 wrote: > > Hi, > > I am using the OSX binary version of octave 3.2.2. > I am having trouble solving a linear system with a large but quite > sparse coefficient matrix, the problem can be reproduced by: > > octave-3.2.2:1> mat = sprandn (20e3,20e3,6e-3); > octave-3.2.2:2> rhs = ones (20e3, 1); > octave-3.2.2:3> x = mat\rhs; > octave-3.2.2(56985) malloc: *** mmap(size=2147483648) failed (error > code=12) > *** error: can't allocate region > *** set a breakpoint in malloc_error_break to debug > > > > although large, this system seems much smaller than the amount of > memory I have on my machine (4Gb), and also smaller than the 32 bit > indexing limits. > Is this a bug or is there some other limits I should consider that I > am forgetting? > > Its not a bug.. Trying to factorize a sparse random matrix invariably results in a dense factorization... You need some structure in the original sparse matrix that the factorization can use to keep the factorization sparse... A 20e3-by-20e3 dense matrix is much larger than both the 32bit limit of 2Gvalues and 4GB.. Try using some of the test matrices from the Florida University sparse matrix collection instead as these matrices are derived from real problems and have structure that the factorization can use to keep the matrix sparse. Regards David -- View this message in context: http://www.nabble.com/large-sparse-matrix-tp25224914p25225293.html Sent from the Octave - General mailing list archive at Nabble.com. From carlo.defalco at gmail.com Mon Aug 31 13:03:25 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Mon, 31 Aug 2009 20:03:25 +0200 Subject: large sparse matrix In-Reply-To: <25225293.post@talk.nabble.com> References: <420ba0760908310753i7fe60591l9d4d657a6db9dade@mail.gmail.com> <25225293.post@talk.nabble.com> Message-ID: On 31 Aug 2009, at 17:23, dbateman wrote: > Its not a bug.. Trying to factorize a sparse random matrix invariably > results in a dense factorization... You need some structure in the > original > sparse matrix that the factorization can use to keep the factorization > sparse... A 20e3-by-20e3 dense matrix is much larger than both the > 32bit > limit of 2Gvalues and 4GB.. > > Try using some of the test matrices from the Florida University sparse > matrix collection instead as these matrices are derived from real > problems > and have structure that the factorization can use to keep the matrix > sparse. > > Regards > David David, Thanks for the quick answer! I understand now that the matrix I used in the previous email was not a good example... Though, the matrix that produced the problem in the first place comes from a Galerkin discretization of Stokes' equation, so it does have a very precise structure, it is essentially of the form [A B' 0; B 0 E'; 0 E 0] where A and B are banded, E is a row vector and A is SPD. Also, I tried to save the matix and rhs and solve the system in matlab and it worked fine on the same hardware. I find this particularly puzzling as I thought that both matlab aand Octave ultimately rely on SuiteSparse for solving Sparse linear systems... c. From dbateman at dbateman.org Mon Aug 31 14:53:55 2009 From: dbateman at dbateman.org (David Bateman) Date: Mon, 31 Aug 2009 21:53:55 +0200 Subject: large sparse matrix In-Reply-To: References: <420ba0760908310753i7fe60591l9d4d657a6db9dade@mail.gmail.com> <25225293.post@talk.nabble.com> Message-ID: <4A9C2A53.2060607@dbateman.org> Carlo de Falco wrote: > > On 31 Aug 2009, at 17:23, dbateman wrote: > >> Its not a bug.. Trying to factorize a sparse random matrix invariably >> results in a dense factorization... You need some structure in the >> original >> sparse matrix that the factorization can use to keep the factorization >> sparse... A 20e3-by-20e3 dense matrix is much larger than both the >> 32bit >> limit of 2Gvalues and 4GB.. >> >> Try using some of the test matrices from the Florida University sparse >> matrix collection instead as these matrices are derived from real >> problems >> and have structure that the factorization can use to keep the matrix >> sparse. >> >> Regards >> David > > David, > Thanks for the quick answer! > I understand now that the matrix I used in the previous email was not > a good example... > Though, the matrix that produced the problem in the first place comes > from a Galerkin discretization > of Stokes' equation, so it does have a very precise structure, it is > essentially of the form > > [A B' 0; B 0 E'; 0 E 0] > > where A and B are banded, E is a row vector and A is SPD. > Also, I tried to save the matix and rhs and solve the system in matlab > and it worked fine on the same hardware. > I find this particularly puzzling as I thought that both matlab aand > Octave ultimately rely on > SuiteSparse for solving Sparse linear systems... > > c. > > Yes, but the configuration of SuiteSparse in terms of the pivot threshold is the default that TIm Davis sets for Octave and whatever mathworks chose to use for matlab. So don't expect exactly the behavior. In Octave what does matrix_type(A) give? If it doesn't flag your matrix as PD then there might be an issue with the detection of the matrix and PD and the solver used in Octave will be LU. Also, what does the code [R, p, q] = chol(A); nnz(R) work for Octave and Matlab? If so what is the value of NNZ of the factorization in both cases. Regards David -- David Bateman dbateman at dbateman.org 35 rue Gambetta +33 1 46 04 02 18 (Home) 92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob) From dasergatskov at gmail.com Mon Aug 31 16:49:18 2009 From: dasergatskov at gmail.com (Dmitri A. Sergatskov) Date: Mon, 31 Aug 2009 16:49:18 -0500 Subject: [OctDev] i686-specific install failure in java-1.2.6 In-Reply-To: <892b16670908310713g6df41d52o62edcc7de58592d3@mail.gmail.com> References: <892b16670908290843j5f93847fpcb711086c821394@mail.gmail.com> <19097.21037.808667.60387@segfault.lan> <892b16670908291810l306848d4tced91a502591286a@mail.gmail.com> <892b16670908310713g6df41d52o62edcc7de58592d3@mail.gmail.com> Message-ID: <892b16670908311449m2d369a41v781bfa28b1c78ded@mail.gmail.com> Apparently dlamch used to be compiled on Fedora with -Os optimization. May be it was OK before, but now it is definitely too much. When i recompiled dlamch with "-ffloat-store -O0" (as well as slamch and few others, actually I just replaced -Os flag in the Makefile with "-ffloat-store -O0) lapack works fine. I am not sure if -ffloat-store is redundant in this context, but I decided it would not hurt. I filled a bug report against lapack on Fedora's bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=520518 FYI. Dmitri. -- From carlo.defalco at gmail.com Mon Aug 31 18:12:31 2009 From: carlo.defalco at gmail.com (Carlo de Falco) Date: Tue, 1 Sep 2009 01:12:31 +0200 Subject: large sparse matrix In-Reply-To: <4A9C2A53.2060607@dbateman.org> References: <420ba0760908310753i7fe60591l9d4d657a6db9dade@mail.gmail.com> <25225293.post@talk.nabble.com> <4A9C2A53.2060607@dbateman.org> Message-ID: <67814968-724A-4C38-89A7-01E2D4613C6D@gmail.com> On 31 Aug 2009, at 21:53, David Bateman wrote: > > Yes, but the configuration of SuiteSparse in terms of the pivot > threshold is the default that TIm Davis sets for Octave and whatever > mathworks chose to use for matlab. So don't expect exactly the > behavior. I see... > In Octave what does > > matrix_type(A) > give? >> matrix_type (A) ans = Positive Definite >> > If it doesn't flag your matrix as PD then there might be an issue > with the detection of the matrix and PD and the solver used in > Octave will be LU. on the other hand what surprises me is that: >> issparse (B) ans = 1 >> matrix_type (B) ans = Rectangular >> issparse (A) ans = 1 >> mat = [A B' spalloc(rows(A),1,0); B spalloc(rows(B),columns(A),1) E'; spalloc(columns(A),1,1) E 0]; >> matrix_type (mat) ans = Full >> issparse (mat) ans = 1 why is mat marked as full??? > Also, what does the code > > [R, p, q] = chol(A); > nnz(R) > > work for Octave and Matlab? I tried this in Octave, after 30 min it did not finish yet... I will only be able to try it on Matlab tomorrow. > If so what is the value of NNZ of the factorization in both cases. > > Regards > David Thanks, Carlo From rcrummett at gmail.com Mon Aug 31 21:19:22 2009 From: rcrummett at gmail.com (Ron Crummett) Date: Mon, 31 Aug 2009 19:19:22 -0700 Subject: Package Install Errors In-Reply-To: <20090830083919.82073.qmail@web3811.mail.bbt.yahoo.co.jp> References: <20090830070339.24101.qmail@web3809.mail.bbt.yahoo.co.jp> <20090830083919.82073.qmail@web3811.mail.bbt.yahoo.co.jp> Message-ID: Okay - In regards to the earlier question, I am running Ubuntu Jaunty. 2009/8/30 Tatsuro MATSUOKA > The pkg install command use temporary directory to extract a package, > carry out configureation and > make binaries. > > I suspect that your temporary directory does allow 'w' attribution. > Please type tmpnam at the octave prompt > octave>tmpnam > > and get the name the temporary directory name > > and confirm the attribution of the temporary directory > octave>ls -l (tmp diretoryname)/.. > >> tmpnam ans = /tmp/oct-SZWwgP >> ls -l /tmp/oct-SZWwgP/.. ls: cannot access /tmp/oct-SZWwgP/..: No such file or directory error: ls: command exited abnormally with status 2 error: called from: error: /usr/share/octave/3.2.0/m/miscellaneous/ls.m at line 66, column 2 For what it's worth, every time I type tmpnam I get a different temporary directory. Don't know if that helps or not, but I figure I'll mention it. -Ron -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090831/e4e5ee86/attachment.html From jwe at octave.org Mon Aug 31 22:35:30 2009 From: jwe at octave.org (John W. Eaton) Date: Mon, 31 Aug 2009 23:35:30 -0400 Subject: Package Install Errors In-Reply-To: References: <20090830070339.24101.qmail@web3809.mail.bbt.yahoo.co.jp> <20090830083919.82073.qmail@web3811.mail.bbt.yahoo.co.jp> Message-ID: <19100.38530.937557.654131@segfault.lan> On 31-Aug-2009, Ron Crummett wrote: | Okay - | | In regards to the earlier question, I am running Ubuntu Jaunty. | | 2009/8/30 Tatsuro MATSUOKA | | | > The pkg install command use temporary directory to extract a package, | > carry out configureation and | > make binaries. | > | > I suspect that your temporary directory does allow 'w' attribution. | > Please type tmpnam at the octave prompt | > octave>tmpnam | > | > and get the name the temporary directory name | > | > and confirm the attribution of the temporary directory | > octave>ls -l (tmp diretoryname)/.. | > | >> tmpnam | ans = /tmp/oct-SZWwgP | | >> ls -l /tmp/oct-SZWwgP/.. | ls: cannot access /tmp/oct-SZWwgP/..: No such file or directory | error: ls: command exited abnormally with status 2 | error: called from: | error: /usr/share/octave/3.2.0/m/miscellaneous/ls.m at line 66, column 2 | | For what it's worth, every time I type tmpnam I get a different temporary | directory. Don't know if that helps or not, but I figure I'll mention it. It's supposed to be a file name, not a directory name, and it should be different each time. It should not exist because tmpnam does not create the file, it just generates a name. jwe From rcrummett at gmail.com Mon Aug 31 23:05:23 2009 From: rcrummett at gmail.com (Ron Crummett) Date: Mon, 31 Aug 2009 21:05:23 -0700 Subject: Package Install Errors In-Reply-To: <19100.38530.937557.654131@segfault.lan> References: <20090830070339.24101.qmail@web3809.mail.bbt.yahoo.co.jp> <20090830083919.82073.qmail@web3811.mail.bbt.yahoo.co.jp> <19100.38530.937557.654131@segfault.lan> Message-ID: In that case, I have run it again and the temp directory has full read/write/execute permissions. -Ron On Mon, Aug 31, 2009 at 8:35 PM, John W. Eaton wrote: > On 31-Aug-2009, Ron Crummett wrote: > > | Okay - > | > | In regards to the earlier question, I am running Ubuntu Jaunty. > | > | 2009/8/30 Tatsuro MATSUOKA > | > | > | > The pkg install command use temporary directory to extract a package, > | > carry out configureation and > | > make binaries. > | > > | > I suspect that your temporary directory does allow 'w' attribution. > | > Please type tmpnam at the octave prompt > | > octave>tmpnam > | > > | > and get the name the temporary directory name > | > > | > and confirm the attribution of the temporary directory > | > octave>ls -l (tmp diretoryname)/.. > | > > | >> tmpnam > | ans = /tmp/oct-SZWwgP > | > | >> ls -l /tmp/oct-SZWwgP/.. > | ls: cannot access /tmp/oct-SZWwgP/..: No such file or directory > | error: ls: command exited abnormally with status 2 > | error: called from: > | error: /usr/share/octave/3.2.0/m/miscellaneous/ls.m at line 66, column > 2 > | > | For what it's worth, every time I type tmpnam I get a different temporary > | directory. Don't know if that helps or not, but I figure I'll mention > it. > > It's supposed to be a file name, not a directory name, and it should > be different each time. It should not exist because tmpnam does not > create the file, it just generates a name. > > jwe > -------------- next part -------------- An HTML attachment was scrubbed... URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090831/986d664b/attachment.html