Subscript indices must either be real positive integers or logicals.

4 visualizaciones (últimos 30 días)
rasha makkia
rasha makkia el 11 de Oct. de 2015
Respondida: sunil sharma el 16 de Mzo. de 2017
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

Respuestas (2)

Image Analyst
Image Analyst el 11 de Oct. de 2015

sunil sharma
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.

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!

Translated by