フィルターのクリア

construct vectors if cycle

2 ビュー (過去 30 日間)
joo
joo 2012 年 10 月 3 日
hello!
i need to construct vectors xx and yy. The problem is that at each cycle the past xx and yy is deleted but i want the opposite. i want them to keep the past information and grow at each cycle. what can i do?
i appreciate any help. thank you very much.

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 10 月 3 日
Before the loop,
xx = [];
yy = [];
Then in the loop, change the xx and yy statements to
xx = [xx, x(iPeaks1:iPeaks2)];
yy = [yy, y(iPeaks1:iPeaks2)];

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by