Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to access data?

1 回表示 (過去 30 日間)
Tshering Lhamo
Tshering Lhamo 2016 年 4 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
With a data as follows:
8
4
1
7
65
66
399
318
489
63
64
8
4
1
63
489
318
400
319
499
61
62
If I wanted to get the numbers excluding 8, 4 and 1.. how should I go about? When I try to access, it says "function invalid for input argument type 'double'. Thanks.

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 4 月 4 日
x = [8
4
1
7
65
66
399
318
489
63
64
8
4
1
63
489
318
400
319
499
61
62];
x_without = x(~ismember(x, [8, 4, 1]);
  1 件のコメント
Tshering Lhamo
Tshering Lhamo 2016 年 4 月 4 日
Thank you so much. Works perfectly!

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by