help-octave
[Top][All Lists]
Advanced

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

Re: building dynamic ranges from matrix


From: avlas
Subject: Re: building dynamic ranges from matrix
Date: Tue, 21 Nov 2017 18:53:15 -0500

El dimarts, 21 de novembre de 2017, a les 18:46:57 EST, AG va escriure:

  Much appreciated.   The only challenge with this is it uses an array fun -
  which I was trying to avoid since I have a LOT of data and arrayfun seems to
  be slower due to using loops in its implementation. What provided is good
  because it generalizes to any number of rows.  At runtime, the array of
  range start end numbers is build and the number of rows is unknown so I
  can't do something like:
  
  rse = [1,5 ; 4 7];
  a=[rse(1,1) : rse(1,2) , rse(2,1):rse(2,2)]
  which was proposed by Doug.
  
  Perhaps this can't be done without looping.
  
  
  
  --
  Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
  
  _______________________________________________
  Help-octave mailing list
  address@hidden
  https://lists.gnu.org/mailman/listinfo/help-octave
  
Sounds good. I thought it was for an arbitrary N in:

> Given a N X 2 matric, build a single vector that contains the range of
> numbers between (:,1) and (:,2). 

a.



reply via email to

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