help-octave
[Top][All Lists]
Advanced

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

Re: can't perform indexing operations for <unknown type> type


From: Kocsis Attila
Subject: Re: can't perform indexing operations for <unknown type> type
Date: Mon, 23 May 2005 03:06:25 -0700 (PDT)

Yep, it's a problem of inserting, the code itself
doesn't contain broken line. 

I'm also running octave 2.1.69-1 on Debian sarge (64
and 32 bit versions) and got results seem to be fine,
so don't catch what can be wrong. 

The error message is only that one line I've inserted
in the subject (or can I read more about this error
somewhere???).
I've enclosed the .m file if it helps...

Thanks a lot
Atis



--- Geraint Paul Bevan <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Kocsis Attila wrote:
> >  Yes, of course. Sorry for thinking that it's
> > something
> >  general and somebody can answer it without seeing
> the
> >  code...
> >
> >  So the code is:
> >
> 
> 
> There seems to have been some problem when you
> inserted the code into
> the message:
> 
> ...
> >>            for m = 2:(N-1)
> >>            a(m+1) = 2*a(m) - a(m-1) -
> >>-N-m+1)*f*cos(a(m));
> >>    end
> ...
> 
> However, modifying the broken line to remove the
> syntax error, the code
> runs fine using Octave 2.1.69 on Debian and does not
> produce any warning
> or error message.
> 
> 
> >  That is. Nothing special, and the result is as it
> >  should be, I just don't understand what is this
> > report
> >  then:
> >  error: can't perform indexing operations for
> <unknown
> >  type> type
> >  I'm quite new to octave, before I had used some
> >  Matlab, and I guess it would be OK on that...
> 
> 
> If you want help debugging this problem, you will
> have to let us know
> the full error message that you are getting as well
> as the version of
> Octave that you are using, the platform on which it
> is running, etc. and
> an accurate copy of the code that you are trying to
> run (adding it as an
> attachment is generally better than cutting and
> pasting into the email).
> 
> Have a look at the guidelines for bug reporting at:
> http://www.octave.org/bugs.html
> 
> - --
> Geraint Bevan
> http://homepage.ntlworld.com/geraint.bevan
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
>
iEYEARECAAYFAkKRpa8ACgkQcXV3N50QmNOzDACffz11z7xi0+FU2xLZEA9NmUSF
> icIAoI0Xe+j3eqNxshPubyyQJ3SHkwZu
> =/P3d
> -----END PGP SIGNATURE-----
> 
> 
> 
>
-------------------------------------------------------------
> Octave is freely available under the terms of the
> GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects: 
> http://www.octave.org/funding.html
> Subscription information: 
> http://www.octave.org/archive.html
>
-------------------------------------------------------------
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
% Input variables:
        clear all
        N = 20;                 
        icrf = 0.001;           
        elf = -2;  
        vef = 2;                
        icr = 0.001;    
        el = -2*pi;     
        ve = 2*pi;      
        
        la = fopen('/home/atis/dat/N20.2n2n001.dat', 'wt');     
        
        
%%%%%%%%%%% Begining of Iteration %%%%%%%%%%%%%

for f = elf:icrf:vef
        zfp = 0;                        
        
 for k = el:icr:ve
    
         a(1) = k;
         a(2) = 2*a(1) - N*f*cos(a(1));

        for m = 2:(N-1)
                a(m+1) = 2*a(m) - a(m-1) - (N-m+1)*f*cos(a(m));
        end
                zfn = a(N-1) + f*cos(a(N)) - a(N);      
                                                
                                        
        if (zfn*zfp < 0)        

                a0 = (a(1) + b)/2;
                fprintf(la, '%f   %f\n', a0,f);         
        end
        
         b = a(1); 
         zfp = zfn;
        
 end
end

%%%%%%%%%%% End of Iteration %%%%%%%%%%%%%%

        
        fclose(la);

reply via email to

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