Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to create a window where a student may enter an equation and, by clicking on a button, the function gets plotted.


In the original Spanish:

Quiero realizar una ventana en la cual el alumno tenga la opción de ingresar una ecuación la cual al presionar un botón se grafique.

share|improve this question
    
Sorry, but this question is totally incomprehensible. You might even do better to ask in Spanish, rather than using wrongly machine-translated English that nobody can understand. // Lo sentimos, pero esta cuestión es totalmente incomprensible. Incluso puede ser mejor preguntar en español, en lugar de la máquina incorrecta traducido Inglés que nadie puede entender. –  Oleksandr R. Jan 3 at 2:59
2  
Although I really like your language, it is convenient to write in English on this site. Would you mind to translate it for us? –  halirutan Jan 3 at 20:09
    
Perhaps you can use DialogInput. –  Michael E2 Jan 3 at 20:58
    
@MichaelE2 I hijacked the edit and changed "function" to "equation". –  Yves Klett Jan 3 at 20:59
    
@halirutan sorry--I thought it would probably be better for the OP to ask in a language in which she can produce a coherent question and rely on someone else to translate, rather than writing in hopelessly broken English. I realise that this isn't completely ideal, but it gives us all the best chance of being able to communicate. If the questions aren't any good for other reasons, that's another issue, of course. –  Oleksandr R. Jan 3 at 21:08

1 Answer 1

up vote 3 down vote accepted
Panel[DynamicModule[{f = Sin[x^2]}, 
  Column[{InputField[Dynamic[f]], Dynamic[Plot[f, {x, -5, 5}]]}]]]

or even simpler

Manipulate[Plot[f, {x, -5, 5}], {f, Sin[x^2]}]

enter image description here

I am not sure what exactly you are trying to do with your students. But if the goal is to spare them programming Plot[...] etc., you could just use free form linguistic input (or go to Wolfram|Alpha). The advantage is students wouldn't have to know strict syntax for functions:

enter image description here

share|improve this answer
    
If that's what I want, but instead of putting Sin in English, Spanish put in Seno –  Starlight Jan 3 at 22:40
    
@JennyOjeda pretendes demasiado. WolframAlpha puede entender código en lenguaje natural pero sólo en inglés por ahora. / You are hoping for too much. I believe WolframAlpha for now can only interpret natural input in English –  Rojo Jan 3 at 23:01
    
@JennyOjeda Yes for now W|A is English only, but I thought mathematical symbols are universal: sin(x) is that in any language –  Vitaliy Kaurov Jan 3 at 23:05
    
@VitaliyKaurov $余弦^2(x) + 正弦^2(x) = 1$ :D –  rm -rf Jan 4 at 2:04
    
I need to make a window in mathematica, it is the only software i can handle, and I would add that textfield in which you enter the abbreviated function Seno ie Sen (x) and i don´t know how to convert. –  Starlight Jan 4 at 19:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.