Message Boards Message Boards

0
|
3882 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How do i make a numerical oscillator?

Posted 9 years ago
Animate[Sin[x],{x,0,2Pi}]

Why can't I use the output from the code above as a Dynamic numerical value? Is there any other function like Animate, but that gives a pure integer output?

POSTED BY: barham hemin
3 Replies

is there any other functions like animate but give pure integer output?

I do not understand what you mean by giving pure integer output. If you want the x,y data, then the command to use is Table

data = Table[{x, Sin[x]}, {x, 0, 2 Pi, .1}];
ListPlot[data]

If you meant something else, may be you can clarify or give example of what you are looking for.

POSTED BY: Nasser M. Abbasi
Posted 9 years ago

This will make the value of Sin[x] available outside of the Animate:

Dynamic[out]
Animate[out = Sin[x]; Sin[x], {x, 0, 2 Pi}]

enter image description here

POSTED BY: Hans Milton
Posted 9 years ago

That was exactly what i was looking for Hans Milton i tried things like

out=Animate[Sin[x],{x,0,2 Pi}]

but it didn't seem to work , now i have all the control that i want over my Arduino

POSTED BY: barham hemin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract