how to define the following function

How to define the following function in MATLAB
f(x) = 1 for 0<= x <= pi
f(x) = 1 for 0<= x <= pi

Réponses (1)

Thorsten
Thorsten le 21 Jan 2013
if 0 <= x && x <= pi, y = 0; end

Catégories

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by