Problem 43154. Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead of result.
Solution Stats
Problem Comments
- 
		2 Comments
		Matthew Eicholtz
    	on 9 May 2017
	
	
  	Why return 'ERROR' when the result is 0? Doesn't seem like an error to me.
		David Verrelli
    	on 18 Jan 2018
	
	
  	Hello, Matthew Eicholtz. For division of x by y there are no cases in the Test Suite that could return a result of 0. Note: the use of mldivide in the template could be causing confusion. —DIV
Solution Comments
Show commentsProblem Recent Solvers141
Suggested Problems
- 
         The Hitchhiker's Guide to MATLAB 3361 Solvers 
- 
         Is my wife right? Now with even more wrong husband 1335 Solvers 
- 
         Project Euler: Problem 1, Multiples of 3 and 5 3482 Solvers 
- 
         Element by element multiplication of two vectors 385 Solvers 
- 
         
         362 Solvers 
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!