-
3 Comments
Wow...never thought this one also do the trick. Awesome!
Why does str2num work for anonymous function?
Don't be confused by the name "str2num", which might give you a wrong impression that this function only works for str to number conversion. In fact, it is more powerful because it supports evaluation of any valid string or character represented MATLAB expressions in much the same way eval does. The underlying implementation of str2num is indeed based on eval. Check the documentation and source file for more details.
Suggested Problems
-
400 Solvers
-
Set the array elements whose value is 13 to 0
1377 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
382 Solvers
-
Sum of odd numbers in a matrix
588 Solvers
-
362 Solvers
More from this Author17
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!