can be solved without 'regexp'
A slightly more robust test might include a balanced equation starting with something other than an opening bracket.
Test 3 might be
inStr = '3*(z*(a-(x+3))/(y))';
it doesn't work in some cases not included in test suite. for example:
inStr = '(z*(a-(x+3))/(y)*z)';
Seems to fail for inStr='(' , '((', etc.
I admit this is cheating, but I think it also stresses the need for more tests in the suite. Also, not all the cases should necessarily be visible, so you can't adapt a solution like this.
This solution fails for the input ')()', i.e. it returns true when it should return false.
This solution fails for the input '(()', i.e. it returns true when it should return false.
This entry is incorrect. It fails the simple case of:
What is the next step in Conway's Life?
Inner product of two vectors
Set some matrix elements to zero
CONVERT TAN TO SIN
Find the palindrome
Given two strings, find the maximum overlap
Find the sum of all the numbers of the input vector
Remove the vowels
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