I am using the program dicomrt2matlab. I was able to convert the dicom RT structure into matlab and I got the .mat file as well. How do I load the .mat file into matlab next? How can I see the RT information in my applied to my dicom files ?
Link - https://github.com/ulrikls/dicomrt2matlab
if you do data=load('myfilename.mat'); data will contain everything on it.
It shoudl have (I think) the following 3 data on it: 'contours', 'rtssheader', 'imageheaders'
you can access it as data.imageheaders
Related
I am trying to read SEED Dataset in EEGLAB. The files are in .mat format. I am getting the error as --- EEGLAB error in function pop_loadeeg() at line124.Output argument "accept" and maybe others not assigned during call to "F:eeglab2019\plugins\neuroscanio1.3\loadeeg.m>loadeeg".
How to read the .mat file of EEG SEED Dataset in EEGLAB ? Please guide.
I hope this help:
Run eeglab.m, next in the pop up window: file->import data -> using EEGLAB functions and plugins -> from ASCII/float file or Matlab array.
Almost you can check the tutorial in the official EEGLAB page.
https://sccn.ucsd.edu/wiki/A01:_Importing_Continuous_and_Epoched_Data
How can we read Biopax file in matlab, biopax is special type of xml file. How we can retrieve information from it using matlab.
There is a BioConductor package for reading and manipulating BioPAX files in R (http://bioconductor.org/packages/release/bioc/html/paxtoolsr.html).
Check out the related tutorial on getting set up in R:
https://www.youtube.com/channel/UCWSbcyynroIp-f6O3sfz7jg
AND using PaxtoolsR:
http://bioconductor.org/packages/release/bioc/vignettes/paxtoolsr/inst/doc/using_paxtoolsr.html
I am trying to save real-time streaming data obtained from hardware to Matlab workspace, I use the following command: My issue is, it only saved the last set of data, but not all data.
To save all variables from the workspace in binary MAT-file, test.mat, type
save test.mat
When I tried with this
save('test.mat','-append'); ,
it makes my program halt, so I would like to know what is the correct way to achieve this?
They have same name and they are constantly overwritten, I did not get error message, I still get the file saved but I noticed that it only showed the latest set of data, what should I do to avoid this? I want it to save every set at each time step
The correct syntax for appending using save is
save(filename,variables,'-append')
This will save append all new variables and overwrite variables already in the filename.mat with the updated values.
I am going through someone's data analysis files (created in an older version of matlab) and trying to find out what a particular .mat file is that was used in a matlab script.
I am trying to load a .mat file in matlab. I want to see what is in it.
When I type...
load ('file.mat')
the file loads and I see two variables appear in the workspace. jobhelp and jobs.
When I try to open jobs by typing the following in the matlab command window...
jobs
the response is..
jobs =
[1x1 struct]
Does this mean that there is only a 1 x 1 structure in the .mat file? If so, how in the world do I see what it is? I'm even happy to load it in unix, but I don't know how to do that either. Any help would be greatly appreciated as I have a few files like this that I can't get any information from.
Again, a new user, so please make it simple.
Thanks
It means that jobs is a cell array {} and within this cell array is a structure defined
To see the structure and its contents type jobs{1}
I think you are dealing with a SPM5 Batch-File. This variable is an image of the tree-like structure you can see in the Batch-Editor of SPM. Your job consists of one subitem (stats) which could have various subsubitems (like fMRI model specification, model estimation and so on).
To access this structure on the command line just proceed like Nick said:
Each level is a separate cell array that you can access with {#} after the name of the level. Example: jobs{1} shows you that there is a subitem named stats.
Subitems in structs are accessed with a dot. Example: jobes{1}.stats{1} shows you the subitems of the stats-entry.
Notice that there could be more than one entry on each layer: A stats module could (and probably would) contain various subitems. You can access them via jobs{1}.stat{2}, jobs{1}.stats{3} and so on.
The last layer would be the interesting one for you: The structures in here is an image of the options you can choose in the batch-editor.
Apparently Matlab load loads the data from a .mat file into the variable that it was saved.
How can you load a single matrix from a .mat or binary file into an arbitrary variable?
Load it in to a struct and pop it out to your variable.
saved_name = 'varname_it_was_saved_as';
s = load('some_file.mat', saved_name);
my_new_variable = s.(saved_name);
I always use the struct forms of save and load for production code. It's cleaner because it doesn't dynamically fiddle with your workspace.
See help load for details.