X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Feb 2011 08:50 PM by  anon
Quantization
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
28 Feb 2011 08:50 PM
    Hi, I have a data file including nodes numbers with their displacement vectors (ux, uy, uz). I'm going to quantize the nodes based on their displacement vectors in z direction (uz). For example if uz uz Many thanks, Arad

    Deleted User



    New Member


    Posts:
    New Member


    --
    28 Feb 2011 08:51 PM
    [QUOTE]Arad wrote Hi, I have a data file including nodes numbers with their displacement vectors (ux, uy, uz). I'm going to quantize the nodes based on their displacement vectors in z direction (uz). For example if uz uz Many thanks, Arad [/QUOTE]

    Deleted User



    New Member


    Posts:
    New Member


    --
    26 Aug 2011 03:06 PM
    One method to do this may be to first read the data into arrays. Then, use the WHERE routine to find elements of the array where the data are above or below your thresholds. Then, change these elements to the quantized values. Below is an example where a random data set is generated. After that, all values less than 0.05 are set to zero and and all values greater than 0.7 will be set to 1. IDL> f = randomu(seed, 10) IDL> print, f 0.246459 0.196312 0.421719 0.000509440 0.891196 0.338354 0.0453506 0.263455 0.283703 0.206776 IDL> below = where(f lt 0.05, count) IDL> high = where(f gt 0.7, count2) IDL> f[below]= 0.0 IDL> f[high]=1.0 IDL> print, f 0.246459 0.196312 0.421719 0.000000 1.00000 0.338354 0.000000 0.263455 0.283703 0.206776
    You are not authorized to post a reply.