Filter löschen
Filter löschen

how to perform logical operation between 2 vectors of different length??

3 Ansichten (letzte 30 Tage)
yogya
yogya am 3 Nov. 2014
Beantwortet: Azzi Abdelmalek am 3 Nov. 2014
here i my m = [1 1 1 1 0 0 0 ] x = [1 0 1 1 1 1 1 0 0 0 1 1 0 0 0] then how can i perform logical operations on them
  1 Kommentar
Roger Stafford
Roger Stafford am 3 Nov. 2014
Bearbeitet: Roger Stafford am 3 Nov. 2014
Please show us examples of what results you would expect from such logical operations. As things stand, it would be a guessing game to try to answer your request. In particular how would you expect the various logical bits you show to to be matched up in performing such logic operations? If you wanted to do an AND (&), which bits from 'm' and/or 'x' would be used?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 3 Nov. 2014
m = [1 1 1 1 0 0 0 ]
x = [1 0 1 1 1 1 1 0 0 0 1 1 0 0 0]
y=bsxfun(@and,m',x)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by