Error using minmax newff

3 次查看(过去 30 天)
Ibnu Darajat
Ibnu Darajat 2021-10-9
回答: G A 2021-10-9
this is my code about newff
filename = 'Book1.xlsx';
sheet = 2;
xlRange = 'D6:P16';
xlRange2 = 'P6:P17';
Data = xlsread(filename, sheet, xlRange);
data_latih = readcell(filename,'Sheet',sheet,'Range',xlRange);
target_latih = readcell(filename,'Sheet',sheet,'Range',xlRange2);
[m,n] = size(data_latih);
net = newff(minmax(data_latih),[10 1],{'logsig','purelin'},'traingdx');
but there is error
Error using minmax (line 26)
Data{1,1} is not numeric or logical.
Error in testes (line 17)
net = newff(minmax(data_latih),[10 1],{'logsig','purelin'},'traingdx');
what should I do?

回答(1 个)

G A
G A 2021-10-9
You are using char type variables, i.e filename
a = {'abc', 'aa', 'b'; 'abc1', 'aa1', 'b1'}
a =
2×3 cell array
{'abc' } {'aa' } {'b' }
{'abc1'} {'aa1'} {'b1'}
>> minmax(a)
Error using minmax (line 26)
Data{1,1} is not numeric or logical.
minmax returns two columns of minimuns and maximums of numeric data
doc minmax

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by