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: Multiplying Double and a Logical
Replies: 5   Last Post: Jun 21, 2012 10:25 AM

Advanced Search

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

Posts: 8,260
Registered: 6/7/07
Re: Multiplying Double and a Logical
Posted: Jun 18, 2012 11:45 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 6/18/2012 9:26 PM, Michael wrote:
> Alright,
>
> I tried using
>

>>> plot(x(l),y(l))
>>> x=[1 2 3 NaN];

> y=[1 3 5 7];
> l=logical(1 1 0 1);
> plot(x(l),y(l))
>
> and I got an error:
> l=logical(1 1 0 1);
> |
> Error: Unexpected MATLAB expression.

...

Typo, sorry---

l=logical([1 1 0 1]);

--




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.