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!