replacing items in a matrix
古いコメントを表示
I have a vector:
A = 6:2:19;
and
r = 10;
I want to replace the element in A which corresponds to r with nothing.
So I want my new vector A = [6, 8, 12, 14, 16, 18];
How do I do that?
採用された回答
その他の回答 (1 件)
Sumit Chaudhary
2018 年 4 月 8 日
0 投票
clc; clear all; close all;
A = 6:2:19; r = 10;
A1 = A(find(A~=r))
カテゴリ
ヘルプ センター および File Exchange で Special Characters についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!