Assume you want to delete the ith entry from an intvec v of length >=2: [code] if(i==1) { v=v[2..size(v)]; } else { if(i==size(v)) { v=v[1..i-1]; } else { v=v[1..i-1],v[i+1..size(v)]; } } [/code]
Posted: Mon Dec 14, 2015 11:15 am
DZDjokovic
Post subject:
deleting an entry from intvec
How do I delete an entry from an intvec? Could not find any function that does it.
How do I delete an entry from an intvec? Could not find any function that does it.