How to write a function ?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Risposta accettata
David Hill
il 6 Mag 2020
y=-sin(x/15)*1000./((x-90).^2+(y-110).^2+60)+sin(x/30)*500./((x-55).^2+(y-55).^2+30)+80./(12+abs(x-15))+60./(12+abs(x-20))+80./(12+abs(x-25));
1 Commento
Rik
il 6 Mag 2020
To improve readability I would suggest a line break after every term:
y=-sin(x/15)*1000./((x-90).^2+(y-110).^2+60) ...
+sin(x/30)*500./((x-55).^2+(y-55).^2+30) ...
+80./(12+abs(x-15)) ...
+60./(12+abs(x-20)) ...
+80./(12+abs(x-25));
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB 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!