How do i write data to a specfic path without using cd(path)?
2 次查看(过去 30 天)
显示 更早的评论
Hi all,
I want to save data using dicomwrite, does anyone now how i can use a specific path in the dicomwriteline?
so i want to use something like: fpath = uigetdir; dicomwrite (fpath, serie, name, info)
how should i do this?
0 个评论
采纳的回答
Mischa Kim
2014-2-10
编辑:Mischa Kim
2014-2-10
Hugo, try
dicomwrite(X, strcat(uigetdir,'myfilename.dcm'));
where X represents the image to be written. Of course, you can replace the hard-coded filename with any valid string variable.
2 个评论
Jos (10584)
2014-2-10
Pathnames are OS specific (e.g. windows uses backslash while decent operating systems use a forward slash). To concatenate directories and files, independent of OS, you are advised to use FULLPATH
directoryName = uigetdir
fullname = fullpath(directoryName, FileName)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Import, Export, and Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!