Search this blog!

Thursday, December 15, 2011

How to use binary variable/ TRUE FALSE in MATLAB?

You know in C++ you may write the following

bool binary_variable=TRUE; // Or FALSE

But How to do that in MATLAB?

>>true([m, n])
This will create an m-by-n matrix of binary (logical) ones // TRUE
>>false ([m, n])
For m-by-n matrix of binary (logical) zeros // FALSE

No comments:

Post a Comment