cell to mat. I have a long list with patient data : PID, Name, Exam and Date

3 ビュー (過去 30 日間)
Anne
Anne 2017 年 3 月 24 日
コメント済み: Image Analyst 2017 年 3 月 24 日
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 件のコメント
dpb
dpb 2017 年 3 月 24 日
編集済み: dpb 2017 年 3 月 24 日
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
Image Analyst 2017 年 3 月 24 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by