<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">ncl 0&gt; 
      A=(/1,12,3,14,5,26,7,18,9,10/)<br>
      ncl 1&gt; B=(/1,3,5/)<br>
      ncl 2&gt;  C=new(dimsizes(A),typeof(A))<br>
      ncl 3&gt; C@_FillValue = -999<br>
      ncl 4&gt; C(B) = A(B)<br>
      ncl 5&gt; print(C)<br>
      <br>
      Variable: C<br>
      Type: integer<br>
      Total Size: 40 bytes<br>
                  10 values<br>
      Number of Dimensions: 1<br>
      Dimensions and sizes:   [10]<br>
      Coordinates: <br>
      Number Of Attributes: 1<br>
        _FillValue :  -999<br>
      (0)     -999<br>
      (1)     12<br>
      (2)     -999<br>
      (3)     14<br>
      (4)     -999<br>
      (5)     26<br>
      (6)     -999<br>
      (7)     -999<br>
      (8)     -999<br>
      (9)     -999<br>
      <br>
      On 11/02/15 8:14 AM, Xi Chang wrote:<br>
    </div>
    <blockquote
cite="mid:CAGfRhte4mr=i9uez9YMQWWr2ox4tW3N_4=hHbZPOEWEYxxy0SQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Dear NCL,
        <div><br>
        </div>
        <div style="">How can I change the values which are not
          associated with list of index to be missing values, for
          instance let's say I have set of data in array A, and list of
          index in array B,</div>
        <div style="">then I need to get array C where, the values of A
          which are not associated with indices in B, will be missing
          values?</div>
        <div style=""><br>
        </div>
        <div style="">A=(/1,12,3,14,5,26,7,18,9,10/) ;data</div>
        <div style="">B=(/1,3,5/) ;index</div>
        <div style=""><br>
        </div>
        <div style="">then, the result will be:</div>
        <div style=""><br>
        </div>
        <div style="">C=(/-999, 12, -999, 14,-999,26, -999, -999, -999,
          -999/)</div>
        <div style=""><br>
        </div>
        <div style="">Thank you.</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>