//Created by T. Hengl (hengl@itc.nl) //Input parameters: %1-%6 membership maps, %7 - domain where the class names and colours are defined //Purpose: script to calculate mixed pixels, six memberships: c1, c2, c3, c4 ,c5 cx; needs the georeference; domain set at {dom=value;vr=0.000:1.000:0.001} c1_sim=rnd(sqrt(%1)*1000)/1000 c2_sim=rnd(sqrt(%2)*1000)/1000 c3_sim=rnd(sqrt(%3)*1000)/1000 c4_sim=rnd(sqrt(%4)*1000)/1000 c5_sim=rnd(sqrt(%5)*1000)/1000 cx_sim=rnd(sqrt(%6)*1000)/1000 maxMB_01=max(c1_sim, c2_sim, c3_sim) maxMB_02=max(c4_sim, c5_sim, cx_sim) max1MB=max(maxMB_01,maxMB_02) calc max1MB.mpr PM_sim{domain=%7}=iff(max1MB=c1_sim, "c1", iff(max1MB=c2_sim, "c2", iff(max1MB=c3_sim, "c3", iff(max1MB=c4_sim, "c4", iff(max1MB=c5_sim, "c5", iff(max1MB=cx_sim, "ext", ?))))) ) setdom PM_sim.mpr %7 [- force] calc PM_sim.mpr -force breakdep PM_sim.mpr -force setdescr PM_sim.mpr Single randomization of pixel mixture for Wesepe dataset del maxMB_0?.mpr -force //To run multiple simulations you can use this extra line: //copy PM_sim.mpr PM_sim01.mpr -breakdep