MATLAB中未定义的函数或变量,如何设置参数?

MATLAB中未定义的函数或变量,如何设置参数?,matlab,Matlab,我有一个MATLAB的代码,求的代码 function [hm,sm] = SKSClab(filename,data_type,maxk,true_labels,plot_flag) addpath('util') %Main check if(nargin<2) fprintf('\nPossible data types:\n') fprintf('\nnet_unw -> unweighted network\n') fprintf('\nnet_w -> weig

我有一个MATLAB的代码,求的代码

function [hm,sm] = SKSClab(filename,data_type,maxk,true_labels,plot_flag)
addpath('util')

%Main check
if(nargin<2)

fprintf('\nPossible data types:\n')
fprintf('\nnet_unw -> unweighted network\n')
fprintf('\nnet_w -> weighted network\n')
fprintf('\nvector -> (generic) data points\n')
fprintf('\nts -> time series\n')
fprintf('\nimg -> image\n')
error('You should provide at least a data type as second argument to the SKSClab function!')
我尝试过这样运行代码

SKSClab(proba.txt,3,6,1)
Undefined variable "proba" or function "proba.txt".
但是

我应该更改什么?

使用
SKSCLab('proba.txt',3,6,1)

否则matlab不知道proba.txt是字符串而不是变量

我很确定字符串需要放在引号中,请尝试SKSClab('proba.txt',3,6,1)@rossb83谢谢,这就是问题所在!投票结束只是一个简单的印刷错误。
SKSClab(proba.txt,3,6,1)
Undefined variable "proba" or function "proba.txt".
Undefined variable "proba" or function "proba.txt".