π
<-

lugar geometrico raiz


File hierarchy

 Downloads
 Files created online(30922)
 TI-Nspire
(22264)

 nCreator(4704)

DownloadTélécharger


LicenceLicense : Non spécifiée / IncluseUnspecified / Included

 TéléchargerDownload

Actions



Vote :

ScreenshotAperçu


Informations

Catégorie :Category: nCreator TI-Nspire
Auteur Author: TrueDuck
Type : Classeur 3.0.1
Page(s) : 1
Taille Size: 6.07 Ko KB
Mis en ligne Uploaded: 08/09/2025 - 21:25:28
Uploadeur Uploader: TrueDuck (Profil)
Téléchargements Downloads: 1
Visibilité Visibility: Archive publique
Shortlink : https://tipla.net/a4835598

Description 

Fichier Nspire généré sur TI-Planet.org.

Compatible OS 3.0 et ultérieurs.

<<
-- Root Locus (Lugar Geométrico de las Raíces) para TI-Nspire -- Ingresas coeficientes de N(s) y D(s) (orden descendente), Kmax y pasos. -- Requiere CAS (CX CAS). Usa CAS 'zeros()' para raíces del polinomio. -- Por: ChatGPT platform.apilevel = '2.7' local gc      -- graphics context local num = {}    -- coef N(s) local den = {}    -- coef D(s) local Kmax = 100 local nSteps = 100 local Ks = {} local rootsPerK = {}  -- tabla: { [kIndex] = { {re,im}, ... } } local currentIdx = 1 ---------------------------------------------------------------- -- Helpers ---------------------------------------------------------------- local function trim(s) return (s:gsub("^%s+",""):gsub("%s+$","")) end local function splitCSV(s)   local t = {}   for token in string.gmatch(s, '([^,]+)') do     table.insert(t, tonumber(trim(token)))   end   return t end -- from {a_n,...,a0} build CAS poly string a_n*s^n + ... + a0 local function polyToString(coefs, var)   local n = #coefs   local terms = {}   for i,c in ipairs(coefs) do     local pow = n - i     if c ~= 0 then       local coefStr       if math.abs(c) == 1 and pow > 0 then         coefStr = (c < 0) and "-" or ""       else         coefStr = tostring(c)       end       local term       if pow == 0 then         term = coefStr       elseif pow == 1 then         term = coefStr .. var       else         term = coefStr .. var .. "^" .. pow       end       table.insert(terms, term)     end   end   if #terms == 0 then return "0" end   local poly = terms[1]   for i=2,#terms do     local t = terms[i]     if string.sub(t,1,1) == "-" then       poly = poly .. t  -- already has minus     else       poly = poly .. "+" .. t     end   end   return poly end -- D_K(s) = D(s) + K*N(s) local function DK_string(K)   -- iguala grados rellenando con ceros   local nD, nN = #den, #num   local n = math.max(nD, nN)   local D, N = {}, {}   for i=1,n do     D[i] = den[i - (n - nD)] or 0     N[i] = num[i - (n - nN)] or 0   end   -- coefs de D + K*N   local coefs = {}   for i=1,n do     coefs[i] = D[i] + K * N[i]   end   return polyToString(coefs, "s") end -- pide raíces del polinomio a CAS: zeros(poly, s) local function rootsCAS(polyStr)   -- devoluciones típicas: lista {a+bi, c+di, ...} o {a, b, ...}   local cmd = "zeros(" .. polyStr .. ", s)"   local out = math.eval(cmd)   -- Convertir a tabla de {re,im}   local r = {}   -- Quitar llaves   out = tostring(out or "")   out = out:gsub("[%{%}]", "")   -- separar por comas de nivel top (aprox)   for token in string.gmatch(out, '([^,]+)') do     token = trim(token)     -- form "a+bi" o "a-bi" o solo "a"     local re, im = 0, 0     if token:find("i") then       token = token:gsub("%s","")       token = token:gsub("","-") -- por si sale signo largo       -- reemplazar a+bi por re,im       local sign = 1       local pos = token:find("[+%-][^+%-]*i$")       if pos then         local reStr = string.sub(token,1,pos-1)         local imStr = string.sub(token,pos,#token-1)         re = tonumber(reStr) or 0         im = tonumber(imStr) or 0       else         -- algo como "bi"         local imStr = token:gsub("i","")         im = tonumber(imStr) or 0         re = 0       end     else       re = tonumber(token) or 0       im = 0     end     table.insert(r, {re, im})   end   return r end local function computeAll()   Ks, rootsPerK = {}, {}   for i=1,nSteps do     local K = (i-1) * (Kmax/(nSteps-1))     Ks[i] = K     local poly = DK_string(K)     local r = rootsCAS(poly)     rootsPerK[i] = r   end   currentIdx = 1 end ---------------------------------------------------------------- -- UI entrada de datos ---------------------------------------------------------------- local state = "input" -- "input" or "plot" local input = {   num = "",   den = "",   Kmax = "100",   steps = "100",   msg = "Ingresa coeficientes (descendentes). Ej: num: 1,1  den: 1,5,-6,0" } function on.create()   gc = platform.gc() end function on.paint(gc)   gc:clear()   if state == "input" then     gc:setFont("sansserif","r",12)     gc:drawString("LGR - Ingrese datos", 10, 10)     gc:drawString("Numerador N(s)  (ej: 1,1)", 10, 40)     gc:drawRect(10,55,300,20)     gc:drawString(input.num, 15, 58)     gc:drawString("Denominador D(s) (ej: 1,5,-6,0)", 10, 90)     gc:drawRect(10,105,300,20)     gc:drawString(input.den, 15, 108)     gc:drawString("Kmax", 10, 140); gc:drawRect(60,135,80,20); gc:drawString(input.Kmax, 65, 138)     gc:drawString("Pasos", 160, 140); gc:drawRect(210,135,80,20); gc:drawString(input.steps, 215, 138)     gc:drawString("Enter: calcular   |   Tab: cambiar campo", 10, 175)     gc:drawString(input.msg, 10, 200)   else     -- plot     local w,h = gc:getWindowSize()     gc:setFont("sansserif","r",11)     gc:drawString("LGR  (Ä/º para K)   K="..string.format("%.3g", Ks[currentIdx] or 0), 10, 10)     -- Ejes     local left, right = -10, 10     local bottom, top = -10, 10     local function X(x) return 40 + (x - left) * (w-80) / (right-left) end     local function Y(y) return h-40 - (y - bottom
[...]

>>

-
Search
-
Social TI-Planet
-
Featured topics
Ndless for CX 4.5.5 / CX II 6.2.0
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
12345
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
3404 utilisateurs:
>3386 invités
>10 membres
>8 robots
Record simultané (sur 6 mois):
32248 utilisateurs (le 01/09/2025)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)