I'm trying to run the code below but I keep getting the "Conversion to double from struct is not possible" error over and over. I'd really appreciate it if you could help me with what's wrong with the code. The screenshot of the error is attached and the code is as below.

Thanks in advance

H = [1,2,3, 4, 5, 6, 7, 8, 9, 10];

ratio = [.6 .2 .2; .7 .15 .15; .8 .1 .1];

result = zeros(30,1);

counter = 1;

load('inputsKonyaAccesshistoricalTransposeAnn.mat');

load('reanalizKonyaprecipitationhistorical.mat');

I1= inputsKonyaaccessTransposehist';

T= reanalizKonyahistprecipitation';

xdata2=(1:size(I1,1))';

dasddas = bsxfun(@(x,y) interp1(y(~isnan(x)),x(~isnan(x)),y),I1,xdata2);

I = dasddas;

for h_counter = 1:length(H)

for r_counter = 1:3 result(counter) = train_netloop(H(h_counter),ratio(r_counter,:),I,T); counter = counter + 1; end

end

Similar questions and discussions