Your vet can help sort through these possibilities and hopefully find a treatable cause. There are probably other causes. A brief episode like you saw is probably related to ingesting that was upsetting. I have seen this after one of my cats ate a spider. Licking toads will do this, too.
Hair balls are obviously one cause of feeling nauseous.
If you live in an area with heartworms it is another cause of the hacking and vomiting problem some cats have. Inflammatory bowel disease is another. Your vet can help sort through these, too. In general it is a good idea to consider pursuing a diagnosis of vomiting if it is occurring frequently and coughing is almost always abnormal. Mike - I have a 7 year old healthy male cat, neutered since 6 mos.