read a directory path starting from a subfolder

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 日

0 投票

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.

1 件のコメント

Walter Roberson
Walter Roberson 2018 年 2 月 22 日
dirname = fullfile(pwd, 'Imagens', 'Deformações');
saveas(FigHandle, fullfile(dirname, file) )

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSearch Path についてさらに検索

製品

タグ

質問済み:

AXL
2018 年 2 月 22 日

コメント済み:

2018 年 2 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by