Filter löschen
Filter löschen

Change variable name in a loop

17 Ansichten (letzte 30 Tage)
gaetano mallardo
gaetano mallardo am 8 Apr. 2019
Bearbeitet: madhan ravi am 8 Apr. 2019
I want to call a function in a loop which gives me a 3xn matrix and i want to call the matrix model_(number)
for i=1:length(Domain)
model=IDtriang(trianglesN,Domain,i);
so if length=7 i would like to store 7 matrix like variables as
Model_1
Model_2
Model_3
I know i can do it saving it, but than i should call it back and i don't need it as i have to work with it

Akzeptierte Antwort

madhan ravi
madhan ravi am 8 Apr. 2019
Bearbeitet: madhan ravi am 8 Apr. 2019
model = cell(1,length(Domain)); % before loop
model{i}=IDtriang(trianglesN,Domain,i);

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by