why the repeated number is lost?
Show older comments
I want to synchronize 95 time series data, the code is:
combination=combnk(1:95,2) *
for k=1:length(combination)* %% k equals 1:4465 %%
m=combination(k,1) %%% Here is the problem. since k=1:4465, I would suppose m has 4465 elements but it turns out just has 94 elements. I would like to know how can I make 'm' display all elements in combination(k,1) but not lost those repeated ones%%%
n=combination(k,2)
tsa=vts(1,m)
tsb=vts(1,n)
[tsa(m),tsb(n)]=synchronize(tsa,tsb,'union');
end
%%vts is a timeseries collection which contain all the 95 time series data%%
From my code I would suppose 'm equals every element in combination first column, which should be 4465 elements. but indeed, m equals 1:94 that is 94 elements. it auto ignore repeat number like 1 is repeated 95 times in combination. I do not how to make it. Please I would like to hear all your comments. Thank you.
Accepted Answer
More Answers (0)
Categories
Find more on 循环及条件语句 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!