필터 지우기
필터 지우기

Error: A null assignment can have only one non-colon index

조회 수: 7 (최근 30일)
mukesh meharda
mukesh meharda 2020년 8월 20일
댓글: KSSV 2020년 8월 20일
% I have this code
for i=1:40
SSS(i,1)=1
end
for j=1:20
zz(i)=0.25;
SSS(end+1,1)=ZZ(i);
end
[index idx]=find(SSS==1);
SSS(:,2)=SSS(:,1); % values in second column for Ref
% now want to delete first 10 column of 1 in second column only, and add new rows at the end with value 0.5
for j=1:10
SSS(index(j),2)= []; % if I do here NaN then it will increase the size of array, that i Dont want to do
SSS(end+1,2) =0.5;
end
%% my final ans should be as per attached ans.mat file
  댓글 수: 6
mukesh meharda
mukesh meharda 2020년 8월 20일
I want to remove element and then shift 2nd column data upward and add new data at the end only
KSSV
KSSV 2020년 8월 20일
Okay so remove the entire...

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by