Adding Text To Table Data
이전 댓글 표시
I wanna give names to transitions in my file, but whenever I want to name something it changes to a numerical value or NaN.
So whenever the value is -1 -> P, 0 -> Q and 1 -> R.
FileName = 'ct4004355_si_003.txt';
T = readtable('ct4004355_si_003.txt', 'Delimiter','\t', 'TextType','string');
Rows = T(130:154,[1 2 3 4 5 6 11 12 13 14]);
Rows.Properties.VariableNames = ["Wavenumber [cm-1]", "Uncertainty", "v1u", "v2u", "L2u", "Ju", "v1l", "v2l", "L2l", "Jl"];
PR = Rows.Ju-Rows.Jl;
Rows = [Rows table(PR, 'VariableNames', {'Branch'}) ];
Rows.Branch(ismember(Rows.Branch, [-1])) = 'P'
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!