- #1
poiuy
- 11
- 0
Hi all, I am sure this will be easy for one of you clever people but it has got me stumped.
I am working on a physics project and I am using MATLAB to acquire some data.
So basically I have a time varying current signal coming in and I am collecting the current data and plotting it against time. Now I want to do this several times using a for loop. I need to keep the data acquired with each loop and be able to use each set separately.
i.e. current = data_in
My problem is how do stop it from overwriting the current vector next time it loops?
Ideally I would like it to save the vectors in the following way:
current_1 = x x x x x x x x x x x x x x
(loop again)
current_2 = x x x x x x x x x x x x x x
(loop again)
current_3 = x x x x x x x x x x x x x x
and so on...
So is there a way I can change the current variable name each time the loop goes round.
Sorry if this seems a little confusing, I am confused myself.
I am working on a physics project and I am using MATLAB to acquire some data.
So basically I have a time varying current signal coming in and I am collecting the current data and plotting it against time. Now I want to do this several times using a for loop. I need to keep the data acquired with each loop and be able to use each set separately.
i.e. current = data_in
My problem is how do stop it from overwriting the current vector next time it loops?
Ideally I would like it to save the vectors in the following way:
current_1 = x x x x x x x x x x x x x x
(loop again)
current_2 = x x x x x x x x x x x x x x
(loop again)
current_3 = x x x x x x x x x x x x x x
and so on...
So is there a way I can change the current variable name each time the loop goes round.
Sorry if this seems a little confusing, I am confused myself.