From 7b0bf23e7d94df8f3406f5f64926b1131041ba35 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Wed, 20 Jun 2018 16:56:14 +0530 Subject: substitute some of the predefined variables --- js/NonLinear/TrigFun.js | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'js/NonLinear/TrigFun.js') diff --git a/js/NonLinear/TrigFun.js b/js/NonLinear/TrigFun.js index 51a2ef27..ea7b3744 100644 --- a/js/NonLinear/TrigFun.js +++ b/js/NonLinear/TrigFun.js @@ -1,3 +1,41 @@ -Syntax error in input LexToken(OPENBRACKET,'(',1,1210) /* autogenerated from "macros/NonLinear/TrigFun.sci" */ -None +function TrigFun() { +TrigFun.prototype.define = function TrigFun() { +model=scicos_model(); +model.sim=list("sin_blk",4); +model.in1=-1; +model.out=-1; +model.blocktype="c"; +model.dep_ut=[true,false]; +exprs="sin"; +gr_i=[]; +x=standard_define([4,2],model,exprs,gr_i); +} +TrigFun.prototype.details = function TrigFun() { +} +TrigFun.prototype.get = function TrigFun() { +} +TrigFun.prototype.set = function TrigFun() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +PREVAR_FF=[["sin"],["cos"],["tan"],["asin"],["acos"],["atan"],["sinh"],["cosh"],["tanh"],["asinh"],["acosh"],["atanh"]]; +PREVAR_GG=[["Choose among "+strcat(PREVAR_FF.slice(1-1,4),", ")],[strcat(PREVAR_FF.slice(5-1,$),", ")]]; +while (true) { +[ok,fun,exprs]=scicos_getvalue(PREVAR_GG,"Function",list("str",1),exprs); +if (!ok) { +break; +} +if (find(PREVAR_FF==fun)==[]) { +message("Sorry but "+fun+" is not in the list!"); +} else { +graphics.exprs=exprs; +execstr("model.sim=list(\'"+fun+"_blk\',4)"); +x.graphics=graphics; +x.model=model; +break; +} +} +} +} -- cgit