?? 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 + -