同じ形式のファイルを読み込もうとするとエラーが出ます.
Ältere Kommentare anzeigen
Fname='AIC010.txt';%データの読み込み
t=readtable(Fname,...
"NumHeaderLines",3,"ReadVariableNames",false);%ヘッダーの行数
t(:,6:end)=[];%不要な部分(Soil Column)を削除
t.Properties.VariableNames={'Depth[m]', 'N-Value', 'P-Velocity[m/s]',...
'S-Velocity[m/s]', 'Density[Mg/m^3]'};%ヘッダーの名前を決定
t.("Depth[m]")=str2double(erase(t.("Depth[m]"), 'm'));%深さを数値とする
disp(t)%表示する
次を使用中のエラー: .
VariableNames プロパティにはテーブル内の変数ごとに名前を 1 つ指定しなければなりません。
エラー: untitled2 (行 7)
t.Properties.VariableNames={'Depth[m]', 'N-Value', 'P-Velocity[m/s]',...
AIC001で実行した場合は以下のようになります.
Depth[m] N-Value P-Velocity[m/s] S-Velocity[m/s] Density[Mg/m^3]
________ _______ _______________ _______________ _______________
1 2 360 78 1.8
2 13 360 78 1.68
3 14 360 130 1.72
4 4 360 130 1.71
5 2 1600 130 1.68
6 5 1600 130 1.71
7 13 1600 130 1.88
8 6 1600 130 1.89
9 7 1600 130 1.9
10 22 1600 130 1.9
11 27 1600 200 1.89
12 24 1600 200 1.87
13 17 1600 200 1.87
14 12 1600 200 1.86
15 11 1600 200 1.85
16 20 1600 200 1.89
17 29 1600 200 1.9
18 26 1600 200 1.92
19 24 1600 200 1.82
20 26 1600 200 1.85
AIC010の時にエラーが出るのかわかりません.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 文字と文字列 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!