How to convert cell to matrix

조회 수: 1 (최근 30일)
Shahar ben ezra
Shahar ben ezra 2021년 3월 2일
댓글: Shahar ben ezra 2021년 3월 2일
hi
How to convert cell to matrix in this situation
t= readtable('loopTest');
for i=1:3
new_matrix{i}=t(:,i*3);
end
new_matrix=cell2mat(new_matrix) % this is not work:(
new_matrix=mean(new_matrix)
It is important for me to use the readtable function and not readmatrix
If I did this in the readmatrix function I would get a matrix of 16 * 3
This is what I want only with function"readtable"

채택된 답변

Walter Roberson
Walter Roberson 2021년 3월 2일
new_matrix{i}=t{:,i*3};

추가 답변 (0개)

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by