removing the array elements
显示 更早的评论
%testing the elimation of the elements outside the boundary%
np=22;
L=10;
x=linspace(0,L,np);
%position(:,1)=x;
for i=1:np
if x(i) > 5
x(i) = [ ];
end
end
hello, i want to eliminate the value of x greater than 5 , i s not able yo do so. it says index array exceeds array bounds
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!