How to write a function that performs the same as the build-in function isequal?
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
How to write a function that performs the same as the build-in function isequal?
답변 (1개)
  Image Analyst
      
      
 2022년 2월 20일
        function theSame = myEqual(ver1, var2)
theSame = isequal(var1, var2);
If that's not acceptable then you'd have to write cases for all kinds of variables.  You'd have to check the variable type of each, and if they're not the same, immediately return false.  If they are the same, like they're both matrices you'd have to check things like the number of elements or number of rows and columns.
댓글 수: 1
  Stephen23
      
      
 2022년 2월 21일
				Also it will likely require some recursive local function to handle container types.
참고 항목
카테고리
				Help Center 및 File Exchange에서 Spline Postprocessing에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



