Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please do Question 4 in MATLAB e Chegg Study! Guided S:x\\eComputer Science ques

ID: 3887046 • Letter: P

Question

Please do Question 4 in MATLAB

e Chegg Study! Guided S:xeComputer Science questx/D Assignment 4.pdf × Secure https://app.lms unimelb.edu.au/bbcswebdav/pid-5834078-dt content-rid-242941412/courses/ENGR100032017 SM2/Assignment 4.pdf : Apps G Google - My Home-Blackbo Login-The Universi: Watch Game of Thro Assignment 4.pdf 5 1 7 1 if the speed is supersonic Question 4 10 Marks] A Pythagorean triple is a set of positive integers (a, b, c) such that: Write a function isPythag that with the following signature. function p = 1sPythag(a, b, c) Inputs: a, b, c in the same order as specified in the problem statement Output:P 1 the sides form a Pythagorean triangle 0 the sides do not form a Pythagorean triangle (inputs are valid) -1 the inputs are not valid - they are not positive integers Question 5 10 Marks] Biomedical engineers are developing an insulin pump for diabetics. To do this, it is important to understand how insulin is cleared from the body after a meal. The concentration of insulin 2-36 AM 5/09/2017 2 Type here to search

Explanation / Answer

Hi,

here is the code in matlab, please save it as a function and run it

function x=ispythogeran(a,b,c)
if (a+b > c & a+c > b & b+c > a) % if sum of any 2 sides is less than third then its not valid traingle
if(a^2 + b^2 == c^2) %checking pythogoreans conditon
p=1
return
else
p=0
return
else
p=-1 %invalid input
end
ispythogeran(1,2,3);
end
Thumbs up if this was helpful, otherwise let me know in comments