I am importing data from three files and parsing it to obtain time and voltage values from each file. These values need to be plotted against each other on the same plot.
The data is held in a total of six matrices, one for time and one for voltage for each of the three data sets.
Matrix dimensions: matlab data sets: 1000x1, ltspice: 465x1, oscope: 2500x1.
Matlab finds an error in the use of the plot function:
plot(matlab_t,matlab_v,'k',ltspice_t,ltspice_v,'j',oscope_t,oscope_v,'g');
Is this an issue because the matrix dimension vary between independent and dependent sets?
Full code for script:
clear;
clc;
%% Import
%Read in files
matlab_t=dlmread('ENGR_222_Project_1_data.csv',',',[16 0 1015 0]);
matlab_v=dlmread('ENGR_222_Project_1_data.csv',',',[16 1 1015 1]);
ltspice_t=xlsread('ltspicedata_excel.xlsx','A1:A465');
ltspice_v=xlsread('ltspicedata_excel.xlsx','B1:B465');
oscope_t=xlsread('oscope_data.xlsx','D1:D2500');
oscope_v=xlsread('oscope_data.xlsx','E1:E2500');
%% Plot
plot(matlab_t,matlab_v,'k',ltspice_t,ltspice_v,'j',oscope_t,oscope_v,'g');