[bug #68551] function rescale should clip input range before scaling

chad <[email protected]> Thu, 23 Jul 2026 11:01:21 -0400 (EDT)
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
--===============7058313440829134235==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

UGxlYXNlIHVzZSB0aGUgYnVnIHRyYWNrZXIgdG8gcG9zdCB1cGRhdGVzIHRvIGEgYnVnIHJlcG9y
dC4gIFRoZSBtYWlsaW5nIGxpc3QgaXMgaW50ZW5kZWQgYXMgYSByZWFkLW9ubHkgbm90aWZpY2F0
aW9uIHN0cmVhbS4gIEluZm8gcG9zdGVkIHRvIHRoaXMgbWFpbGluZyBsaXN0IGFkZHJlc3Mgd29u
J3QgYXBwZWFyIGluIHRoZSB0cmFja2VyIGRhdGFiYXNlIHdoZXJlIGl0IGlzIG1vc3QgdXNlZnVs
LgoK

--===============7058313440829134235==
Content-Type: MULTIPART/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; BOUNDARY="8323329-1714636915-1784818880=:353223"
Content-Disposition: inline

--8323329-1714636915-1784818880=:353223
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

URL:=0A  <https://savannah.gnu.org/bugs/?68551>=0A=0A                 Summa=
ry: function rescale should clip input range before=0Ascaling=0A           =
        Group: GNU Octave=0A               Submitter: chadholton=0A        =
       Submitted: Thu 23 Jul 2026 03:01:17 PM UTC=0A                Categor=
y: Octave Function=0A                Severity: 3 - Normal=0A               =
 Priority: 5 - Normal=0A              Item Group: Incorrect Result=0A      =
            Status: None=0A             Assigned to: None=0A         Origin=
ator Name: chad=0A        Originator Email:=0A             Open/Closed: Ope=
n=0A         Discussion Lock: Unlocked=0A                 Release: 11.3.0=
=0A        Operating System: Any=0A           Fixed Release: None=0A       =
  Planned Release: None=0A=0A=0A    _______________________________________=
________________=0A=0AFollow-up Comments:=0A=0A=0A-------------------------=
------------------------------=0ADate: Thu 23 Jul 2026 03:01:17 PM UTC By: =
chad <chadholton>=0AThis leads to an error when running an example from MAT=
LAB.=0A=0Ahttps://www.mathworks.com/help/matlab/ref/rescale.html=0ASpecify =
Interval and Range for Matrix Columns=0A=0AA =3D [0.4 -4; 0.5 -5; 0.9 9; 0.=
2 1];=0Acolmin =3D min(A);=0Acolmax =3D max(A);=0ARcol =3D rescale(A,[0 -1]=
,1,"InputMin",colmin,"InputMax",colmax)=0A=0ARcol =3D 4=C3=972=0A=0A    0.2=
857   -0.8571=0A    0.4286   -1.0000=0A    1.0000    1.0000=0A         0   =
-0.1429=0A=0ABut I get =0A=0ARcol =3D rescale(A,[0 -1],1,"InputMin",colmin,=
"InputMax",colmax)=0Aerror: =3D: nonconformant arguments (op1 is 0x1, op2 i=
s 1x2)=0Aerror: called from=0A    rescale at line 131 column 5=0A=0Awith pa=
tch=0A=0A=0A=0A=0A=0A=0A    _______________________________________________=
________=0AFile Attachments:=0A=0AName: rescale-clipping-input-range-before=
-scaling.patch Size: 1.6KiB=0A=0A<https://file.savannah.gnu.org/file/rescal=
e-clipping-input-range-before-scaling.patch?file_id=3D58824>=0A=0A=0A=0A   =
 AGPL NOTICE=0A=0AThese attachments are served by Savane. You can download =
the corresponding=0Asource code of Savane at=0Ahttps://savannah.gnu.org/sou=
rce/savane-c36938be85ff6c1b727bc7dd7fd30e48f9142870.tar.gz=0A=0A    _______=
________________________________________________=0A=0AReply to this item at=
:=0A=0A  <https://savannah.gnu.org/bugs/?68551>=0A=0A______________________=
_________________________=0AMessage sent via Savannah=0Ahttps://savannah.gn=
u.org/=0A
--8323329-1714636915-1784818880=:353223
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCamIswAAKCRCqLAuaBUf3
TuB9AQCCU8g4lBkhaoP3+aZ8f0PlhSOTFgSIkBNbWPRg6RLgxQEA/eOl3bjoSPj5
00pd+BuqKiFMykGfP4+n9rX3P0DDJAc=
=XKL3
-----END PGP SIGNATURE-----

--8323329-1714636915-1784818880=:353223--



--===============7058313440829134235==--