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

4 vues (au cours des 30 derniers jours)
Alexander Black
Alexander Black le 6 Déc 2021
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:

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 6 Déc 2021
A=1:100;
A(1:5)=A(1:5)*3

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by