<div>Thanks!</div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 21, 2019 at 8:14 PM Rashed Mahmood <<a href="mailto:rashidcomsis@gmail.com">rashidcomsis@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Try the following:</div><div>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)"><br></span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)"></span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">index=abs(Allens-sotmod)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">vl=min(index)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">
</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)">do</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"> kj=</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">0</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">,dimsizes(Allens)-</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">1</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-Apple-converted-space"> </span></span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)">if</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"> (index(kj) .eq. vl) </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)">then</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-Apple-converted-space"> </span>print(kj)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-Apple-converted-space"> </span>index_obs(kj)=sotobs</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(206,121,36)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-Apple-converted-space"> </span></span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">end</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">if</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(206,121,36)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">end</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">do</span></p>
</div><div><br></div><div>The way you were trying to construct a loop would always have one value for the variable "index" after every iteration, so you would need to define the variable "index" outside the loop.<br></div><div>hope that helps.</div><div>Cheers,</div><div>Rashed<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 21, 2019 at 9:49 AM dale zuri <<a href="mailto:dalezuri@gmail.com" target="_blank">dalezuri@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi ncl user,<div>I have been trying to reproduce the result without using the closest function. But the result is not the same? Could someone help me?</div><div>I would appreciate the help and time. </div><div><br></div><div>Thanks </div><div><br><div></div><div><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">;do kj=0,dimsizes(Allens)-1</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">;index = closest_val(Allens(0),sotmod);;;;;;;;;;;;;;;;;;;(value2check,array2check)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">;print(index)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">;return</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">;index1(kj)=index</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">;index_obs(kj)=sotobs(index)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(83,48,225)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">;end do</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)">do</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"> kj=</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">0</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">,dimsizes(Allens)-</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">1</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">index=abs(Allens(kj)-sotmod)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">vl=min(index)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-Apple-converted-space"> </span></span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)">if</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"> index(kj) .eq. vl </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(206,121,36)">then</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-Apple-converted-space"> </span>print(kj)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-Apple-converted-space"> </span>index_obs(kj)=sotobs</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(206,121,36)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-Apple-converted-space"> </span></span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">end</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">if</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(206,121,36)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">end</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-s1" style="font-variant-ligatures:no-common-ligatures">do</span></p></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 21, 2019 at 5:15 AM Rashed Mahmood <<a href="mailto:rashidcomsis@gmail.com" target="_blank">rashidcomsis@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>the if statement inside the loop should be:</div><div><br></div><div> do i=0,3<br> if (xAbsDif(i).eq.xMinVal) then<br> print(i)<br> end if<br> end do<br></div><div><br></div><div>Cheers</div><div>Rashed<br></div><div><br></div><div><br></div><div><br></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 21, 2019 at 3:09 AM dale zuri <<a href="mailto:dalezuri@gmail.com" target="_blank">dalezuri@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Ncl user,<div><br><div>I would like to implement the closest value function without using ind function. I would appreciate any suggestion. </div></div><div>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">value2check = </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">18.382</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">array2check = (/</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">18.0001</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures"> ,</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">18.5888</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">, </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">18.01</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">, </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">18.5</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">/)</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">index <span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-Apple-converted-space"> </span>= closest_val(value2check,array2check)</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">print(index)</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">xAbsDif = abs(value2check-array2check)</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">xMinVal = min(xAbsDif)</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">iClose<span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-Apple-converted-space"> </span>= (ind(xAbsDif.eq.xMinVal))</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">print(iClose)</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">:::::without using ind;;;;;</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(175,173,36)">do</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures"> i=</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">0</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">,</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(195,55,32)">3</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(175,173,36)">if</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures"> any(xAbsDif(i)) .eq. any(xMinVal) </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(175,173,36)">then</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">print<span style="background-color:rgb(0,166,178)">(i) ;; it's not giving right answer</span></span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(175,173,36)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">end</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">if</span></p>
<p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(175,173,36)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">end</span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s5" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">do</span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(175,173,36)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(175,173,36)"><span class="m_-8727014099487659278gmail-m_-5412969650511156472gmail-m_1518767173536376581gmail-m_-1612610262032248655gmail-s1" style="font-variant-ligatures:no-common-ligatures">Thanks</span></p></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>