フィルターのクリア

For Loops using functions

2 ビュー (過去 30 日間)
Keane
Keane 2022 年 8 月 13 日
回答済み: Karim 2022 年 8 月 13 日
Im still new to Matlab so this is confusing me. Im writing a code to that uses a function and has to repeat that function on a input a given number of times, i cant figure out how to use the output of the first loop as the input for the second loop.
Smooth = zeros(1,n);
for i = 1:n
Smooth = SmoothSignalPass(s);
end

採用された回答

Karim
Karim 2022 年 8 月 13 日
if you do not want te keep the data from each iteration you can simply overwrite it i.e. use the same variable as input and output
Smooth = s; % initalize smooth as the original data
for i = 1:n
Smooth = SmoothSignalPass( Smooth );
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSmoothing and Denoising についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by