Multiply Even Variables in an Array
조회 수: 1 (최근 30일)
이전 댓글 표시
I have initialized an array with values.
I have made a function that will determine if the integers within the array are odd or even. For the integers that are even, I want to multiply them by a set, finite number such as 5.
How would I do this?
댓글 수: 0
답변 (1개)
Steven Lord
2021년 2월 23일
댓글 수: 8
James Tursa
2021년 2월 24일
This is not correct. You need to use the exact same indexing on both sides of the assignment.
Steven Lord
2021년 2월 24일
There are also mismatched parentheses. From the fact that Richard Dillenson said "Thank you" I assume that's an error when the solution was copy-and-pasted into Answers not an error in the code they ran.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
