Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
I want make a loop in which when i complete it's 5 turns then J =J+1. and repeat it until J does not approach to it's maximum given value ?
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
here i =1:5 and j=2:8
but, for eachtime when i arrive at 5, j=j+1
[(A(:,j).visited(i,:)]
end
댓글 수: 9
  Walter Roberson
      
      
 2018년 11월 20일
				assign to D{i,j}
however unless A has only one row and j is a scalar then you would get an indexing error . In matlab it is not possible to use a single statement to access a subset of an field inside a nonscalar structure array. You can have 
  scalar_structure
  scalar_structure.fieldname
  scalar_structure.fieldname(index)
  nonscalar_structure
  nonscalar_structure.fieldname
  nonscalar_structure(index)
nonscalar_structure(index).fieldname 
  nonscalar_structure(scalar_index).fieldname(index)
but you cannot have nonscalar_structure(nonscalar_index).fieldname(index) 
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




