필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
yogya
yogya 2014년 11월 3일
답변: Azzi Abdelmalek 2014년 11월 3일
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
Roger Stafford
Roger Stafford 2014년 11월 3일
편집: Roger Stafford 2014년 11월 3일
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?

댓글을 달려면 로그인하십시오.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 11월 3일
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)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by