Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在MATLAB中训练数据以便在ANFIS中使用?_Matlab_Neural Network_Fuzzy Logic - Fatal编程技术网

如何在MATLAB中训练数据以便在ANFIS中使用?

如何在MATLAB中训练数据以便在ANFIS中使用?,matlab,neural-network,fuzzy-logic,Matlab,Neural Network,Fuzzy Logic,我有data=[abcd]这个数据在一个循环中,其中a,b,c和d的值发生变化 for num=START:END [out1 out2] = some_funstion(input_image); a = out1+out2; b = out2-out1; %example data = [a b]; end 如何保存整个数据并对其进行训练?将代码更改如下: data = []; for num=START:END [out1 out2] = some

我有
data=[abcd]
这个数据在一个循环中,其中
a
b
c
d
的值发生变化

for num=START:END
    [out1 out2] = some_funstion(input_image);
    a = out1+out2;
    b = out2-out1; %example
    data = [a b];
end

如何保存整个数据并对其进行训练?

将代码更改如下:

data = [];
for num=START:END
    [out1 out2] = some_funstion(input_image);
    a = out1+out2;
    b = out2-out1;%example
    data = [data; a b]; % each row of data will be a and b
end

save('file.mat','data'); % save 'data' in the 'file.mat' file
load('file.mat'); % load 'data' from 'file.mat'. 

顺便说一下,在matlab中,注释后面跟着“%”

您能提供更多详细信息吗?在每个循环中,数据是否根据功能或分布而变化?是的,我改变了我的职位,我想保存包含所有a和b值的“数据”;