Subscript indices must either be real positive integers or logicals.

4 visualizzazioni (ultimi 30 giorni)
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

Risposte (2)

Image Analyst
Image Analyst il 11 Ott 2015

sunil sharma
sunil sharma il 16 Mar 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.

Categorie

Scopri di più su Parallel Computing Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by