Can't find the error in my code
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Yency Perez
am 18 Sep. 2020
Kommentiert: Yency Perez
am 18 Sep. 2020
Hello everyone,
First I want to thank any help :).
I'm having trouble with my code, please help:
TS = @(x) 1 - 4*x + 4*x^2 - 2.67*x^3 + 1.33*x^4;
p1 = 1;
p2 = 0;
RelErr1 = abs ( (TS(p1) - 2*(exp^(-2*p1))) / (2*(exp^(-2*p1))));
RelErr2 = abs ( (TS(p2) - 2*(exp^(-2*p2))) / (2*(exp^(-2*p2))));
Sorry about the two thousand parenthesis, they represent my frustation :).
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Traveling Salesman (TSP) finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!