read a directory path starting from a subfolder

2 次查看(过去 30 天)
Is there a way I can read a directory path starting from a subfolder:
folder = 'W:\Códigos\Matlab\Lee Frame\New\Images\Deformations'
I know it's possible to do something like that is Fortran (Ansys APDL):
folder = '..\Lee Frame\New\Images\Deformations'
My '.m' file is in the folder 'W:\Códigos\Matlab\Lee Frame\New'. I need that because I'm using different computers.

采纳的回答

AXL
AXL 2018-2-22
I got it doing the following:
[pwd '/Imagens/Deformações']
So I can save the figures named file:
saveas(FigHandle,fullfile([pwd '/Imagens/Deformações'],file))
But, if there is a better way of doing this, please let me know.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by