isodd(A,class)

버전 1.0 (1.1 KB) 작성자: Said BOUREZG
ISODD True for set odd
다운로드 수: 22
업데이트 날짜: 2017/5/13

라이선스 보기

ISODD True for set odd.
LIA = ISODD(A) for array, matrice, or value A returns an array of the
same size as A containing true where the elements of A are odd and false otherwise.

LIA = ISODD(A,'char') for character array (string) A returns an array of the
same size as A containing true where the elements of A are odd and false
otherwise.

% Examples:
%
% a = 119
%
% lia1 = isodd(a)
% % returns
% lia = 1
%
% a = [9 9 8 8 7 7 7 6 6 6 5 5 4 4 2 1 1 1]
%
% lia1 = isodd(a)
% % returns
% lia = [1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1]
%
%
% a = '10'
%
% lia1 = isodd(a,'char')
% % returns
% lia = 0
%
%
% a = {'11', '9', '12', '8', '5', '11', '7', '8', '6', '14', '101', '5', '4'}
%
% lia1 = isodd(a)
% % returns
% lia = [1 1 0 0 1 1 1 0 0 0 1 1 0]

인용 양식

Said BOUREZG (2024). isodd(A,class) (https://www.mathworks.com/matlabcentral/fileexchange/62928-isodd-a-class), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Numeric Types에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0