-
Notifications
You must be signed in to change notification settings - Fork 19
/
L13data
70 lines (58 loc) · 2.1 KB
/
L13data
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
%% Import data from text file.
% Script for importing data from the following text file:
%
% \\khensu\Home07\eplcad2\Desktop\Launch 13thermal_data.CSV
%
% To extend the code to different selected data or a different text file,
% generate a function instead of a script.
% Auto-generated by MATLAB on 2018/05/08 16:08:08
%% Initialize variables.
filename = '\\khensu\Home07\eplcad2\Desktop\Launch 13thermal_data.CSV';
delimiter = ',';
startRow = 2;
%% Format for each line of text:
% column1: double (%f)
% column2: double (%f)
% column3: double (%f)
% column4: double (%f)
% column5: double (%f)
% column6: double (%f)
% column7: double (%f)
% For more information, see the TEXTSCAN documentation.
formatSpec = '%f%f%f%f%f%f%f%[^\n\r]';
%% Open the text file.
fileID = fopen(filename,'r');
%% Read columns of data according to the format.
% This call is based on the structure of the file used to generate this
% code. If an error occurs for a different file, try regenerating the code
% from the Import Tool.
dataArray = textscan(fileID, formatSpec, 'Delimiter', delimiter, 'TextType', 'string', 'EmptyValue', NaN, 'HeaderLines' ,startRow-1, 'ReturnOnError', false, 'EndOfLine', '\r\n');
%% Close the text file.
fclose(fileID);
%% Post processing for unimportable data.
% No unimportable data rules were applied during the import, so no post
% processing code is included. To generate code which works for
% unimportable data, select unimportable cells in a file and regenerate the
% script.
%% Allocate imported array to column variable names
Time = dataArray{:, 1};
Temp1 = dataArray{:, 2};
Temp2 = dataArray{:, 3};
InternalTemp = dataArray{:, 4};
accX = dataArray{:, 5};
accY = dataArray{:, 6};
accZ = dataArray{:, 7};
figure
plot(Time,accX,Time,accY,Time,accZ);
xlabel('Time S');
ylabel('Acceration m/s^2');
title('Acceration of xyz axises');
legend('X axis','Y axis','Z axis');
figure
plot(Time,Temp1,Time,Temp2,Time,InternalTemp);
xlabel('Time S');
ylabel('Temp C');
title('Temp');
legend('Temp1','Temp2','InternalTemp');
%% Clear temporary variables
clearvars filename delimiter startRow formatSpec fileID dataArray ans;