Function with 2 outputs

41 Views Asked by At

I have written the following code:

function [ z,a ] = complx( numb )
z=abs(numb);
a=angle(numb);

end

but I get back just z and not a

1

There are 1 best solutions below

0
On BEST ANSWER

You should call the function as followed:

[z,a]=complx(numb)

If you call the function just:

complx(numb)

then it returns only the first output, z.