Still stuck with array subtraction

Hi, I hope someone may be able to help. I'm still confused!!!
What I'm trying to do is with the following piece of code.
XRUL=find(X_hat(1,:)>=X_hat(end));
DRUL=find(Data(1:s+window_length-1) <= Data(end));
ERUL= bsxfun(@minus,XRUL,DRUL);
Essentially, I have two sets of data, in terms of their magnitude and time. X_hat is a array of dimensions 2x3629 double and is a estimate of remaining useful life. Data is a array of dimension of 269x1 double and is the actual data from the past till the present. I'm interested in extracting the time dimension of each array and then subtracting one from the other. Essentially what I trying to do is find remaining useful life (RUL).
RUL = length(estimated RUL) - length(data)
Hope you may be able to help.
Andy

3 件のコメント

dpb
dpb 2015 年 10 月 21 日
Sorry, I can't follow how the data are laid out and what is intended to be done from the description alone.
Make a small sample dataset that illustrates the input and show the desired output from that data. Shouldn't take but 10 entries or so of one and 2 or 3 of the other; algorithms aren't dependent on the number of elements but the underlying logic.
Andrew Wileman
Andrew Wileman 2015 年 10 月 22 日
Hi, It's OK I've sorted it with the function setdiff. Many thanks.
dpb
dpb 2015 年 10 月 22 日
Unless you wish to post the solution thinking it a case of general interest, I'd suggest since the problem went away you delete the question, too....

サインインしてコメントする。

回答 (0 件)

タグ

質問済み:

2015 年 10 月 21 日

コメント済み:

dpb
2015 年 10 月 22 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by