So i have a vector of [1x2e6] of frequency data , so I would like to create a loop so that it stores 10 0.1ms (millisecond) this frequency data and fprint it.

1 回表示 (過去 30 日間)
nrrr
nrrr 2022 年 5 月 19 日
回答済み: Walter Roberson 2022 年 5 月 19 日
%initialization
fc=2e6;
samplerate=50;

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 5 月 19 日
Number_per_group = 10;
in_groups = buffer(YourSignal, Number_per_group);
fmt = [repmat('%8.5f ', 1, Number_per_group - 1), '%8.5f\n'];
for K = 1 : size(in_groups, 2)
fprintf(fmt, in_groups(:,K));
end

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by