MATLAB Answers

0

My function gives me one output instead of 2?

Asked by Riccardo Bondesan on 23 Jun 2019 at 7:58
Latest activity Answered by Riccardo Bondesan on 23 Jun 2019 at 8:14
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

  0 Comments

Sign in to comment.

2 Answers

Answer by madhan ravi
on 23 Jun 2019 at 8:04
 Accepted Answer

Call your function with two outputs.

  0 Comments

Sign in to comment.


Answer by Riccardo Bondesan on 23 Jun 2019 at 8:14

Thanks! It works now

  0 Comments

Sign in to comment.