update vector data to start with a different value at specific point.
Dear community, I’d like to ask your support to find a solution for below condition.
I have 6 vectors. time, CtTHiRes, HiResCalc, CtTgrdCalc, idx8 and TS_tClntEngOut
my goal is to calculate HiResCalc which it will have same values as CtTHiRes using CtTgrdCalc.
for ii = 2:N+1
if exist (‘time’)
HiResCalc(ii) = CtTgrdCalc(ii-1) + HiResCalc(ii-1);
end
I’m stuck trying to update HiResCalc…..
what I need to do is when idx8 = 0, HiResCalc should be updated and get whathever the valu is in TS_tClntEngOut, in this case the update happens at second 250 but it can be anyother time.
after HiResCalc is updated, calculation should continue as shonw in the script above but I don’t know how to make it…..
for ia= 1:length(HiResCalc);
if idx8(ia) == 0
HiResCalc(ia,1) = TS_tClntEngOut(ia);
end
end
here is an image for your reffrence…
as before any feedback will be highly appreciatedDear community, I’d like to ask your support to find a solution for below condition.
I have 6 vectors. time, CtTHiRes, HiResCalc, CtTgrdCalc, idx8 and TS_tClntEngOut
my goal is to calculate HiResCalc which it will have same values as CtTHiRes using CtTgrdCalc.
for ii = 2:N+1
if exist (‘time’)
HiResCalc(ii) = CtTgrdCalc(ii-1) + HiResCalc(ii-1);
end
I’m stuck trying to update HiResCalc…..
what I need to do is when idx8 = 0, HiResCalc should be updated and get whathever the valu is in TS_tClntEngOut, in this case the update happens at second 250 but it can be anyother time.
after HiResCalc is updated, calculation should continue as shonw in the script above but I don’t know how to make it…..
for ia= 1:length(HiResCalc);
if idx8(ia) == 0
HiResCalc(ia,1) = TS_tClntEngOut(ia);
end
end
here is an image for your reffrence…
as before any feedback will be highly appreciated Dear community, I’d like to ask your support to find a solution for below condition.
I have 6 vectors. time, CtTHiRes, HiResCalc, CtTgrdCalc, idx8 and TS_tClntEngOut
my goal is to calculate HiResCalc which it will have same values as CtTHiRes using CtTgrdCalc.
for ii = 2:N+1
if exist (‘time’)
HiResCalc(ii) = CtTgrdCalc(ii-1) + HiResCalc(ii-1);
end
I’m stuck trying to update HiResCalc…..
what I need to do is when idx8 = 0, HiResCalc should be updated and get whathever the valu is in TS_tClntEngOut, in this case the update happens at second 250 but it can be anyother time.
after HiResCalc is updated, calculation should continue as shonw in the script above but I don’t know how to make it…..
for ia= 1:length(HiResCalc);
if idx8(ia) == 0
HiResCalc(ia,1) = TS_tClntEngOut(ia);
end
end
here is an image for your reffrence…
as before any feedback will be highly appreciated data, analysis MATLAB Answers — New Questions