Subscript indices must either be real positive integers or logicals.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
srinu vas
am 27 Mär. 2017
Kommentiert: srinu vas
am 27 Mär. 2017
BT = (K2) ./ (log((K1 ./ L+ 1)));
y = int16(11.289);
P = (1.438*10.^-2);
Problem comes from this
LST = (BT)./(1 + y(BT))./(P)*(log(Ei));
2 Kommentare
Akzeptierte Antwort
Joshua
am 27 Mär. 2017
I am not really sure what BT is, but depending on your values of K1, K2, and L, it probably won't be an integer. For example, with K1=1, K2=1, and L=1, BT=1.4427. y(BT) tries to access the 1.4427th index of y which does not exist. You need to change your code so BT is always an integer.
Or maybe you want y*BT instead for multiplication?
Weitere Antworten (1)
Image Analyst
am 27 Mär. 2017
This is a FAQ, so see the FAQ document at http://matlab.wikia.com/wiki/FAQ#How_do_I_fix_the_error_.22Subscript_indices_must_either_be_real_positive_integers_or_logicals..22.3F
0 Kommentare
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!