Help about function with if statement
1 view (last 30 days)
Show older comments
I have problem with creating function. I don´t know how to use command function properly. Can you guys tell me where I was wrong it will be very helpful
function [y]=task1(x)
if x>=8
y = 14*(5*x)^(1/2)+9;
end
if (-1<=x<8)
y=9*x +9;
end
if (x<-1) y=9;
end
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!