-1
我有一个MATLAB代码,beggining代码未定义函数或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!')
末 %负荷数据
fprintf('\nLoading data...\n');
if(strcmp(data_type,'net_unw'))
network = load([filename,'.txt'],'-ascii');
我试图像这样
SKSClab(proba.txt,3,6,1)
Undefined variable "proba" or function "proba.txt".
但
运行代码Undefined variable "proba" or function "proba.txt".
我应该改变什么?
我敢肯定的字符串需要放置在引号中,尝试SKSClab('proba.txt ',3,6,1) – rossb83
@ rossb83谢谢,那就是问题! – MPejic
投票结束,作为一个简单的印刷错误。 – excaza