CSV将不会写入matlab
它无法识别文件以导入它们。有人知道为什么吗?我已经检查了文件,知道我引用的是正确的文件区域。次要评论:1你的标题有误导性。你的意思是说你不能读取中的值吗?2确切的错误是什么?代码中的错误发生在哪里?请更新您的帖子,以便我们可以看到错误发生的位置是“Group D_File Info.xlsx”,与您的MATLAB脚本位于同一文件夹中?@RobertP.:哇。。。我怎么会错过这个问题!?CSV将不会写入matlab,matlab,csv,Matlab,Csv,它无法识别文件以导入它们。有人知道为什么吗?我已经检查了文件,知道我引用的是正确的文件区域。次要评论:1你的标题有误导性。你的意思是说你不能读取中的值吗?2确切的错误是什么?代码中的错误发生在哪里?请更新您的帖子,以便我们可以看到错误发生的位置是“Group D_File Info.xlsx”,与您的MATLAB脚本位于同一文件夹中?@RobertP.:哇。。。我怎么会错过这个问题!? %% Input Variables nsbj=6;
%% Input Variables
nsbj=6; %%define number of subjects
fps=0.001; %%defining frames per second per frame rate
g=-9.81; %%acceleration due to gravity
BW= 0; %%Subject body weight measurement
SJW= 1; %%Squat jump without arm movement = Jumptype 1
CMW= 2; %%Countermovement jump without arm movement = Jumptype 2
SJ= 3; %%Squatjump with arm movement = Jumptype 3
CM= 4; %%Countermovement jump with arm movement = Jumptype 4
BAD= 5; %%Bad trial, exclude this
JT_S_TN=xlsread('Group D_File Info.xlsx','Sheet1','A1:C82'); %%reading in the Jump type(JT), Subject(S) and Trial number(TN) for later use
%JT_S_TN=[JT_S_TN(:,2),JT_S_TN(:,3)];
%% Main loop: 1.0 Read in excel data in CSV format
data = dir('C:\Users\Fliss\Documents\Uni Course\Year 2\Steph matlab\groupDmain\Trial*02d.CSV'); %% Counts the number of CSV files in the folder directory
data1 = data(1:end,:); %%can delete trials that are not needed because they were bad/irrelevant
njump=length(data1); %%number of jumps relate to the data1 size
for i = 1:njump;
name1=[data1(i,:).('name')];
m = ['C:\Users\Fliss\Documents\Uni Course\Year 2\Steph matlab\groupDmain\', name1]; % Finds the correct CSV file
j = csvread(m,7000,5); % Loads the CSV file into Matlab
end