+1 Nice cheat! I cannot really figure this one out. Seems like regexprep has access to a variable outside of its current workspace? (I am not on my computer right now, is this cody-specific or does this replicate in other settings?)
a small follow-up: I replicated this behavior (both in R2008b and R2015a) and regexprep dynamic ${ } operator seem to have access to *both* variables in the currently active workspace as well as in its parent workspace... never would have guessed that, thanks LY!
haha,??@cmd also has access to variables in the current as well as its parent,but ?@cmd doesn't.
56339 Solvers
Get the area codes from a list of phone numbers
538 Solvers
Increment a number, given its digits
564 Solvers
Create a Multiplication table matrix...
286 Solvers
Test Problem; Create a 5x5 array containing all ones
276 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!