Create a function that returns the square and the squareroot

Create a function that returns the square and the squareroot of a number supplied by the script or command line that calls it. Make sure the output includes a statement to indicate which in which.

Solution

PROGRAM:

%From Command Prompt:

% function to get powers : For square n=2 used & for square root n=0.5 used.

function [y,z] = powers(x)

 Create a function that returns the square and the squareroot of a number supplied by the script or command line that calls it. Make sure the output includes a

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site