Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
combine cell array to new big cell
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hi I have 4 cells containing PID, fullname, Exam and Date. ex
PID(1,1) = 0000000000
FN(1,1) = Will smith
Exam(1,1) = MUGA, UE
Date(1,1)= 27/03/2017
They are all (55x1) but the 55 can vary.
I need a BIG cell, BC (n,4): - it is important that it is four columns.
BC{n,1} = {PIDS{n,1}; FN{n,1}; Exam{n,1}; Date{n,1}};
BC{n,2} = {PIDS{n,2}; FN{n,2}; Exam{n,2}; Date{n,2}};
BC{n,3} = {PIDS{n,3}; FN{n,3}; Exam{n,3}; Date{n,3}};
BC{n,4} = {PIDS{n,4}; FN{n,4}; Exam{n,4}; Date{n,4}};
Can anyone help me with that ?
0 comentarios
Respuestas (1)
Star Strider
el 3 de Abr. de 2017
‘They are all (55x1) but the 55 can vary.’
Yet here for example, you are asking for the second column of a one-column vector:
BC{n,2} = {PIDS{n,2}; FN{n,2}; Exam{n,2}; Date{n,2}};
That will never work.
See if:
for n = 1:size(PIDS,1)
BC{n} = {PIDS{n}; FN{n}; Exam{n}; Date{n}};
end
works in your application.
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!