フィルターのクリア

For Loop help condensing a matrix

1 回表示 (過去 30 日間)
Julianna
Julianna 2020 年 10 月 28 日
コメント済み: David Hill 2020 年 10 月 28 日
Hello.
I created a large array called Hist that is (160x6) with my number of iterations over the length is in the 1st column. When a variable nSpans is equal to 4, I would be trying to pull out four specific lengths: L(1) - 1, L(2) - 1, L(3) - 1, and L(4) - 1, and what each other column is equal to in the rows that these occur.
Example, row 40 is where L(1) - 1 occurs and is shown below:
10.0000 2 -11.0714 -10.7143 0.2375 0.0030
How would I write a for loop for n=1:nSpans to do this? I basically just want to condense my Hist matrix to be (nSpans,6).
Let my know if anyone needs more information. Cheers.
  1 件のコメント
David Hill
David Hill 2020 年 10 月 28 日
What is L? Why is row 40 length = L(1)-1?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by