plotting functions

Jan 14, 2014 at 11:38am

plotting functions

Hi all,
see enclosed.
this is a straightforward (or not) attempt to plot a function.
I am using lists, expression and a multi slider to show the values.
I does not work. Meaning that the function visible is not the one that is meant to be seen.
Interestingly if I use just a linear function all works…
Any idea what is wrong?
G.

<code>

– Pasted Max Patch, click to expand. –

</code>

#278234
Jan 15, 2014 at 6:33am

Lot’s of ways to do this sorta thing. And a lot of details that can throw it off.

Regarding your patch. zl group can only handle 256 list elements unless it is given an additional argument to specify more. ex. [zl 1000 group 1000]

The other thing I would suggest is throwing a metro in there so the multi slider is continually refreshing. That way, you can tweak the $f2 input value until you find what you’re looking for.

I also added ‘ghost lines’ to the points (in the inspector) to give the waveforms more body.

– Pasted Max Patch, click to expand. –
#278279
Jan 15, 2014 at 6:45am

You can also use a line object to drive the drawing. Set the multislider in reverse point scroll mode to plot the function a single pass.

– Pasted Max Patch, click to expand. –
#278281
Jan 15, 2014 at 7:02pm

Thanks a lot for the examples.
I found the error!
cos works in radiants…
;-)
All good now.
G

<code>

– Pasted Max Patch, click to expand. –

</code>

#278337
Jan 15, 2014 at 8:01pm

Your range is set from 0 to 1… not -1 to 1. I think that’s causing trouble too.

#278338
Jan 16, 2014 at 10:37am

thanks, but that is fine. the key issue was the cos.
G

#278387

You must be logged in to reply to this topic.