Hello, I am new in Matlab and I am using Matlab 2019a version. I have window build in guide in Matlab, you can se how the window looks like in png file whitch I insert there. I tried many combination, some of it works but it is still not that I need and I don't know how to combine this into one which will be work. My problem is that that I have csv file which is insert there also, It includes first two rows of texts that I don't want to shows and it have first column with date and time and others columns inlude measure values which is numbers. So I want with one button to insert multiple csv into uitable without first two rows and with second button I want plot them. Now what I have. I am using uigetfile with MultiSelect on, then when I use xlsread I am able to read data but I am not able select multiple csv.
- [num,txt,raw] = xlsread(file);
- (assignin('base', 'data', raw));
- set(handles.uitable1, 'Data', raw);
- setappdata(0,'table',raw);
second what I have is this, this one is usefule for skip the first two row but can't choose multiple csv file
- T = readtable(file,'HeaderLines',1);
- C = table2cell(T);
- (assignin('base', 'data', C));
- set(handles.uitable1, 'Data', C);
- setappdata(0,'table',C);
third is this which can be use for multiple choise
- ds = datastore(file);
- mydata = readall(ds);
- C = table2cell(mydata);
- (assignin('base', 'data', C));
- set(handles.uitable1, 'Data', C);
- setappdata(0,'table',C);
in the second button I have this, it is work with my date and time type
- table = getappdata(0, 'table');
- str = convertCharsToStrings(table(:,1));
- DateString = datestr(str);
- DateNumber = datenum(DateString);
- B.Var1 = datetime(DateNumber, 'convertFrom', 'datenum','Format', 'dd.MM.yy HH:mm');
- data = str2double(table);
- ydata1 = data(:,2);
- axes(handles.axes1);
- plot(B.Var1,ydata1,'--','Color','#4DBEEE');
So it is possible to use uigetfile and choose multiple csv file with date and time and numbers and skip the first two rows and insert them into uitable and with second button plot them from uitable. Thank you very much with some idea how to deal with this. I am already lost.