How ı can write this function on Matlab
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Emre Tutucu
il 4 Giu 2020
Commentato: Sulaymon Eshkabilov
il 5 Giu 2020
I will enter an x value
0 Commenti
Risposta accettata
Sulaymon Eshkabilov
il 4 Giu 2020
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 Commenti
Sulaymon Eshkabilov
il 5 Giu 2020
Your code had a few potential errs which are not MATLAB version problem.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!