MATLAB: Attempted to access hout(1.03323); index must be a positive integer or logical

tmat error hout

I run the codes and an error shows up:
Attempted to access hout(1.03323); index must be a positive integer or logical.
Error in Code1 (line 203)
TMAT=[-qsunN+(Nwall*hout(Tamb-T4))+(Nwall*hskyN(Tsky-T4))+((Nwall*(Kb/Lbriw))*(T3-T4));%T4
My index is not zero and the value of hout=40. Can somebody help me or guide what can be he error?
Thanks

Best Answer

It seems ‘hout’ is a function but it is apparently not in your MATLAB path, so MATLAB is interpreting it as an array.
In the Command Window, type:
which hout -all
and see what the result is.