help-octave
[Top][All Lists]
Advanced

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

Re: Help with Octave


From: guillem
Subject: Re: Help with Octave
Date: Wed, 19 Jul 2006 23:41:54 +0200
User-agent: Mutt/1.5.9i

Try to use the function dbtype. For instance:

octave:1> dbtype polyfit
1       ## Copyright (C) 1996, 1997 John W. Eaton
2       ##
3       ## This file is part of Octave.
4       ##
5       ## Octave is free software; you can redistribute it and/or 
6       ## under the terms of the GNU General Public License as
... snip ...

About vectorization.  This is a general topic about programming but
you shouldn't understand vectorization to use it in Octave.  The only
thing you must remember is to avoid trivial for loops in matrix
computations.

You will never sum two matrices like this (scalar sum)

for i=1:n
  for j=1:m
    c(i,j)=a(i,j)+b(i,j);
  end
end

It's faster and more readable just to sum the matrices (vectorial
sum):

c=a+b

guillem


On Wed, Jul 19, 2006 at 01:40:27PM -0700, asha g wrote:
> 
> I am based in Kerala, India and am a new user of
> OCTAVE. I have just joined the users gp. I am working
> on a finite
> > difference scheme applied to the cable equation in
> > the
> > brain. I am doing my programming in OCtave. 
> > 
> > I am running into some trouble and am wondering if
> > someone could help me sort this.
> 
> * as I don't have an editor ( emacs or vi) installed
> in my computer yet, I am using notepad. However this
> does not seem to give line numbers so that I can
> figure out the error messages> Any idea of how to get
> it to do that?
> > 
> > * it is said that vectorizing the program would make
> > it
> > easier for the computer ( faster?) as opposed to
> > using
> > 'for ' loops'. I have searched the web and don't
> > find
> > any easy tutorial to understand this vectorizing
> > process. Could someone please help me?
> > 
> > > 
> > Thanks very much.
> > 
> > Asha Gopinathan
> > 
> > 
> > 
> >  
> >    
> >    
> >    
> >   Goals too clearly defined can become blinkers. 
> >   Mary Catherine Bateson 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > http://mail.yahoo.com 
> > 
> 
> 
>  
>    
>    
>    
>   Goals too clearly defined can become blinkers. 
>   Mary Catherine Bateson 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

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