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 件のコメント
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
このコメントへの直接リンク
https://jp.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
サインインしてコメントする。