フィルターのクリア

Decompose Data int a Matrix

3 ビュー (過去 30 日間)
Mansour Aljohani
Mansour Aljohani 2015 年 7 月 29 日
コメント済み: Star Strider 2015 年 8 月 10 日
I got how to locate my data from the signal in the following link: http://www.mathworks.com/matlabcentral/answers/229678#answer_185935
but how to decompose my data int a matrix. I attached my row data.
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 29 日
Decompose Data int a Matrix? What does that mean?
Mansour Aljohani
Mansour Aljohani 2015 年 7 月 30 日
each column in the matrix has one pulse from the row data in this example i have 8 column.

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

採用された回答

Star Strider
Star Strider 2015 年 7 月 30 日
The data you want is when the ‘lowSignal’ vector is equal to 1. If each column in your matrix has one pulse from that record, the separation has already been done. By definition, each column is a pulse, so if your matrix is ‘M’ and it is of size (Nx8), where ‘N’ is the number of rows, to get the first and eighth pulses:
Pulse_1 = M(:,1);
Pulse_8 = M(:,8);
  8 件のコメント
Mansour Aljohani
Mansour Aljohani 2015 年 8 月 9 日
Dear Strider,
why i got this
Error in threshold (line 33) sig_mtx(:,k1) = signal(epk_start(k1):epk_end(k1));
and thank you again.
Star Strider
Star Strider 2015 年 8 月 9 日
I have no idea. My code worked with your data, or I’d not have posted it.
What was the error?

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

その他の回答 (1 件)

Mansour Aljohani
Mansour Aljohani 2015 年 8 月 9 日
the error is in this, it said
Subscripted assignment dimension mismatch.
Error in threshold (line 33)
sig_mtx(:,k1) = signal(epk_start(k1):epk_end(k1));
  2 件のコメント
Mansour Aljohani
Mansour Aljohani 2015 年 8 月 9 日
Now it is work thank you so much for you help sir
Star Strider
Star Strider 2015 年 8 月 10 日
My pleasure.
That usually means the array sizes between the LHS and RHS of an assignment don’t match. My code assumes all the ‘epochs’ (as I called them) were of equal lengths, since they were the same in the file you provided.
Change the loop to:
for k1 = 1:length(epk_start)
sig_mtx{k1} = signal(epk_start(k1):epk_end(k1));
tim_mtx{k1} = time_vct(epk_start(k1):epk_end(k1));
end
This converts ‘sig_mtx’ and tim_mtx to cell arrays. That should at least solve the current problem. However you will have to program subsequent assignments involving them to accommodate the different lengths, and to change the cell arrays to double arrays in your code. See the documentation on Cell Arrays for details.

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

カテゴリ

Help Center および File ExchangeDetection, Range and Doppler Estimation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by