how to do Shifting of text
3 ビュー (過去 30 日間)
古いコメントを表示
Assume this is text line:
volatile uint8_T AtomcMduleCnt_Z_Pt = 7U;/* Atomic Module Count in Pack */
I have to shift this line by 4 position:
volatile uint8_T @ AtomcMduleCnt_Z_Pt = 7U;/* Atomic Module Count in Pack */
so how to do shifting of text in matlab?
0 件のコメント
回答 (1 件)
Stephan
2020 年 2 月 27 日
編集済み: Stephan
2020 年 2 月 27 日
A = "volatile uint8_T AtomcMduleCnt_Z_Pt = 7U;/* Atomic Module Count in Pack */"
B = insertAfter(A,"uint8_T"," @")
A =
"volatile uint8_T AtomcMduleCnt_Z_Pt = 7U;/* Atomic Module Count in Pack */"
B =
"volatile uint8_T @ AtomcMduleCnt_Z_Pt = 7U;/* Atomic Module Count in Pack */"
4 件のコメント
Stephan
2020 年 2 月 28 日
A = fileread('Input_file.txt');
B = replace(A, ["uint8_T " "real32_T " "real32_B "],["uint8_T Rom_" "real32_T Rom_" "real32_B Rom_"]);
fileID = fopen('Output_File.txt','w');
fprintf(fileID, B);
fclose(fileID);
参考
カテゴリ
Help Center および File Exchange で Electrical Block Libraries についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!