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
functionsmatlab function
function [area,peri]=triangle(a,b)area=a.*b*0.5;peri=a+b+sqrt(a.^2+b.^2);
>> triangolo(3,4)ans = 6
Best Answer