Filter löschen
Filter löschen

read a directory path starting from a subfolder

1 Ansicht (letzte 30 Tage)
AXL
AXL am 22 Feb. 2018
Kommentiert: Walter Roberson am 22 Feb. 2018
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.

Akzeptierte Antwort

AXL
AXL am 22 Feb. 2018
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 Kommentar
Walter Roberson
Walter Roberson am 22 Feb. 2018
dirname = fullfile(pwd, 'Imagens', 'Deformações');
saveas(FigHandle, fullfile(dirname, file) )

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Search Path finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by