- #1
loukoumas
- 15
- 0
changing part of a name of a variable in a "for" loop
hello everyone!
let's say i have the equation between two variables: DT10sec= A*T10sec, working in matlab. How can i use a "for" loop to calculate the equation DT20sec= A*T20sec DT30sec= A*T30sec, DT40sec= A*T40sec,... etc
How can i interfere in just a part of the name of a variable? i would suppose something like the following
for i=1:5
DT"i"sec= A* T"i"sec
end
but it is not the right symbol
hello everyone!
let's say i have the equation between two variables: DT10sec= A*T10sec, working in matlab. How can i use a "for" loop to calculate the equation DT20sec= A*T20sec DT30sec= A*T30sec, DT40sec= A*T40sec,... etc
How can i interfere in just a part of the name of a variable? i would suppose something like the following
for i=1:5
DT"i"sec= A* T"i"sec
end
but it is not the right symbol