Filter löschen
Filter löschen

How to convert cell to matrix

1 Ansicht (letzte 30 Tage)
Shahar ben ezra
Shahar ben ezra am 2 Mär. 2021
Kommentiert: Shahar ben ezra am 2 Mär. 2021
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"

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 2 Mär. 2021
new_matrix{i}=t{:,i*3};

Weitere Antworten (0)

Kategorien

Mehr zu Cell Arrays finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by