om_1
DownloadTélécharger
Actions
Vote :
ScreenshotAperçu
Informations
Catégorie :Category: nCreator TI-Nspire
Auteur Author: Useronly101
Type : Classeur 3.0.1
Page(s) : 1
Taille Size: 1.46 Ko KB
Mis en ligne Uploaded: 16/01/2025 - 21:51:12
Uploadeur Uploader: Useronly101 (Profil)
Téléchargements Downloads: 2
Visibilité Visibility: Archive publique
Shortlink : http://ti-pla.net/a4460613
Type : Classeur 3.0.1
Page(s) : 1
Taille Size: 1.46 Ko KB
Mis en ligne Uploaded: 16/01/2025 - 21:51:12
Uploadeur Uploader: Useronly101 (Profil)
Téléchargements Downloads: 2
Visibilité Visibility: Archive publique
Shortlink : http://ti-pla.net/a4460613
Description
Fichier Nspire généré sur TI-Planet.org.
Compatible OS 3.0 et ultérieurs.
<<
-- Function to calculate the minimum time based on the Bang-Bang Law define function calculate_min_time(D, Kvj, Kaj) -- Ensure D, Kvj, and Kaj are positive (absolute values for safety) local abs_D = math.abs(D) -- Calculate the two terms of the formula local term1 = (2 * abs_D) / Kvj local term2 = 2 * math.sqrt(abs_D / Kaj) -- Return the maximum of the two terms return math.max(term1, term2) end -- Main program -- Input values (example) local D = 10 -- Displacement local Kvj = 5 -- Maximum velocity constant local Kaj = 2 -- Maximum acceleration constant -- Call the function and print the result local min_time = calculate_min_time(D, Kvj, Kaj) print("Minimum time (t_fj):", min_time) Made with nCreator - tiplanet.org
>>
Compatible OS 3.0 et ultérieurs.
<<
-- Function to calculate the minimum time based on the Bang-Bang Law define function calculate_min_time(D, Kvj, Kaj) -- Ensure D, Kvj, and Kaj are positive (absolute values for safety) local abs_D = math.abs(D) -- Calculate the two terms of the formula local term1 = (2 * abs_D) / Kvj local term2 = 2 * math.sqrt(abs_D / Kaj) -- Return the maximum of the two terms return math.max(term1, term2) end -- Main program -- Input values (example) local D = 10 -- Displacement local Kvj = 5 -- Maximum velocity constant local Kaj = 2 -- Maximum acceleration constant -- Call the function and print the result local min_time = calculate_min_time(D, Kvj, Kaj) print("Minimum time (t_fj):", min_time) Made with nCreator - tiplanet.org
>>