Matlab conditional assignment

Viewed 50105

I'm looking for Matlab equivalent of c# condition ? true-expression : false-expression conditional assignment. The most I know of is a = 5>2, which is true\false assignment,
but is there any one line conditional assignment for if condition a=1;else a=2; end?

3 Answers
Related