help-octave
[Top][All Lists]

## Help for loop while and Operators

 From: Julien563 Subject: Help for loop while and Operators Date: Fri, 18 Nov 2016 13:50:12 -0800 (PST)

```Hello !

I work on processing image and i would like to find a specific radius which
have a symetric properties.
So i explain : you have a picture which have a black hole with a certain
radius R. I define previously, that the color of the entire black hole on my
image, take this caracteristic : B(i,j,:)=1 (black pixels)

So the specific circle that i search have a symetric properties, i mean,
when you start from the x_center and y_center which reprents the center of
our mass, you must do the next process :

j=nr-yc
i=xc

k=0

i_nouveau_d=i
i_nouveau_g=i
j_nouveau_h=j
j_nouveau_b=j

while ((B(i_nouveau_d,j,:) && B(i_nouveau_g,j,:)) && (B(i,j_nouveau_h,:) &&
B(i,j_nouveau_b,:)) != 1)
while (B(i_nouveau_d,j,:)!= B(i_nouveau_g,j,:)) && (B(i,j_nouveau_h,:)!=
B(i,j_nouveau_b,:)) | i_nouveau_d!=nc | i_nouveau_g!=0 | j_nouveau_h!=0 |
j_nouveau_b!=nr
k=k+1
i_nouveau_d = i_nouveau_d+k
i_nouveau_g = i_nouveau_g-k
j_nouveau_h = j_nouveau_h+k
j_nouveau_b = j_nouveau_b-k
disp(i_nouveau_d)
disp(i_nouveau_g)
disp(j_nouveau_b)
disp(j_nouveau_h)

But when i apply this part of the programm, k stay to 0 and the loop while
don't run. I think the problem is maybe in the different conditions that i
insert in my double loop while.

<http://octave.1599824.n4.nabble.com/file/n4680666/deformation_galaxie2.jpg>

I want to calculate the angular distance between the center of the mass and
"the ring of Einstein" which appears here as the first light circle which i
present from the center of the mass (the dark circle). Then, i must to find
a system to search coordonates of any point througt this ring to calculate
the angular distance.

Julien

--
View this message in context:
http://octave.1599824.n4.nabble.com/Help-for-loop-while-and-Operators-tp4680666.html
Sent from the Octave - General mailing list archive at Nabble.com.

```