How can I fill a cell array?
조회 수: 16 (최근 30일)
이전 댓글 표시
Hi,
To create a cell array with 3 cells should I do this?
B = cell(3,2);
To fill this cell array with values from c according to the values in A knowing that c and A are a vectors. should I do this?
number=length(A);
for i=1:number
if (A<0)
B{1} = [B{1} c];
elseif (0<=A<=7)
B{2} = [B{2} c];
elseif (7<A<=10)
B{3} = [B{3} c];
end
end
thanks
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!