copy m file from matlab path to current working directory.

조회 수: 2 (최근 30일)
Samir
Samir 2016년 8월 11일
답변: Fangjun Jiang 2016년 8월 11일
I have written some standard functions for my use and stored under matlab path so that I can call it from anywhere. For example I have myfunc.m in matlab path. Now I want to test some modification to it, but I dont want to ruin original file, so I want to copy that file from wherever to current working directory. Is there a way to do this from matlab?
P.S. Dont tell to use cmd/terminal, that I know.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2016년 8월 11일
a=which('myfunc.m');
copyfile(a,'myfunc.m');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by