What is the difference between cell and array matrix.

조회 수: 24 (최근 30일)
AnhThu Le
AnhThu Le 2017년 9월 1일
댓글: Josh 2024년 5월 4일
The example is how to take the data from 65th row of the fifth cell Can I think about taking the data at row 65 and column fifth in a vector?
  댓글 수: 1
Adam
Adam 2017년 9월 1일
doc cell
tells you about cell arrays as well as pointing you to other associated pages of the help.

댓글을 달려면 로그인하십시오.

답변 (2개)

KSSV
KSSV 2017년 9월 1일
You must use {} to extract elements from cell..To extract 65th row and column 4 data use from a cell array A:
A{65,4}
Check the below example:
A = cell(3,3) ; % creating 3x3 random cell array
for i = 1:3
for j = 1:3
A{i,j} = rand(randperm(10,1)) ;
end
end
%%Extract 2nd row, 3rd column from A
A{2,3}
  댓글 수: 3
Image Analyst
Image Analyst 2018년 12월 10일
m = ca{2, 3} % Get cell contents
m11 = m(1,1); % Get 1,1 element of the matrix in the cell.
Bachtiar Muhammad Lubis
Bachtiar Muhammad Lubis 2018년 12월 16일
thanks image, i just realize it

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2018년 12월 10일
I think the FAQ has an excellent, intuitive explanation.
  댓글 수: 1
Josh
Josh 2024년 5월 4일
ohhh this is a new resource for me as well, thank you!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by