Using load with partial name

I have daily data with similar parameters but each vector can have a different suffix depending on the logging rate e.g. Time_1Hz, Temperature_1Hz, .... or Time_5Hz, Temperature_5Hz, ....
to load these all and analyse together i have been using
all = dir('*.mat');
for a=1:length(all)
load (all(a).name, 'Time_1Hz', 'Temp_1Hz', 'Time_5Hz', 'Temp_5Hz')
and then analysing them separately like below
if exist ('Time_1Hz') == 1
Script_1Hz
else if exist ('Time_5Hz') == 1
Script_5Hz
end
end
end
I wonder if there is a more sophisticated way to run this using a who command
something like
load (all(a).name, who(Time*, who(Temp*))

답변 (0개)

카테고리

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

제품

태그

질문:

2019년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by