Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
logic vector

Subject: logic vector

From: Wendy

Date: 2 May, 2010 04:34:03

Message: 1 of 3

Hi all,

I have a logic vector, for example [1 0 0 1]. I want to change it to [0 1 1 0]. Can anyone point me the function that does it? Thank you.

Wendy

Subject: logic vector

From: Walter Roberson

Date: 2 May, 2010 04:52:41

Message: 2 of 3

Wendy wrote:

> I have a logic vector, for example [1 0 0 1]. I want to change it to [0
> 1 1 0]. Can anyone point me the function that does it? Thank you.

About a month ago, we had a run of messages on all the different ways we
could think of to program this. We got up to 20, at least.

I suggest that you search mathworks.com for "logical operators" to see
the most direct method.

Subject: logic vector

From: Loren Shure

Date: 3 May, 2010 17:38:15

Message: 3 of 3

In article <hrivbr$ck0$1@fred.mathworks.com>, wlq121@gmail.com says...
> Hi all,
>
> I have a logic vector, for example [1 0 0 1]. I want to change it to [0 1 1 0]. Can anyone point me the function that does it? Thank you.
>
> Wendy
>

Investigate the ~ operator

--
Loren
http://blogs.mathworks.com/loren
http://matlabwiki.mathworks.com/MATLAB_FAQ

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us