フィルターのクリア

deleting element in one dimensional array

4 ビュー (過去 30 日間)
Umair Altaf
Umair Altaf 2013 年 3 月 6 日
hi i have an one dimensional array of n elements and i want to delete only even elements in the array , how can i do this??

回答 (1 件)

Matt J
Matt J 2013 年 3 月 6 日
編集済み: Matt J 2013 年 3 月 6 日
A=A(1:2:end);
  1 件のコメント
Matt J
Matt J 2013 年 3 月 6 日
Or,
A(2:2:end)=[];

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

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by