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

5 views (last 30 days)
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:

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 6 Dec 2021
A=1:100;
A(1:5)=A(1:5)*3

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!