Subscript indices must either be real positive integers or logicals.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
srinu vas
el 27 de Mzo. de 2017
Comentada: srinu vas
el 27 de Mzo. de 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 comentarios
Respuesta aceptada
Joshua
el 27 de Mzo. de 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?
Más respuestas (1)
Image Analyst
el 27 de Mzo. de 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 comentarios
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!