modify all numbers from same column in workspace

1 回表示 (過去 30 日間)
MARIA ARISTA ROMERO
MARIA ARISTA ROMERO 2020 年 9 月 18 日
Hi, I have a single column in the workspace and I need to add or rest the same value to all the numbers of the column, but I am not quite how to do it.
Example
1
2
3
1
2
add +1
results
2
3
4
2
3
Thanks!

採用された回答

Arthur Roué
Arthur Roué 2020 年 9 月 18 日
% Your vectecor
v = [1 2 3 1 2];
% Simply add 1 to your vector
v_plus_one = v + 1;
v_plus_one =
2 3 4 2 3
  1 件のコメント
MARIA ARISTA ROMERO
MARIA ARISTA ROMERO 2020 年 9 月 18 日
thanks a lot! that's exactly what I needed!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEncryption / Cryptography についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by