📄 find_sttc.m
字号:
function [ST_NextState, ST_Output] = ... find_sttc(STTCFile, modulation_type, number_of_states);%------------------------------------------------------------------------------% Find Tarokh space-time code trellis structures.% % Format:% -------% % [ST_NextState, ST_Output] = ...% find_sttc(STTCFile, modulation_type, number_of_states)% % Author: MVe% Date: 26.07.2002%------------------------------------------------------------------------------% Convert number to stringnumber_of_states_s = num2str(number_of_states);% Open file, read it to variable 'STTC' and close fileFileID= fopen(STTCFile,'r');STTC = fread(FileID);fclose(FileID);% Find correct trellis structureMatchB = ... ['#define ', modulation_type, ' ',number_of_states_s,'-state STTC begins'];BCode = findstr(char(STTC)',MatchB);MatchE = ... ['#define ', modulation_type, ' ',number_of_states_s,'-state STTC ends'];ECode = findstr(char(STTC)',MatchE);STTC = STTC(BCode(1)+length(MatchB):ECode(1)-1);% Insert trellis structure to variableseval(char(STTC).');% Convert 'ST_NextState' and 'ST_Output' to "pointer" formatsize_o = size(Output);ST_NextState = NextState+1;ST_Output = reshape(num2cell([Output{:,:}]+1,[1,3]),size_o);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -