Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: problem finding a value
Replies: 3   Last Post: Jan 21, 2013 2:26 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 8
Registered: 11/27/12
problem finding a value
Posted: Jan 21, 2013 10:39 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

i have a vector like this:

x_x =

1.0e+002 *

Columns 1 through 3

1.000000000000000 -0.953406571178785 -1.542839603993645

Columns 4 through 5

-2.146721794700071 -3.268216911140570

now i say:
if any(x_x < 2.5) && any(x_x > -5)
do something: A
do something else: B

why does the program always do A??
i just want it to do A if some value inside x_x is between -5 and 2.5!
i really dont understand....

any help is appreciated..
thank you in advance

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.