To repeat your rules above in MATLAB, you can use the following code:
main.m341 chars10 lines
Make sure to replace the double quotes and single quotes with the appropriate characters for MATLAB, as the above code is using Python-style strings.
You can also store the rules in an array and use a loop to repeat them:
main.m384 chars16 lines
This will display each rule on a new line.
gistlibby LogSnag