Convert cell array to two row vector

6 vues (au cours des 30 derniers jours)
BOB
BOB le 11 Sep 2018
Modifié(e) : Stephen23 le 23 Fév 2022
Hi folks,
I have the following cell array:
hvix =
[2x1 double]
[2x8 double]
[2x15 double]
[2x1 double]
I want to concatenate them into a 2 x 25 matrix. Is this possible?
Thanks

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 11 Sep 2018
cell2mat(hvix(:)')
  2 commentaires
monica padala
monica padala le 8 Avr 2021
Hi, I have the following cell array:
M =
[Ax1 double]
[Bx1 double]
[Cx1 double]
[Dx1 double]
[Ex1 double]
Is it possible to concatenate them into 5x4 matrix ?
output = [A B C D E] matrix
Andrei Bobrov
Andrei Bobrov le 9 Avr 2021
M = arrayfun(@(x)rand(4,1),ones(5,1),'un',0)
out = [M{:}]'

Connectez-vous pour commenter.

Plus de réponses (1)

Stephen23
Stephen23 le 11 Sep 2018
Modifié(e) : Stephen23 le 23 Fév 2022

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by