issue with using a variable for path name
조회 수: 7 (최근 30일)
표시 이전 댓글
I tried to save my path address to a variable and use the variable as CD funtion but i am getting an error.
Path = ('H:\dcx_cpe\CRANE\Truck Data');
cd('Path');
I am getting the below error.
Cannot CD to H:\dcx_cpe\CRANE\Truck Data\Path (Name is nonexistent or not a directory).
How do i fix this issue?
댓글 수: 1
Stephen23
2022년 4월 7일
Do not CD just to import/export data files. CD is slow and makes debugging harder.
Every function that import/exports datafiles accepts absolute/relative filenames. You should use absolute/relative filenames.
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!