[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
values in a column vector between two scalars?
From: |
pvkd44 |
Subject: |
values in a column vector between two scalars? |
Date: |
Fri, 18 Mar 2011 10:01:36 -0700 (PDT) |
Hi, this is my first week using Octave.
if I have a column vector A:
1
2
3
4
5
6
7
8
9
And two scalars: B = 3, C = 7
How do I make a new column vector D from A, only using the values which lie
between B and C ?
I would like D to be:
3
4
5
6
7
I have tried to do this using a for statement as follows:
for A >= B && A <= C
D = A
endfor
But I'm given a syntax error.
Any suggestions appreciated.
Regards
Max
--
View this message in context:
http://octave.1599824.n4.nabble.com/values-in-a-column-vector-between-two-scalars-tp3387800p3387800.html
Sent from the Octave - General mailing list archive at Nabble.com.
- values in a column vector between two scalars?,
pvkd44 <=