How do I multiply the first 50 values of an array?

조회 수: 3 (최근 30일)
Alexander Black
Alexander Black 2021년 12월 6일
답변: Fangjun Jiang 2021년 12월 6일
I'm supposed to multiply the first 50 values of an array containing 1200 values by 3. How do I do this?
This is what my array looks like:

채택된 답변

Fangjun Jiang
Fangjun Jiang 2021년 12월 6일
A=1:100;
A(1:5)=A(1:5)*3

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by