Hello
I search a programm witch can split a graph in 3spaces
Perhaps If X<=2 Y=2X
If 10<X>2 Y=5x
If X>=10 Y=50
Is there any possibility to make this
if function in graph
Voir le premier message non lu • 8 messages
• Page 1 sur 1
-
sportler1993
Niveau 4: MC (Membre Confirmé)- Messages: 13
- Inscription: 19 Sep 2012, 17:18
- Localisation: Switzerland
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: if function in graph
Hi,
You can directly do it in a function on TI-Nspire :
and draw the function f1(x) = myfunc(x) in a Graph page.
You can directly do it in a function on TI-Nspire :
- Code: Tout sélectionner
: Define myfunc(x) = Func
: If x <= 2
: Return 2*x
: If x > 2 and x < 10
: Return 5*x
: Return 50
: EndFunc
and draw the function f1(x) = myfunc(x) in a Graph page.
-
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)- Messages: 6414
- Images: 22
- Inscription: 27 Nov 2008, 00:00
- Localisation: 0x1AACC355
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: BAC+5: Epita (ING3)
Re: if function in graph
Thanks
But i dont know where i should enter this code?
Thanks for help
But i dont know where i should enter this code?
Thanks for help
-
sportler1993
Niveau 4: MC (Membre Confirmé)- Messages: 13
- Inscription: 19 Sep 2012, 17:18
- Localisation: Switzerland
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: if function in graph
You can also use the function "when" or better, the "piecewise template", that is the left bracket { with 4 spaces 2 by 2 separated by commas.
The syntax for the piecewise template is :
where the left brackets should be only one bracket on you calc.
The one for "when" is :
If you use Levak's method, you should create a "function" using the editor on calc.
The syntax for the piecewise template is :
- Code: Tout sélectionner
{ 2x , x<=2
{ 5x , x>2 and x<10
{ 50 , x>=10
where the left brackets should be only one bracket on you calc.
The one for "when" is :
- Code: Tout sélectionner
when(x<=2, 2x, when(x<10, 5x,50))
If you use Levak's method, you should create a "function" using the editor on calc.
-
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)- Messages: 5669
- Inscription: 11 Mar 2008, 00:00
- Localisation: Lyon
- Genre:
- Calculatrice(s):→ MyCalcs profile
if function in graph
Whiy this code dont work?
How can i define a?
How can i define a?
- Code: Tout sélectionner
: Define myfunc(x) = Func
: a=2x
: If a <= 2
: Return 2*x
: If a > 2 and a < 10
: Return 5*x
: Return 50
: EndFunc
-
sportler1993
Niveau 4: MC (Membre Confirmé)- Messages: 13
- Inscription: 19 Sep 2012, 17:18
- Localisation: Switzerland
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: if function in graph
a:=2x and Endif .
-
ExcaleAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)- Messages: 2955
- Images: 3
- Inscription: 10 Sep 2010, 00:00
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: if function in graph
Hi
You also should use "Local a" at the beginning of the functiin since in a Func (contrary to a Prgm) you cannot modify the external variables.
You also should use "Local a" at the beginning of the functiin since in a Func (contrary to a Prgm) you cannot modify the external variables.
-
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)- Messages: 6414
- Images: 22
- Inscription: 27 Nov 2008, 00:00
- Localisation: 0x1AACC355
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: BAC+5: Epita (ING3)
Re: if function in graph
The "Endif" is not necessary : there is no "Then".
Is is useless when there is only one instruction after "If".
As for the "Local", you HAVE TO use it in a function.
Is is useless when there is only one instruction after "If".
As for the "Local", you HAVE TO use it in a function.
-
BisamAdmin
Niveau 15: CC (Chevalier des Calculatrices)- Messages: 5669
- Inscription: 11 Mar 2008, 00:00
- Localisation: Lyon
- Genre:
- Calculatrice(s):→ MyCalcs profile
8 messages
• Page 1 sur 1
Retourner vers Problèmes divers / Aide débutants
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 20 invités