plot (y;~]) x

R.E. Boss


> -----Oorspronkelijk bericht-----
> Van: programming-boun...@jsoftware.com [mailto:programming-
> boun...@jsoftware.com] Namens Linda Alvord
> Verzonden: maandag 19 maart 2012 8:18
> Aan: 'Programming forum'
> Onderwerp: Re: [Jprogramming] Several questions about j
> 
> Ooops.
> 
> I had rearranged my e-mail by order of the sender, and I thought I was in
> "current" time so I responded to an e-mail from August 15, 2011.  However,
I
> guess my comments are just as troubling as they would have been then.
> What
> about the negative numbers in the x-axis?
> 
> Linda
> 
> -----Original Message-----
> From: programming-boun...@jsoftware.com
> [mailto:programming-boun...@jsoftware.com] On Behalf Of Linda Alvord
> Sent: Monday, March 19, 2012 3:11 AM
> To: 'Programming forum'
> Subject: Re: [Jprogramming] Several questions about j
> 
> In my first example  plot  didn't do a good job with  i:5 .  The y-axis is
> labeled correctly but the  x-axis is not.
> 
> This is a better example of a plot.  (The actual plot doesn't copy into an
> e-mail.) The axes are labeled correctly.
> 
>    load 'plot'
>    x=:i.6
>    f=: 13 :'x^2'
>    g=: 13 :'x^3'
>    h=: 13 :'(f - g)x'
>    h
> [: (f - g) [
>    h x
> 0 0 _4 _18 _48 _100
>    i=: 13 :'(f x)-g x'
>    i x
> 0 0 _4 _18 _48 _100
>    plot h x
> 
> Actually the problem appears to be with negative numbers in the domain.
> This
> will also not show the  x-axis  correctly.
> 
>    x=:_5+i.11
>    x
> _5 _4 _3 _2 _1 0 1 2 3 4 5
>    y=: 13 :'x^2'
>    plot y x
> 
> Linda
> 
> 
> -----Original Message-----
> From: programming-boun...@jsoftware.com
> [mailto:programming-boun...@jsoftware.com] On Behalf Of Kim Kuen Tang
> Sent: Monday, August 15, 2011 5:09 AM
> To: programming@jsoftware.com
> Subject: [Jprogramming] Several questions about j
> 
> 
> Hi everyone,
> 
> here are some newbie questions regarding the differences between j and
> kdb.
> 
> Are verbs ( dyad or monad)  first-class citizen in j?
> Is it possible to forward a verb to another verb?
> Is it possible to box a verb into list ?
> Is it possible to have a dictionary like the case in kdb?  Something like
:
> (`a`b`c)!(1 2 3)
> 
> What i want to do in j is to program a verb (i will call it p) that will
> accept a monad and output a plot of this monad.
> 
> For example:
> 
> f=. 3: 0 'y^2'
> p=. (implementation)
> 
> p f will output the plot of f between -5 and 5.
> 
> 
> Thanks for any comments and answers.
> 
> Reagrds,
> 
> Kim
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to