[英]??? Error using ==> dlmread at 55 Filename must be a string
[file_input, pathname] = uigetfile( ...
{'*.txt', 'Text (*.txt)'; ...
'*.xls', 'Excel (*.xls)'; ...
'*.*', 'All Files (*.*)'}, ...
'Select files');
D = uiimport(file_input);
M = dlmread(D);
X = freed(M);
Getting errors with dlmread......"??? Error using ==> dlmread at 55 Filename must be a string."..need to get the data from dlmread to "freed" 使用dlmread出错...“” ???在55使用==> dlmread时出错文件名必须是字符串。“ ..需要将数据从dlmread转换为“释放”
Why do you call uiimport? 为什么叫uiimport? Just remove the line and pass
file_input
to dlmread. 只需删除该行,然后将
file_input
传递给dlmread。
[file_input, pathname] = uigetfile( ...
{'*.txt', 'Text (*.txt)'; ...
'*.xls', 'Excel (*.xls)'; ...
'*.*', 'All Files (*.*)'}, ...
'Select files');
M = dlmread(file_input);
X = freed(M);
Alternatively, store the output of uiinput in a different variable. 或者,将uiinput的输出存储在其他变量中。 Thus, you have the data from uiinput and the data from dlmread/freed for subsequent computations.
因此,您具有uiinput的数据和dlmread / freed的数据以进行后续计算。
[file_input, pathname] = uigetfile( ...
{'*.txt', 'Text (*.txt)'; ...
'*.xls', 'Excel (*.xls)'; ...
'*.*', 'All Files (*.*)'}, ...
'Select files');
some_data = uiimport(file_input);
M = dlmread(file_input);
X = freed(M);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.