How can I make a categorical variable based on a simple rule for a numeric variable?
Show older comments
Unfortunately all my searching hasn't led me this very simple problem.
I want to make a new binary variable "y" that is 0 for values of "yraw" that are <12, and "1" for values that are >12.
How can I do this?
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!