Subscript indices must either be real positive integers or logicals.
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have problem running this loop. The error is : Subscript indices must either be real positive integers or logicals.. Please, if you can help, please do! I just start learning matlab loops!
for i=1:length(xy_pairs)
x=xy_pairs(i,1);
y=xy_pairs(i,2);
count=phsp_array(x,y);
phsp_array=count+1;
end
0 comentarios
Respuestas (2)
Image Analyst
el 11 de Oct. de 2015
x and y are probably zero, negative integers, or not positive integers. See the FAQ: 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
sunil sharma
el 16 de Mzo. de 2017
c7=4.*g3(y).*sin(ld)./((2.*(ld.^4).*g1+k0.*re.*ph./l+(v0.*f1.*ph.*(ld.^2)./(h.*h0)))); % cn=4*g3*sin(ld)./(ld.^4)*(2+k0*re) pre=st.*bt.*c7;
I am getting the following results. Subscript indices must either be real positive integers or logicals.
Error in Magneticfield (line 33) c7=4.*g3(y).*sin(ld)./((2.*(ld.^4).*g1+k0.*re.*ph./l+(v0.*f1.*ph.*(ld.^2)./(h.*h0))));
Please help me.
0 comentarios
Ver también
Categorías
Más información sobre Parallel Computing Toolbox 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!