필터 지우기
필터 지우기

How can use isempty function or another function in matlab??

조회 수: 2 (최근 30일)
arkedia
arkedia 2013년 2월 5일
i didn't know how to use isempty function
for example:
the first matrix from simulation=[18 1 0 0 0;12 0 0 0 1;15 1 1 0 0] and the second matrix from simulation=[25 0 0 0 0;30 1 1 0 0;14 0 0 1 0] and the thierd matrix from simulation=[50 1 0 0 0;12 0 0 1 0;24 1 1 1 0] I used the following function :idxfun=@(x)find(ismember(x(:,2:end),[1 0 0 0],'rows')) :::::: a=the first matrix(idxfun(the first matrix),:)the answer is as follows: 18 1 0 0 0 the second matrix answer is:: empty matrix:0-by-5 then the simulation stop!! what i want is to make the simulation continue and go to the next matrix and in this example the answer will be 50 1 0 0 0

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 5일
if ~isempty(x)
% your code
else
%
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by