필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Modify the following program in order to have the same behavior but using vector operators instead of the while cycle

조회 수: 2 (최근 30일)
a = ceil(10*rand(1, 10)); index = 1;
while index <= 10
if ceil(a(index)/2) == floor(a(index)/2) index = index + 1;
continue
end;
a(index)
index = index + 1;
end;
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2015년 7월 4일
편집: Geoff Hayes 2015년 7월 5일
Taylie - what exactly is your question? You seem to have posted (in the title) the homework assignment and (in the body) the code that you have to modify. Please make an attempt at solving the problem. If there is something that you don't understand, then please ask and we will provide guidance.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by