Question: lines 3 and 4 are in matlab code and I want to translate it into python but I dont know the right syntax. If the
lines 3 and 4 are in matlab code and I want to translate it into python but I dont know the right syntax.
If the SLM_image range from kk to k2 is less than 0, i want this to form an uint8 (8 bit array) with the value of 225.
Please translate

for k in range(SLM_image,1): for k2 in range(SLM_image,2): if SLM_image(kk,k2) > 0 SLM_image(kk, k2) uint8(255)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
