load multiple files in a loop
Mostra commenti meno recenti
Hi everyone, i have another piece of code that saves one variable into a step increasing file name eg file_1,file_2 each time the code is run. i know need to try and load the data in a loop and be able to plot it onto a graph for comparison.
any help would be greatly appreciated thank kyle :) (below is a copy of the code i have so far)
function load_data
clear all clc
%determins the number of saved files in directory
graph = dir('internalforce_*');
k = size(graph);
%starts a loop to load increase values of eg, internalforce_1, %internalforce_2...
for i = 1 : k(1)
variable(i) = load('internalforce_(i)')
end
end
Risposta accettata
Più risposte (1)
Walter Roberson
il 6 Mag 2011
1 voto
Categorie
Scopri di più su Variables in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!