can i change how load function operates?

the operation of the "open" function can be modified by writing specific "openXXX" functions (where XXX is the file-extention). But I would like to do some operations after a .mat file is opened/loaded based on what variables are stored. So if the .mat file contains only a variable called "measuredData" then I would like to run some code post loading it into workspace... is it possible?
I want to run the following snippet, but where can i place it so that is is run everytime a -mat file is loaded or Drag n' Droped in the command window.
variableInfo=who('-file',filename)
if ismember(variableInfo,'measuredData')
%run some code on "measuredData"
end

답변 (1개)

Matt J
Matt J 2025년 7월 31일
편집: Matt J 2025년 7월 31일

0 개 추천

You cannot, unfortunately.

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품

태그

질문:

2025년 7월 31일

편집:

2025년 7월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by