How can I import .m files in a sequential way with Editor?
Afficher commentaires plus anciens
Hi everyone.
I'm trying to make automatic the process of opening some files but I'm stuck.
I used to open them manually in the Command Window typing it's name. (e.g. If I want to open a file called vort050hgrid.m, I type vort050hgrid ).
I want to make a .m file in the editor that opens other vort0XXhgrid.m files in a sequential way.
I started creating a for structure to create the name of the file, but I don't know how to open it. It looks like this:
for i=50:25:150
str= num2str(['vort0' num2str(i) 'hgrid'])
%%here is where i need your help
end
If you need some more information, I can say that they contain data looking like:
data050=[
1.47734139218924,1.25,-0.00865578969217656,0.271968032236597
2.36824211711376,1.25,-0.00865578969217656,0.265838179532844
2.36824211711376,1.25,-0.00865578969217656,0.259708326829091
3.14539483375015,1.25,-0.00865578969217656,0.253578474125338
.
.
.
Thank you all. Pablo.
Réponse acceptée
Plus de réponses (1)
open( str );
should do the trick.
Catégories
En savoir plus sur Large Files and Big Data dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!