How to delete multiple of the Value in Array

4 次查看(过去 30 天)
Hello, I have the following array I want to delete the values, which are multiple of any values
How can i do that in MATLAB
  1 个评论
Rik
Rik 2022-12-29
Why did you post a duplicate question instead of responding that this isn't what you wanted?

请先登录,再进行评论。

采纳的回答

C B
C B 2022-12-20
A = [1 2 3 4 5 6 7 8 9 10] % Initial array
A = 1×10
1 2 3 4 5 6 7 8 9 10
A(mod(A,3) == 0) = [] % Delete elements that are multiples of 3
A = 1×7
1 2 4 5 7 8 10

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by