How to import all files with the same extension from specific folder to Matlab?

13 views (last 30 days)
Dear Sirs, I have problem I need to import all files with .mat extensions to Matlab? As you can see
folder='.\Kangwon\RUN\U\Dynamics\output'
read_data_in_folder(folder)
folder='.\Kangwon\RUN\U\Dynamics\output'
read_data_in_folder(folder)
load('D:\THESIS\My file\Kangwon\RUN\U\Dynamics\output\YawShearUptiltObserver_19ms_s0.0_y-12_u0_MDT.mat')
MDT
plot(MDT.Time,MDT.Blade1RotatingPitchableRootForcesMy)
older='Kangwon\RUN\U\Dynamics\output'
read_data_in_folder(folder)
load('D:\THESIS\My file\Kangwon\RUN\U\Dynamics\output\YawShearUptiltObserver_19ms_s0.0_y-4_u0_MDT.mat')
MDT
plot(MDT.Time, MDT.Blade1RotatingPitchableRootForcesMy)
load('D:\THESIS\My file\Kangwon\RUN\U\Dynamics\output\YawShearUptiltObserver_19ms_s0.0_y-4_u0_SWP.mat')
SWP
Here I just have one file YawShearUptiltObserver_19ms_s0.0_y-4_u0_SWP.mat I need to import all files D:\THESIS\My file\Kangwon\RUN\U\Dynamics\output\*.mat
How to do it? Thank you

Accepted Answer

dpb
dpb on 4 Jun 2014
...I need to import all files D:\THESIS\My file\Kangwon\RUN\U\Dynamics\output\*.mat
See the FAQ
The dir solution is made to order for the question/problem...

More Answers (0)

Categories

Find more on File Operations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!