help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help-octave Digest, Vol 38, Issue 13


From: Kesava Prasad
Subject: Re: Help-octave Digest, Vol 38, Issue 13
Date: Thu, 7 May 2009 12:59:15 +0530

Any one knows how to access openCV from octave?

On Wed, May 6, 2009 at 10:33 PM, <address@hidden> wrote:
Send Help-octave mailing list submissions to
       address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
       https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
or, via email, send a message with subject or body 'help' to
       address@hidden

You can reach the person managing the list at
       address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Help-octave digest..."


Today's Topics:

  1. Re: Writing a commented output to file (AlexG1)
  2. Re: Writing a commented output to file (Jaroslav Hajek)
  3. Re: Print syntax (Ben Abbott)
  4. Re: Octave as a module for Python (David Grundberg)
  5. where does octave set its path (miggy)


----------------------------------------------------------------------

Message: 1
Date: Wed, 6 May 2009 03:38:04 -0700 (PDT)
From: AlexG1 <address@hidden>
Subject: Re: Writing a commented output to file
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii




John W. Eaton-3 wrote:
>
>
> Here's one more way:
>
>   fid = fopen ('foo.dat', 'w');
>   fprintf (fid, '%% Some comment 1\n%% Some comment 2\n');
>   nc = size (x, 2);
>   fmt = sprintf ('%s\n', repmat ('%f ', [1, nc]));
>   fprintf (fid, fmt, x');
>
>
>

Thanks, works great.
There's something I didn't understand though - can you please explain why
the transpose on the fprintf() call is needed?
--
View this message in context: http://www.nabble.com/Writing-a-commented-output-to-file-tp23385991p23404086.html
Sent from the Octave - General mailing list archive at Nabble.com.



------------------------------

Message: 2
Date: Wed, 6 May 2009 12:56:21 +0200
From: Jaroslav Hajek <address@hidden>
Subject: Re: Writing a commented output to file
To: AlexG1 <address@hidden>
Cc: address@hidden
Message-ID:
       <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1

On Wed, May 6, 2009 at 12:38 PM, AlexG1 <address@hidden> wrote:
>
>
>
> John W. Eaton-3 wrote:
>>
>>
>> Here's one more way:
>>
>> ? fid = fopen ('foo.dat', 'w');
>> ? fprintf (fid, '%% Some comment 1\n%% Some comment 2\n');
>> ? nc = size (x, 2);
>> ? fmt = sprintf ('%s\n', repmat ('%f ', [1, nc]));
>> ? fprintf (fid, fmt, x');
>>
>>
>>
>
> Thanks, works great.
> There's something I didn't understand though - can you please explain why
> the transpose on the fprintf() call is needed?

because fprintf always traverses the data in the memory storage order,
i.e. columns first (as if "x(:)" was used).

regards

--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



------------------------------

Message: 3
Date: Wed, 06 May 2009 06:56:48 -0400
From: Ben Abbott <address@hidden>
Subject: Re: Print syntax
To: J?rg Schreiber <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=WINDOWS-1252; format=flowed


On May 6, 2009, at 4:30 AM, J?rg Schreiber wrote:

> Hi,
>
> what ist the correct syntax for printing (platform: cygwin)
>
> I tried different syntaxes like
>
> print(?name?, ?-dDEVICE?,?pdf?)
>
> but none was successful.

print ("-dpdf", "name.pdf")

or

print -dpdf, name.pdf

or

print name.pdf

Ben





------------------------------

Message: 4
Date: Wed, 06 May 2009 14:34:51 +0200
From: David Grundberg <address@hidden>
Subject: Re: Octave as a module for Python
To: Jaroslav Hajek <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"

Jaroslav Hajek skrev:
> On Tue, May 5, 2009 at 9:32 PM, David Grundberg <address@hidden> wrote:
>
>> Announcing Pytave
>
> Hi David,
>
> I have wrapped also the "eval" function into pytave - see the attached
> patch (created using bzr diff). How should I go about it? Should
> contributions be reported as bugs using the launchpad tracker? Sorry I
> have no experience with neither bazaar nor launchpad.
>
> summary:
> "eval" is provided as a wrapper to eval_string (parse.h). In
> principle, this could be achieved more simply using feval("eval", but
> the advantages are:
> 1. faster (avoids double call and double conversion of code string)
> 2. explicit control of printing rather than implicitly with nargout (as in eval)
> 3. a separate exception class for parse error
>
> regards
>
>
Hi Jaroslav,

Glad to see you improving my software! As your patch is of a manageable
size, you might as well open a bug report and attach your patch.

I have some comments

1. As the code stands, it is not possible to catch pytave.ParseError.
([module pytave has] "no attribute 'ParseError'") In order to be
correctly declared, the octave_parse_exception will have to be returned
by the _pytave::get_exceptions function and correctly assigned to a
symbol named ParseError in pytave.py.
2. It's unnecessary to duplicate the value conversion documentation, I
think it'll be easier to maintain if it just referred to feval.

I'm attaching a modified patch as a suggestion. I modified the semantics
of the nargout parameter since 0 is valid input.

Furthermore, I see that the builtin eval function accepts a second code
string, CATCH. What are the purpose of this argument, and why did you
not include it?

sincerely,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pytave_eval_suggest.patch
Type: text/x-patch
Size: 11314 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090506/9bbe3bbe/attachment-0001.bin

------------------------------

Message: 5
Date: Wed, 6 May 2009 09:20:12 -0700 (PDT)
From: miggy <address@hidden>
Subject: where does octave set its path
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii


I can set it myself in my $HOME/.octaverc but I don't see where octave has it
set.  Specifically, if I install a forge package it updates the path but I
don't see what file it's doing this too.  I don't see anything relevent in
/usr/share/octave/m/startup/.

I'm using Linux and octave 3.0.5

Thanks,
Miggy
--
View this message in context: http://www.nabble.com/where-does-octave-set-its-path-tp23410323p23410323.html
Sent from the Octave - General mailing list archive at Nabble.com.



------------------------------

_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


End of Help-octave Digest, Vol 38, Issue 13
*******************************************


reply via email to

[Prev in Thread] Current Thread [Next in Thread]