Python "why" questions
Roy Smith
roy at panix.com
Mon Aug 16 21:00:17 EDT 2010
In article <i4b770$hve$1 at localhost.localdomain>,
Martin Gregorie <martin at address-in-sig.invalid> wrote:
> Say you have intensity data captured from an X-ray goniometer from 160
> degrees to 30 degrees at 0.01 degree resolution. Which is most evil of
> the following?
>
> 1) real intensity[16000:3000]
> for i from lwb intensity to upb intensity
> plot(i/100, intensity[i]);
How about (totally inventing syntax as I go along):
5) real intensity[160.0 : 30.0 : 0.01]
for index, value in intensity:
plot(index, value)
More information about the Python-list
mailing list