add a row to a matrix each loop
이전 댓글 표시
lets say i have a matrix somthing liek that:

for each loop there is a search for solutions,
if a solution is found for a, iteration loop it will be added as new row in the matrix , othere wise it will pass to find another solution .
how we can proceed ?
thanks
답변 (1개)
Just concatenate:
A=eye(5)
newrow=rand(1,5);
A=[A;newrow]
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!