MATLAB Answers

Error: The logical indices contain a true value outside of the array bounds.

63 views (last 30 days)
The assignment is to calculate the mean of 1 month in the year 2019. The function seems logical to me and other students, but I keep getting errors. Can someone help?
Maand=month
Jaar=year
function Tgem2 = MaandGem2019(maand19)
load data_weer.mat
b=TG(jaar==2019);
for d=1:length(b)
c(d)=mean(b(maand==maand19))
end
Tgem2=c

  2 Comments

Stephen Cobeldick
Stephen Cobeldick on 16 Jan 2020
@Bram van der Horst: please upload your data to your question by clicking on the paperclip button.

Sign in to comment.

Accepted Answer

More Answers (0)

Sign in to answer this question.

Tags


Translated by