PracticeTestGeeks home

MATLAB FREE MATLAB Functions and Flow Control Questions and Answers

A function `calculateArea` is defined as follows:
```matlab

function area = calculateArea(width, height)

if nargin == 1

% Assume a square if only one input is given

height = width;

end

area = width * height;

end

```

What is the output of the command `calculateArea(5)`?

Select your answer