in your test suite it seems odd that rpz('a','b','-') is interpreted as 'a-b' while rpz('a','b','/') is interpreted as 'b/a' (instead of 'a/b'). Same goes for rpz('a','b','%') which is interpreted as 'b%a' instead of 'a%b'. Last, your last test case rpn(z(1),'+',z(2),'*',z(1),z(3),'-',z(4),z(5),'%','*') is plain weird... it should probably read rpn(z(1),z(2),'+',z(1),'*',z(3),'-',z(4),z(5),'%','*') instead...
Thank you for your comments; I will update the description and fix last test case.
I will retire the last test case for the problem.
I have an rpn solver but it only accepts strings
Sort a list of complex numbers based on far they are from the origin.
Filter AC, pass DC
Back to basics 4 - Search Path
Back to basics 22 - Rotate a matrix
Numbers at bit-boundary
Who am I ?
Next lexicographic - permutation
All Humans are Created Equal - Pareto Equality
Convert a cell-array of values to MATLAB source code
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office