for loopCnt = 1:codePeriods%% GUI update -------------------------------------------------------------
% The GUI is updated every 50ms. This way Matlab GUI is still
% responsive enough. At the same time Matlab is not occupied
% all the time with GUI task.
Ln=sprintf('\n');
trackingStatus=['Tracking: Ch ', int2str(channelNr), ...
' of ', int2str(settings.numberOfChannels),Ln ...
'PRN: ', int2str(channel(channelNr).PRN),Ln ...
'Completed ',int2str(loopCnt), ...
' of ', int2str(codePeriods), ' msec',Ln...
'C/No: ',CNo,' (dB-Hz)'];
if (rem(loopCnt, 50) == 0)
try
waitbar(loopCnt/codePeriods, ...
hwb, ...
trackingStatus);
catch
% The progress bar was closed. It is used as a signal
% to stop, "cancel" processing. Exit.
disp('Progress bar closed, exiting...');
return
end
end
%% Read next block of data ------------------------------------------------
% Find the size of a "block" or code period in whole samples
% Update the phasestep based on code freq (variable) and
% sampling frequency (fixed)
codePhaseStep = codeFreq / settings.samplingFreq; %%% settings.samplingFreq =
5.714e6; %[Hz]
blksize = ceil((settings.codeLength-remCodePhase) / codePhaseStep); %%%settings.codeLength
= 1023; remCodePhase = 0.0; %%%初始码移位为0
% Read in the appropriate number of samples to process this
% interation
[rawSignal, samplesRead] = fread(fid, blksize, settings.dataType); %%% settings.dataType
='int8';
matlab中for创建矩阵,每次for循环生成一个固定行列的矩阵,把每次矩阵存到。......
最新推荐文章于 2023-04-07 15:30:43 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)