help-octave
[Top][All Lists]
Advanced

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

Re: a try-if construction


From: JokerOne
Subject: Re: a try-if construction
Date: Wed, 10 Jun 2015 00:53:44 -0700 (PDT)

Hi Vic,

to be honest, I do not fully understand what you actually want to do?

For the output you got, maybe something like that is more straightforward?

   K = [ 1   30   48 ];
   n = 109;
   K_helper = [K,n]; % "attach" n to K

   for i = 1 : (length(K_helper)-1)
      
       k0 = K_helper(i);
       k1 = K_helper(i+1);
       printf("i = %d, k0 = %d, k1 = %d\n", i, k0, k1);
   
   endfor 



--
View this message in context: 
http://octave.1599824.n4.nabble.com/a-try-if-construction-tp4670769p4670777.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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