how to time shift a set of data?
I have a plot of 12 cell voltages like this. There is also current here as yyaxis right, but ignore that. I forgot to remove the current, its not needed.
As you can see its unbalanced, 11 values are similar and 12th is off. The idea to solve this to time shift the 11 values to a common starting point. So make all values start from 3.6.
you can see the black lines i drew. I am trying to plot just those values. But the issue is when reduce the 11 cells starting from 3.6 then the size of those 11 values is different from the 12th value. The 12th cell size would be larger and i cant have that, because this is a 2d array and all the columns should be of same size. So i extrapolate using time of the 12th cell and time of other 11 cells, then i get value of 11 cells to have many 3.6V. The plot will be like this.
The extrapolate function i wrote is this:
11CellVoltExtrapolated = interp1(11CellsTime,11CellVolt,Timeof12thCell,’linear’, ‘extrap’);
So this is the problem. Also I cannot have nan values, because i need this array for other functions which cannot have nan values. How can i do this. Thank you.I have a plot of 12 cell voltages like this. There is also current here as yyaxis right, but ignore that. I forgot to remove the current, its not needed.
As you can see its unbalanced, 11 values are similar and 12th is off. The idea to solve this to time shift the 11 values to a common starting point. So make all values start from 3.6.
you can see the black lines i drew. I am trying to plot just those values. But the issue is when reduce the 11 cells starting from 3.6 then the size of those 11 values is different from the 12th value. The 12th cell size would be larger and i cant have that, because this is a 2d array and all the columns should be of same size. So i extrapolate using time of the 12th cell and time of other 11 cells, then i get value of 11 cells to have many 3.6V. The plot will be like this.
The extrapolate function i wrote is this:
11CellVoltExtrapolated = interp1(11CellsTime,11CellVolt,Timeof12thCell,’linear’, ‘extrap’);
So this is the problem. Also I cannot have nan values, because i need this array for other functions which cannot have nan values. How can i do this. Thank you. I have a plot of 12 cell voltages like this. There is also current here as yyaxis right, but ignore that. I forgot to remove the current, its not needed.
As you can see its unbalanced, 11 values are similar and 12th is off. The idea to solve this to time shift the 11 values to a common starting point. So make all values start from 3.6.
you can see the black lines i drew. I am trying to plot just those values. But the issue is when reduce the 11 cells starting from 3.6 then the size of those 11 values is different from the 12th value. The 12th cell size would be larger and i cant have that, because this is a 2d array and all the columns should be of same size. So i extrapolate using time of the 12th cell and time of other 11 cells, then i get value of 11 cells to have many 3.6V. The plot will be like this.
The extrapolate function i wrote is this:
11CellVoltExtrapolated = interp1(11CellsTime,11CellVolt,Timeof12thCell,’linear’, ‘extrap’);
So this is the problem. Also I cannot have nan values, because i need this array for other functions which cannot have nan values. How can i do this. Thank you. matlab MATLAB Answers — New Questions