Can you have a function for multiple scripts that are growing in size?
Ältere Kommentare anzeigen
I have 36 scrpits that I run from a major script. My goal is to increase the performance as much as possible, since it now is really slow. Every script has the output GUD and I2 that I save as AUG1, AUG2... and AUI1, AUI2...
for i=1:36
if i=1
run 'H1'
end
if i=2
run 'H2'
end
.
.
.
save(sprintf('Urbanv/Appu/AUG%d',i), 'GUD');
save(sprintf('Urbanv/Appu/AUI%d',i), 'I2');
end
My problem is that the scripts are growing in size, so I do not know how to make a function that can replace the for loop above
For example, H1 now looks like this:
for i2=1:size(Hcombos, 1)
C=Hcombos(i2)
%for loop specific for H1
%Variable example: V1
end
end
And H2 will look like this
for i2=1:size(Hcombos, 1)
C=Hcombos(i2)
C2=Hcombos(i2,2)
%for loop specific for H1
%Variable example: V1
%for loop specific for H2
%Variable example: V2
%for loop that ensures that V1 and V2 are not the same
end
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!