save a vector in an array
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi! I have this loop and i want to save the index (ind) in a vector or array. How should i do this
i thougt about a=[a;ind], but it was not true.
%code
for l=1:length(date_time_l)
[~, ind] = min(abs(numdates-(date_time_l(l))));
end
%end of code
i thougt about a=[a;ind], but it was not true.
thank you
댓글 수: 0
채택된 답변
Thomas
2012년 11월 6일
try
for ii =1:length(date_time_l)
[~, ind(ii)] = min(abs(numdates-(date_time_l(ii))));
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Data Preparation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!