graph multiple excel or csv files
I have 4 excel files, which I would like to join using matlab into a single file like example 5 (but not convert it to excel). But using the time table command in which the date and time are combined, the purpose is to be able to graph various amounts of data quickly without graphing each file.
The purpose is when you have to graph excel or csv files to be able to generate them quickly
For example:
I really appreciate the help.
My code actual:
clear;
clc;
%% Load and plot data example 01
filename = ‘example1’;
T = readtable(filename);
x1 = T{:,1} + days(T{:,2}); % Combining date and time
y1 = T{:,3}; % Pressure data
figure
plot(x1, y1, ‘r-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 02
filename = ‘example2’;
T = readtable(filename);
x2 = T{:,1} + days(T{:,2}); % Combining date and time
y2= T{:,3}; % Pressure data
plot(x2, y2, ‘b-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 03
filename = ‘example3’;
T = readtable(filename);
x3 = T{:,1} + days(T{:,2}); % Combining date and time
y3= T{:,3}; % Pressure data
plot(x3, y3, ‘g-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 04
filename = ‘example4’;
T = readtable(filename);
x4 = T{:,1} + days(T{:,2}); % Combining date and time
y4= T{:,3}; % Pressure data
plot(x4, y4, ‘k-‘, ‘LineWidth’, 1)
hold on
grid on
axis tightI have 4 excel files, which I would like to join using matlab into a single file like example 5 (but not convert it to excel). But using the time table command in which the date and time are combined, the purpose is to be able to graph various amounts of data quickly without graphing each file.
The purpose is when you have to graph excel or csv files to be able to generate them quickly
For example:
I really appreciate the help.
My code actual:
clear;
clc;
%% Load and plot data example 01
filename = ‘example1’;
T = readtable(filename);
x1 = T{:,1} + days(T{:,2}); % Combining date and time
y1 = T{:,3}; % Pressure data
figure
plot(x1, y1, ‘r-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 02
filename = ‘example2’;
T = readtable(filename);
x2 = T{:,1} + days(T{:,2}); % Combining date and time
y2= T{:,3}; % Pressure data
plot(x2, y2, ‘b-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 03
filename = ‘example3’;
T = readtable(filename);
x3 = T{:,1} + days(T{:,2}); % Combining date and time
y3= T{:,3}; % Pressure data
plot(x3, y3, ‘g-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 04
filename = ‘example4’;
T = readtable(filename);
x4 = T{:,1} + days(T{:,2}); % Combining date and time
y4= T{:,3}; % Pressure data
plot(x4, y4, ‘k-‘, ‘LineWidth’, 1)
hold on
grid on
axis tight I have 4 excel files, which I would like to join using matlab into a single file like example 5 (but not convert it to excel). But using the time table command in which the date and time are combined, the purpose is to be able to graph various amounts of data quickly without graphing each file.
The purpose is when you have to graph excel or csv files to be able to generate them quickly
For example:
I really appreciate the help.
My code actual:
clear;
clc;
%% Load and plot data example 01
filename = ‘example1’;
T = readtable(filename);
x1 = T{:,1} + days(T{:,2}); % Combining date and time
y1 = T{:,3}; % Pressure data
figure
plot(x1, y1, ‘r-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 02
filename = ‘example2’;
T = readtable(filename);
x2 = T{:,1} + days(T{:,2}); % Combining date and time
y2= T{:,3}; % Pressure data
plot(x2, y2, ‘b-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 03
filename = ‘example3’;
T = readtable(filename);
x3 = T{:,1} + days(T{:,2}); % Combining date and time
y3= T{:,3}; % Pressure data
plot(x3, y3, ‘g-‘, ‘LineWidth’, 1)
hold on
%% Load and plot data example 04
filename = ‘example4’;
T = readtable(filename);
x4 = T{:,1} + days(T{:,2}); % Combining date and time
y4= T{:,3}; % Pressure data
plot(x4, y4, ‘k-‘, ‘LineWidth’, 1)
hold on
grid on
axis tight multiple files, graphics, plot MATLAB Answers — New Questions