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;
0 个评论
回答(1 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!