Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

2 Ansichten (letzte 30 Tage)
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 Kommentar
Geoff Hayes
Geoff Hayes am 4 Jul. 2015
Bearbeitet: Geoff Hayes am 5 Jul. 2015
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.

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by