Hi guys,
I would like to ask about how do I define enum in matalb? I know there's enum classes in matalb & object oriented . but what Im asking is something more simple.
As in c/c++ I just was writing the type enum={Long,Short} -an array or list or whatever- and implicitly Long is configured to be equal to 1 (integer number), and short is equal to 2 (integer number).
what Im trying to do in matlab is :
I have function called ReverseBinary and gets one input as parameter called mode , i.e word the format of the function ReverseBinary(Mode) .
the parameter Mode is actually would have just two values Long, Short . and exactly as what I explained above I want to write an enum that Long is configured as 1, Short Configured as 2. So once I define that then I can call the function ReverseBinary(Long) or ReverseBinary(Short) , otherwise the parameters Long and Short aren't defined so I will get compilation error because Long/Short isn't defiend .
note- I call the function ReverseBinary from other funtion.
Any help please how I can do that in Matlab?
thanks alot.