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
Find matching parenthesis
Similar Triangles - find the height of the tree
Selecting books on MATLAB for experts and beginners (blindfolded)
01 - Scalar variables
Swap two numbers
Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
Next lexicographic - permutation
Greed is good - Simple partition P[n].
Reduce - Map-Reduce
Numbers at bit-boundary
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