Friday, 23 June 2017

Removing blanks from julia arrays


j> a = [contains("$i", "gmsh_")? i: "" for i in names(abaqusElements₂)]
15-element Array{Any,1}:\n
 ""                
 ""                
 ""                
 ""                
 ""                
 ""                
 ""                
 ""                
 :gmsh_n           
 :gmsh_elType      
 :gmsh_nParams     
 :gmsh_param1      
 :gmsh_param2      
 :gmsh_topo        
 :gmsh_physicalName
There we see the blanks.
j> filter!(e->e∉["", :gmsh_physicalName], a)

7-element Array{Any,1}:
 :gmsh_n           
 :gmsh_elType      
 :gmsh_nParams     
 :gmsh_param1      
 :gmsh_param2      
 :gmsh_topo        

Thursday, 22 June 2017