Reformating cell array of chars
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi
What I want is the following: I have 4D-files, I want to extract the names of the 3d slices in these files. Say I have a 4D file, which consists of three such slices, I would like to have the names of these slices as follows:
a = {
'/myComputer/10_22022017_0833036_2_1_wipepi168V4.nii,1'
'/myComputer/10_22022017_0833036_2_1_wipepi168V4.nii,2'
'/myComputer/10_22022017_0833036_2_1_wipepi168V4.nii,3'}
This gives me here a 3x1 cell. If there are many such slices, doing this manually is of course quite difficult. There is a function which recursively finds the name of the slices of 4D volumes in a folder, however it gives back a char array, e.g.:
/myComputer/10_22022017_0833036_2_1_wipepi168V4.nii,1
/myComputer/10_22022017_0833036_2_1_wipepi168V4.nii,2
/myComputer/10_22022017_0833036_2_1_wipepi168V4.nii,3
My question: How can I convert this char array in the format above, e.g. into a 3x1 cell containing the names? It should be as automated as possible (sometimes there might be 200 slices, sometimes 300 etc.)
Thanks
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Display Image finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!