How can I associate my load() function with my own file extension when double-clicked in MATLAB?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a few custom binary file types, and associated functions for loading them into the MATLAB workspace. I would like the convenience of associating my m-file with the custom extension, so that it is automatically called if you double-click the file icon from within the MATLAB desktop. Is this possible?
I have seen a similar question and answer at http://www.mathworks.com/matlabcentral/answers/12212, which is very clever, but I'm looking for something to work just within MATLAB, not the entire Windows environment.
댓글 수: 2
Jan
2013년 2월 6일
Double click the file icon from within the MATLAB desktop? Where are icons, which can be double-clicked, in the MATLAB desktop? And what exactly is "the Matlab Desktop"?
Carl
2013년 2월 8일
편집: Walter Roberson
2013년 2월 8일
I'm somewhat confused. Do you have *.yourextension files that you want to open by double clicking them in the matlab desktop? Then you would just have to create a openyourextension.m file in %userprofile%\Matlab\ which has the following content:
function openyourextension(file)
yourscript(file);
end
답변 (1개)
Sean de Wolski
2013년 2월 8일
You should contact support with regards to this. It definitely sounds like a good enhancement request, if not possible in a documented way now.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!