I need to create a cell array initializing each element in it to 3*1 null matrix.

조회 수: 2 (최근 30일)
I need to create a cell array initializing each element in it to 3*1 null matrix. How to proceed?
F=cell(a,2*n); is my cell and a,n are integers.

채택된 답변

madhan ravi
madhan ravi 2019년 7월 13일
Simpler without loop:
F(:) = {zeros(3,1)}

추가 답변 (1개)

Image Analyst
Image Analyst 2019년 7월 13일
편집: Image Analyst 2019년 7월 13일
I don't know about null. How about nan?
for k = 1 : numel(F)
F(k) = {nan(3, 1)};
end

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by