Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How do you erase rows from matrix based on specific values in the row using loop control?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have an assignment to do in my advanced structural design class and being a first time MATLAB user im struggling to do task 10. I want to use the same algorithm as shown below but adapted to task 10. Anyone have some tips?? I dont know how to get matrices as outputs...
댓글 수: 1
madhan ravi
2019년 9월 27일
Always post the code instead of screenshot , so that another person doesn’t have to type your code all over again.
답변 (1개)
Ajay Kumar
2019년 9월 27일
doc find.
x1=1;
x2=1;
for i = 1:length(J)
if find(J(i,:)==77)
matrix1(x1,:)=J(i,:);
x1=x1+1;
else
matrix2(x2,:)=J(i,:);
x2=x2+1;
end
end
Please accept the answer if you got what you need. Thanks :)
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!