What is the problem in this following program? Why my function isn't working?

1 visualización (últimos 30 días)
function [area] = tri_area(b,h)
tri_area(b,h)=(0.5)*(b)*(h)
area = tri_area(b,h)
end

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 21 de Sept. de 2020
Define it like this
function [area] = tri_area(b,h)
area = (0.5)*(b)*(h);
end

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by