Problem 49067. Area Conversion 1
Solution Stats
Problem Comments
-
9 Comments
need to use 3.28089357 and then round 4...
round to 4 places
conv ratio is 10.76425 by revers result i has it.remember round to 4
This is an amazingly ill-specified problem. A foot is exactly 0.3048 meters by definition, and the test suite apparently uses a different value, in addition to requiring rounding to four decimal digits (which is neither necessary nor correct).
Never use equality tests with floats.
dont use isequal() on a fricking float
also if you wanted to round a number to a specific decimal place, SPECIFY IT IN THE DESCRIPTION
What is the issue with this problem, even when the values come up same it shows assertion failed?
@Zuha Altaf Try rounding to four decimal digits.
A lot of negative comments and for just reason. I was banging my head on this for some time.
The option that worked for me is this, you're given feet squared and the answer of square meters in the sample problems. Easiest way is to find the conversion that works:
m^2 = ft^2 x conversion_FudgeFactor.
Get conversion_FudgeFactor to one side and solve. Use 'round' to 4 decimal places. It's really not fudged as you can get the answer online for direct conversion of ft^2 to m^2.
Just be careful of significant numbers. I used 4 decimal places.
Solution Comments
Show commentsProblem Recent Solvers798
Suggested Problems
-
Project Euler: Problem 4, Palindromic numbers
1138 Solvers
-
Getting the indices from a vector
10227 Solvers
-
2055 Solvers
-
1389 Solvers
-
366 Solvers
More from this Author180
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!