cell to mat. I have a long list with patient data : PID, Name, Exam and Date
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
A = PID (Char)
a1
a2
a3
a4
B = Name (cell)
b1
b2
b3
b4
C= Exam (Cell)
c1
c2
c3
c4
D= Date (Cell)
d1
d2
d3
d4
I need
X =
a1
b1
c1
d1
Y =
a2
b2
c2
d2
Z=
a3
b3
c3
d3
W=
a4
b4
c4
d4
in
|X Y Z W i a (r,c) = (:,4)|
2 comentarios
dpb
el 24 de Mzo. de 2017
Editada: dpb
el 24 de Mzo. de 2017
From whence cometh these data and why in this format? Why not create a table from the git-go instead?
ADDENDUM
In line with the original question, I don't follow what the i a (r,c) terms are intended to indicate/represent in the last expression? Also, what would you propose doing with these data in the form that would explain the motive behind the question as posed? (As you may be able to surmise, the thought implied if not stated here is that there's probably a better way...)
Image Analyst
el 24 de Mzo. de 2017
I don't understand the question. What is A and a1? Are they both variables? Is the (badly-named) A a structure and a1,a2,a3,a4 "fields" of that structure? Or are a1-a4 4 separate variables?
What is B? Is it a cell array called "Name" and it has 4 cells so that B{1} contains the b1 variable? What is b1? Is it a cell or a string (character array)? There are just too many unknowns to try to suggest a proper data type. About all I can suggest is that it might be good to use either a structure array or a table.
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!