Hi, I'm new to Matlab and have a lot of difficulty understanding how to properly write functions. I need to write a function ispythag that will recieve three positive integers (a,b,c) that will return a logical 1 if they form a pythagorean triple, or logical 0 if they don't. I also cannot use if or select statements.This is the code I have written but I always get an error saying unrecognized function or variable 'a', however when I write a script using this code and write "ispythag(1,2,3)" or "ispythag(3,4,5)" in the command prompt, I get the logical answers I need. After several attempts at changing my code without success, I was hoping someone might be able to lend me some guidance. Thank you very much for your time and help!
Ptriple = ispythag(a,b,c)
Ptriple = a^2+b^2 == c^2;