How ı can write this function on Matlab

1 次查看(过去 30 天)
I will enter an x ​​value

采纳的回答

Sulaymon Eshkabilov
Hi,
Here is one of the possible solutions for x having a single value:
function Y = MY_fun(x)
if x>=1 && x<10
Y = exp(-x-1)/(log10(x)+log(x));
elseif x>=10
Y=sin(3*x)/sqrt(3*pi);
else
Y = x^(-exp(1)+x)+sqrt(x)*abs(x);
end
end
  13 个评论
Emre Tutucu
Emre Tutucu 2020-6-5
thanks for your comment but i got it. wrong was not in code, in my matlab version. İts okay now.
Thanks again :)
Sulaymon Eshkabilov
Your code had a few potential errs which are not MATLAB version problem.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by