Re: [Jprogramming] Filling in Missing Parts of a Sequence

2023-07-24 Thread Mario C
There is a verb resamp in https://code.jsoftware.com/wiki/Phrases/Arith.
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] [Jgeneral] interpolation (equidistant re-sampling)

2021-05-08 Thread Mario C
In these cases I use resamp from
https://code.jsoftware.com/wiki/Phrases/Arith.

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


Re: [Jprogramming] Fwd: problem with math/uu

2020-06-29 Thread Mario C
Thank you very much.
Mario

Ian Clark  schrieb am Di., 30. Juni 2020, 01:19:

> Bug fixed in math/uu, Version 2.1.27. Please update via package manager.
>
>load 'math/uu'
>
> uu '1 /mm^2' NB. viz. "one item per square-mm"
>
> 1.0E6 /m²
>
> uu'*ssic 3' NB. set SI conformity level to 3 for output
>
> 3
>
> uu '1 /mm^2'
>
> 1.0E6 m⁻²
>
> uu '1 mm⁻²'
>
> 1.0E6 m⁻²
>
> VERSION_uu_
>
> 2.1.27
>
>
> Thank you for reporting bugs in math/uu.
>
> Please continue to report failures to conform to the "SI Units" standard.
>
>
> Ian Clark
>
>
> On Sat, 27 Jun 2020 at 13:31, Mario C  wrote:
>
> > There is an other problem.
> >uu '1 /mm^2'
> > 1.0E-6 /m^2 is wrong.
> >
> > 2.1.26 j901 Windows and Android
> > Mario
> > --
> > 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


Re: [Jprogramming] Fwd: problem with math/uu

2020-06-28 Thread Mario C
  uu '1 /mm'
0.001 /m  NB. ist wrong

NB.should be 1e3 /m

   uu '1 mm'
0.001 m  NB. is correct

and

'MPa' uu '1 N/mm^2'

should be 1 MPa

Mario

Hauke Rehr  schrieb am So., 28. Juni 2020, 18:27:

> I think the question was rather about
> 1e_6 = % *: 1e_3
> 0
> Instead,
> 1e6 = % *: 1e_3
> 1
> But I don’t know math/uu; is / supposed to denote %?
> Does uu '1 /(mm^2)' work?
>
> Am 28.06.20 um 18:15 schrieb Tom Arneson:
> > Why?
> > 1e6=*:1000
> > 1
> >
> >> On June 27, 2020 at 7:31 AM Mario C  wrote:
> >>
> >> There is an other problem.uu '1 /mm^2'1.0E-6 /m^2 is wrong.
> >> 2.1.26 j901 Windows and
> AndroidMario--For
> information about J forums see http://www.jsoftware.com/forums.htm
> > --
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
> --
> --
> mail written using NEO
> neo-layout.org
>
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Fwd: problem with math/uu

2020-06-27 Thread Mario C
There is an other problem.
   uu '1 /mm^2'
1.0E-6 /m^2 is wrong.

2.1.26 j901 Windows and Android
Mario
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Fwd: problem with math/uu

2020-05-06 Thread Mario C
Thank you very much.
Mario

Ian Clark  schrieb am Mi., 6. Mai 2020, 13:43:

> Addon: math/uu fixed…
>
> 'm^2' uu '1 cm cm'
>
> 1.0E-4 m²
>
> 'm^2' uu '1 cm^2'
>
> 1.0E-4 m²
>
> VERSION_uu_
>
> 2.1.26
>
>
> Please update addon: math/uu
>
> On Tue, 5 May 2020 at 05:52, Ian Clark  wrote:
>
> > Thanks for pointing this out.
> > It appears math/uu is reading 'cm^2' as: c(m^2) instead of: (cm)^2
> > The bug affects every use of a scaling prefix (c, m, …) together with a
> > power.
> > I'll get to work on a fix for this.
> >
> >
> > On Tue, 5 May 2020 at 00:37, Tom Arneson  wrote:
> >
> >> I see the same problem in both Windows and Android j901/j64/android
> >>
> >>
> >> > -- Original Message --From: Mario C <
> mc235...@gmail.com>To:
> >> programming@jsoftware.comDate: May 4, 2020 at 4:49 PMSubject:
> >> [Jprogramming] problem with math/uu
> >> > load 'math/uu' NB. math/uu 2.1.24
> >> > There is a difference between
> >> > 'kN' uu '10990 bar cm cm'109.9 kN
> >> > and
> >> > 'kN' uu '10990 bar cm^2'10990 kN
> >> > Only the first solution is correct.
> >> > Engine: j901/j64avx/windowsRelease-e: commercial/2020-01-29Library:
> >> 9.01.23
> >> > But both work fine with Android (math/uu 2.1.24):Engine:
> >> j901/j32/androidRelease-e: commercial/2020-02-09T15:23:16Library:
> 9.01.22
> >> >
> >>
> Mario--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


[Jprogramming] problem with math/uu

2020-05-04 Thread Mario C
  load 'math/uu'NB. math/uu 2.1.24

There is a difference between

  'kN' uu '10990 bar cm cm'
109.9 kN

and

  'kN' uu '10990 bar cm^2'
10990 kN

Only the first solution is correct.

Engine: j901/j64avx/windows
Release-e: commercial/2020-01-29
Library: 9.01.23

But both work fine with Android (math/uu 2.1.24):
Engine: j901/j32/android
Release-e: commercial/2020-02-09T15:23:16
Library: 9.01.22

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


Re: [Jprogramming] generate integers from a to be with a step

2020-04-04 Thread Mario C
I prefer
load 'numeric'
steps 5 9 8
etc.

The definitions of steps in 'stats/base' and 'numeric' are identical.

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


[Jprogramming] spline - fix

2019-11-20 Thread Mario C
I think there is a mistake in verb cubicspline (spline addon) for intervals
different than 1.0.

If you try an interval of 0.1:

load 'math/misc/spline plot numeric'
x=. 1.1 1.2 1.3 1.4 1.5
y=. 351.6 351.6 354.6 371.0 387.7
csp=. cubicspline x,:y
plot csp interspline range 1.1 1.5 0.02

you see the problem.

It works after removal of the square verb in line 16 of spline.ijs (verb
cubicspline).
line 16 old: w=. 3 * diff k % *: h
line 16 new: w=. 3 * diff k % h

Regards,
Mario
(j901beta-p j9.01.13 win64)
--
For information about J forums see http://www.jsoftware.com/forums.htm


[Jprogramming] plot type - horizontal bar chart

2019-06-12 Thread Mario C
Is there a chance to get the plot type of a horizontal bar chart?

Best regards, Mario Chemnitz
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Expression to generate sequ

2018-04-08 Thread Mario C
Hi, that's my version with i:

seq=: monad : '{.y+/(-@>:@| {. i:) (-/|.y)'


Mario

Devon McCormick  schrieb am So., 8. Apr. 2018, 01:52:

> Thanks to everyone who answered - there were a few that were just what I
> needed.
>
> On Sat, Apr 7, 2018 at 6:48 AM, 'Pascal Jasmin' via Programming <
> programm...@jsoftware.com> wrote:
>
> > there is also,
> >
> > iota =: i. : (+ i.)
> >
> >
> >  3 iota 5
> > 3 4 5 6 7
> >
> >  ([ iota >:@-~)/  3 7
> > 3 4 5 6 7
> >
> >  3 iota _5
> > 7 6 5 4 3
> >
> >
> > 
> > From: Joe Bogner 
> > To: programm...@jsoftware.com
> > Sent: Friday, April 6, 2018 3:50 PM
> > Subject: Re: [Jprogramming] Expression to generate sequ
> >
> >
> >
> > Lightly tested and non-optimized and ugly, but seems to work!
> >
> > genseq=:({: + i.@:>:@:-/)@]
> >
> > seq =: (] (>/@[ \:~@]^:[ genseq) \:~) f.
> >
> >
> > ] (>/@[ \:~@]^:[ ({: + i.@:>:@:-/)@]) \:~
> >
> >
> > seq 3 7 3 4 5 6 7 seq 7 3 7 6 5 4 3
> >
> >
> >
> >
> > On Fri, Apr 6, 2018 at 3:23 PM, Devon McCormick 
> > wrote:
> >
> > > Hi -
> > >
> > > I'm working with selecting sequential items from a vector given a
> > starting
> > > and an ending point as a pair of integers.  If we assume we always get
> > the
> > > pair as (lesser, greater), something like this suffices:
> > >
> > >seq=: {. + [: i. [: >: -~/
> > >seq 3 7
> > > 3 4 5 6 7
> > >
> > > However, if our assumption about the order of our points is violated,
> we
> > > get nonsense:
> > >
> > >seq 7 3
> > > 7 8 9
> > >
> > > Just for robustness, how could we write a version of "seq" that would
> > > return the sequence in reverse order in this latter case, i.e. give the
> > > proper sequence from seven to three: 7 6 5 4 3 ?
> > >
> > > I generalized the "seq" verb to remove the ordering assumption: my idea
> > was
> > > to generate the ascending sequence, then flip it if >/y is true.  I
> tried
> > > this with "agenda" but am not sure how to get it to work on one thing -
> > the
> > > ascending vector - on the basis of comparison of another thing - the
> pair
> > > of integers.
> > >
> > > I did achieve this using the "power" conjunction:
> > >
> > >seq=: 3 : '|.^:(>/y)](<./ + [: i. [: >: >./ - <./) y'
> > >seq 3 7
> > > 3 4 5 6 7
> > >seq 7 3
> > > 7 6 5 4 3
> > >
> > > Does anyone have any ideas for a more elegant, preferably tacit,
> > solution?
> > >
> > > Thanks,
> > >
> > > Devon
> > > --
> > >
> > > Devon McCormick, CFA
> > >
> > > Quantitative Consultant
> > > --
> > > 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
> >
>
>
>
> --
>
> Devon McCormick, CFA
>
> Quantitative Consultant
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
--
For information about J forums see http://www.jsoftware.com/forums.htm