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: What am I missing here?
Replies: 5   Last Post: Jan 28, 2013 11:03 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
gautamsethi@gmail.com

Posts: 24
Registered: 10/20/05
Re: What am I missing here?
Posted: Jan 26, 2013 7:18 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Saturday, January 26, 2013 7:13:27 PM UTC-5, Gautam Sethi wrote:
> Folks, this is driving me nuts! Can someone explain what may be going on?
>
>
>

> >> X = [0 .1 .2 .3 .4]
>
>
>
> X =
>
>
>
> 0 0.1000 0.2000 0.3000 0.4000
>
>
>

> >> X(4) == .3
>
>
>
> ans =
>
>
>
> 1
>
>
>

> >> Y = [0:.1:.4]
>
>
>
> Y =
>
>
>
> 0 0.1000 0.2000 0.3000 0.4000
>
>
>

> >> Y(4) == .3
>
>
>
> ans =
>
>
>
> 0
>
>
>

> >> intersect(X,Y)
>
>
>
> ans =
>
>
>
> 0 0.1000 0.2000 0.4000
>
>
>

> >> X(2) == .1
>
>
>
> ans =
>
>
>
> 1
>
>
>

> >> Y(2) == .1
>
>
>
> ans =
>
>
>
> 1


Even more bizarre:

>> intersect(X,round(Y*10)/10)

ans =

0 0.1000 0.2000 0.3000 0.4000



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

[Privacy Policy] [Terms of Use]

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