How ı can write this function on Matlab

1 回表示 (過去 30 日間)
Emre Tutucu
Emre Tutucu 2020 年 6 月 4 日
I will enter an x ​​value

採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2020 年 6 月 4 日
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
Sulaymon Eshkabilov 2020 年 6 月 5 日
Your code had a few potential errs which are not MATLAB version problem.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by