MATLAB: My function gives me one output instead of 2

functionsmatlab function

For example:
function [area,peri]=triangle(a,b)
area=a.*b*0.5;
peri=a+b+sqrt(a.^2+b.^2);
In the coomand window I get only the first argument:
>> triangolo(3,4)
ans =
6

Best Answer

Call your function with two outputs.