hello this is my function code and command window code and there is a message of invalid expression at line 2 and i dont know what is the wrong can anyone help me
function [area] = tri_area([b,h]);
tri_area([b,h])=(0.5)*(b)*(h)
area=tri_area([b,h])
end
area = tri_area[3,2])
10 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_846810
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_846810
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_847571
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_847571
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_848805
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_848805
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_849719
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_849719
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_867373
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_867373
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_867603
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_867603
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_886589
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_886589
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_966391
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_966391
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_966445
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_966445
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_987749
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/516676-write-a-function-called-tri_area-returns-the-area-of-a-triangle-with-base-b-and-height-h#comment_987749
Sign in to comment.