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 天)
%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 CenterFile Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by