Write a MATLAB function that accepts the length (L) and width (W) of a rectangle and returns two outputs: its area and its perimeter. The function must be able to handle scalar numbers as well as arrays (calculating the properties for multiple rectangles at once).
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers4
Suggested Problems
-
MATLAB 101: Rectangle Properties
4 Solvers
More from this Author30
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!