uiimport help
Hi,
I have a problem, I am using the uigetfile and uiimport to load a dataset file. after loading the dataset file I would like the output of the dimensions ie rows and column.
with the following code I am getting the wrong dimensions……..
/COLOR]input_file,pathname[COLOR=#008800 = uigetfile( ...
{'*.txt', 'Text (*.txt)'; ...
'*.xls', 'Excel (*.xls)'; ...
'*.*', 'All Files (*.*)'}, ...
'Select files');
uiimport(input_file)
/COLOR]pathstr, name, ext, versn[COLOR=#008800 = fileparts(input_file)
r = size(name,1); % number of rows
c = size(name,2); % number of columns
disp(r) % Output
disp(c) % Output</pre>
Your help would be very much appreciated. Thank you.
I have a problem, I am using the uigetfile and uiimport to load a dataset file. after loading the dataset file I would like the output of the dimensions ie rows and column.
with the following code I am getting the wrong dimensions……..
/COLOR]input_file,pathname[COLOR=#008800 = uigetfile( ...
{'*.txt', 'Text (*.txt)'; ...
'*.xls', 'Excel (*.xls)'; ...
'*.*', 'All Files (*.*)'}, ...
'Select files');
uiimport(input_file)
/COLOR]pathstr, name, ext, versn[COLOR=#008800 = fileparts(input_file)
r = size(name,1); % number of rows
c = size(name,2); % number of columns
disp(r) % Output
disp(c) % Output</pre>
Your help would be very much appreciated. Thank you.
0
Comments
Thank you for your reply
OK instead of receiving the dimensions of the matrix/vector I am receiving the dimension of the file name.
for example the name of the file being loaded into matlab is 'student' then the dimension output for rows r and column c is
r = 1
c = 7
which is wrong its giving the dimension of the word student and not the matrix/vector
Thank you
-drasnor
Yes I do want the information such as dimension of the content of the file.
If I use the file name 'student' Instead of using 'name' then I am getting the correct output but I want it to be dynamic where I can load different files and not limit it to one file..
r = size(student,1); % number of rows
c = size(student,2); % number of columns
The above code gives me the correct output but thats for just the student file.
Thank you
-drasnor
Thank you
Im new to matlab how do I do that?
-drasnor
I have a problem,
I use Import wizard for Import such date from a txt file,this can do by using a uiimport('filename') command instead of file>Import wizard from menu.
I look for a commands that do "next" and other facilities of Import wizard(such ''comma'' & "space"as commands sentences which can use in M-file for my programming;
thanks for your attention;
* dlmread for delimited data files.
* fscanf and friends for formatted data files.
-drasnor