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
Read a column of numbers and interpolate missing data
7 segment LED display
nth Rational Number
Bell Number calculator
Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
Numbers at bit-boundary
Who am I ?
Next lexicographic - permutation
Is the paranthesis sequence balanced ?
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