switch case
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
Good Morning All,
I have been trying to understand the function reference for matlab switch case and cannot figure out what is meant by the expression.
I wish to implement the following:
given T=[T(1),T(2),T(3)]; B=[B(1),B(2),B(3)];
if T(1)=B(1)&&T(2)=B(2) do this
if T(1)!=B(1) do this
if T(2)!=B(2) do this.
Any suggestions?
thanks,
Mel
댓글 수: 1
  Daniel Shub
      
      
 2012년 3월 26일
				This doesn't look like something that can be used in a switch statement. If looks more like if/elseif/elseif/else
답변 (1개)
  Rick Rosson
    
 2012년 3월 26일
           if T(1) == B(1)
      if T(2) == B(2)
         ...
      end
   else
      ...
   end
   if T(2) ~= B(2)
      ...
   end
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


