From c87dead5361979182e08beb783c78aef03699978 Mon Sep 17 00:00:00 2001 From: Samuel GOUGEON Date: Sun, 4 Aug 2019 17:09:08 +0200 Subject: [PATCH] * Bug 16166 fixed: noisegen() obsolete http://bugzilla.scilab.org/16166 Change-Id: I33c933253a51af9b31273ca6b00dda32f5e18f47 --- scilab/CHANGES.md | 2 + scilab/modules/cacsd/help/en_US/noisegen.xml | 40 +++++++++++++++++++- scilab/modules/cacsd/help/fr_FR/noisegen.xml | 38 ++++++++++++++++++- scilab/modules/cacsd/help/ja_JP/noisegen.xml | 38 ++++++++++++++++++- scilab/modules/cacsd/macros/noisegen.sci | 2 + scilab/modules/slint/src/cpp/DeprecatedChecker.cpp | 1 + 6 files changed, 118 insertions(+), 3 deletions(-) diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md index 5c42877..c2b29e4 100644 --- a/scilab/CHANGES.md +++ b/scilab/CHANGES.md @@ -173,6 +173,7 @@ Obsolete functions or features * `%sn()` is obsolete. Please use `ellipj()` instead. * `sysdiag()` is obsolete. Please use `blockdiag()` instead. * `ric_desc` is obsolete and will be removed from Scilab 6.1.x. Please use `riccati` instead. +* `noisegen` will be removed from Scilab 6.1.x. Please use `grand()` instead. Removed Functions @@ -308,6 +309,7 @@ Bug Fixes * [#16158](http://bugzilla.scilab.org/show_bug.cgi?id=16158): When a multicolumn array of rationals was displayed wide column per column, columns #2:$ were replaced with its column #2. * [#16160](http://bugzilla.scilab.org/show_bug.cgi?id=16160): `ppol` changed values of third input variable. * [#16164](http://bugzilla.scilab.org/show_bug.cgi?id=16164): Help pages in elementary_functions/signal_processing were mislocated. +* [#16166](http://bugzilla.scilab.org/show_bug.cgi?id=16166): `noisegen()` is crooky, even threatening, and very poor. It is tagged as obsolete and will be removed from Scilab 6.1.x. * [#16168](http://bugzilla.scilab.org/show_bug.cgi?id=16168): On some Linux installations, `test_run()` always failed. * [#16174](http://bugzilla.scilab.org/show_bug.cgi?id=16174): `libraryinfo` yielded 0x0 matrix of strings for libs without macro * [#16177](http://bugzilla.scilab.org/show_bug.cgi?id=16177): In the uicontrol help page, the first example was bugged. diff --git a/scilab/modules/cacsd/help/en_US/noisegen.xml b/scilab/modules/cacsd/help/en_US/noisegen.xml index 6081568..4d5c9d5 100644 --- a/scilab/modules/cacsd/help/en_US/noisegen.xml +++ b/scilab/modules/cacsd/help/en_US/noisegen.xml @@ -16,7 +16,9 @@ noisegen - noise generation + + noise generation (obsolete) + Syntax @@ -47,6 +49,30 @@ Description + + noisegen() is obsolete. It will be removed from Scilab 6.1.x. + Please use grand() instead. Examples (clearer, shorter, and more powerful) follow: + + + 100 10-point wide steps with random amplitudes of normal distribution + of mean 1 and standard deviation 0.7: + + + + + 40 15-point wide steps with random amplitudes of uniform distribution in [1 3], + with initial level 0.5 and final level hold: + + + noisegen() generates a Scilab function b = Noise(t) where Noise(t) is a piecewise constant function @@ -109,4 +135,16 @@ plot2d2(t, noise); + + History + + + 6.1.0 + + noisegen() is obsolete. It will be removed from Scilab 6.1.x. + Please replace it with grand() and .*. + + + + diff --git a/scilab/modules/cacsd/help/fr_FR/noisegen.xml b/scilab/modules/cacsd/help/fr_FR/noisegen.xml index 0917a24..675c070 100644 --- a/scilab/modules/cacsd/help/fr_FR/noisegen.xml +++ b/scilab/modules/cacsd/help/fr_FR/noisegen.xml @@ -16,7 +16,7 @@ noisegen - génération de bruit + génération de bruit (obsolète) Séquence d'appel @@ -47,6 +47,30 @@ Description + + noisegen() is obsolete. It will be removed from Scilab 6.1.x. + Please use grand() instead. Examples (clearer, shorter, and more powerful) follow: + + + 100 10-point wide steps with random amplitudes of normal distribution + of mean 1 and standard deviation 0.7: + + + + + 40 15-point wide steps with random amplitudes of uniform distribution in [1 3], + with initial level 0.5 and final level hold: + + + noisegen() génère une fonction Scilab b = Noise(t) où Noise(t) est une fonction constante par morceaux @@ -109,4 +133,16 @@ plot2d2(t, noise); + + Historique + + + 6.1.0 + + noisegen() is obsolete. It will be removed from Scilab 6.1.x. + Please replace it with grand() and .*. + + + + diff --git a/scilab/modules/cacsd/help/ja_JP/noisegen.xml b/scilab/modules/cacsd/help/ja_JP/noisegen.xml index bcac806..c560cb3 100644 --- a/scilab/modules/cacsd/help/ja_JP/noisegen.xml +++ b/scilab/modules/cacsd/help/ja_JP/noisegen.xml @@ -16,7 +16,7 @@ noisegen - ノイズ生成 + ノイズ生成 (obsolete) 呼び出し手順 @@ -24,6 +24,30 @@ 説明 + + noisegen() is obsolete. It will be removed from Scilab 6.1.x. + Please use grand() instead. Examples (clearer, shorter, and more powerful) follow: + + + 100 10-point wide steps with random amplitudes of normal distribution + of mean 1 and standard deviation 0.7: + + + + + 40 15-point wide steps with random amplitudes of uniform distribution in [1 3], + with initial level 0.5 and final level hold: + + + Scilab 関数 [b]=Noise(t)を生成します. ただし, Noise(t)は区分定数関数です @@ -44,4 +68,16 @@ y=feval(x,Noise); plot(x,y); ]]> + + 履歴 + + + 6.1.0 + + noisegen() is obsolete. It will be removed from Scilab 6.1.x. + Please replace it with grand() and .*. + + + + diff --git a/scilab/modules/cacsd/macros/noisegen.sci b/scilab/modules/cacsd/macros/noisegen.sci index 9b496d5..8905b13 100644 --- a/scilab/modules/cacsd/macros/noisegen.sci +++ b/scilab/modules/cacsd/macros/noisegen.sci @@ -19,6 +19,8 @@ function noisegen(pas,Tmax,sig) // The function is constant for t<=0 and t>=Tmax. //! + warnobsolete("6.1.x", "grand()") + dua_g=sig*rand(0:pas:Tmax,"n"); [nn1,nn2]=size(dua_g); deff("[b]=Noise(t)","b=dua_g(min(max((t/"+string(Tmax)+... diff --git a/scilab/modules/slint/src/cpp/DeprecatedChecker.cpp b/scilab/modules/slint/src/cpp/DeprecatedChecker.cpp index e233651..aa373c9 100644 --- a/scilab/modules/slint/src/cpp/DeprecatedChecker.cpp +++ b/scilab/modules/slint/src/cpp/DeprecatedChecker.cpp @@ -110,6 +110,7 @@ std::unordered_map DeprecatedChecker::initDep() map.emplace(L"lstsize", L"size"); map.emplace(L"nanmin", L"min"); map.emplace(L"nanmax", L"max"); + map.emplace(L"noisegen", L"grand"); map.emplace(L"numer", L".num"); map.emplace(L"ric_desc", L"riccati"); map.emplace(L"square", L"replot"); -- 1.7.9.5