cell array into matrix
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i want to convert a cell array having different number of rows into a matrix. I tried different ways but couldnt get the exact solution
for j1=1:m1
[pks{j1},fa{j1}] = findpeaks(z1(1:end,j1));
[pks1{j1},fr{j1}] = findpeaks(-z1(1:end,j1));
end
1 Commento
Dyuman Joshi
il 15 Mar 2023
Do you mean different number of columns?
You can not concatenate rows/columns having inconsistent dimensions to obtain a numeric matrix.
y={[1 2];[3 4 5]};
cat(1,y{:})
You might have to pad the rows/columns with NaN or any other value.
Risposte (1)
Vedere anche
Categorie
Scopri di più su Data Type Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!