blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 214 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 6 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 21 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 141k 586M ⌀ | star_events_count int64 0 30.4k | fork_events_count int64 0 9.67k | gha_license_id stringclasses 8 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 50 values | src_encoding stringclasses 23 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 1 class | length_bytes int64 5 10.4M | extension stringclasses 29 values | filename stringlengths 2 96 | content stringlengths 5 10.4M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
99a9eb046d9f477057c583aeb49059fd1da19064 | f5d97602ad111cf2fe570b890646522118e3f9f1 | /ziegler-nichols-second-method.sce | 3a691251a8011ec361dcc00a9feb5421ab9c8941 | [] | no_license | HugoJF/scilab-pid-controller | 5d6d869d00e7bcc404ae358db92976863d2619cc | f4726b3f6a01cac1526632c31a6e2c840b6fb07c | refs/heads/master | 2023-01-28T11:20:43.264090 | 2020-12-11T20:27:29 | 2020-12-11T20:27:29 | 320,695,475 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,153 | sce | ziegler-nichols-second-method.sce | exec('C:\Users\hugo_\Desktop\trabalho-controller\prep.sce', -1)
exec('C:\Users\hugo_\Desktop\trabalho-controller\funcs.sce', -1)
// Simulation parameters
t = gettime(30, 100);
// Method preparation
// Gain estimation
// Very long simulation time to make sure oscillations are stable and consistent
kcr_estimation = 1.48;
tg = gettime(600, 100);
yg = csim('step', tg, (g*kcr_estimation)/.(1));
// Period estimation
// Shorter simulation since we only need the period
tper = gettime(30, 100);
yper = csim('step', tper, (g*kcr_estimation)/.(1));
// Method parameters
kcr = 1.48;
tcr = 11.34;
// Simulations
y = csim('step', t, g/.(1));
yp = simu_zn2_p(t, kcr, tcr);
ypi = simu_zn2_pi(t, kcr, tcr);
ypid = simu_zn2_pid(t, kcr, tcr);
// Plots
subplot(211)
plot(t, y, t, yp, t, ypi, t, ypid);
title('Ziegler-Nichols second method for PID tuning')
legend(['G response', 'P response', 'PI response', 'PID response']);
subplot(223)
plot(tg, yg);
title('Ziegler-Nichols second method gain estimation')
legend(['Closed loop response'])
subplot(224)
plot(tper, yper);
title('Ziegler-Nichols second method period estimation')
legend(['Closed loop response']) |
c69b2de3e8b867ce603486b494fe80994d0e2541 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1553/CH4/EX4.33/4Ex33.sce | dc82a9b3fbaa4abccb611181fdf2323d2f4052b0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 234 | sce | 4Ex33.sce | //chapter 4 Ex 33
clc;
clear;
close;
Eachday=20; idleFortified=3; twoMonths=60; wageTwoMonths=280;
idleDays=(Eachday*twoMonths-wageTwoMonths)/(Eachday+idleFortified);
mprintf("The worker remained idle for %d days",idleDays);
|
6bb61c2421e31776a397f45c34e562190be11110 | 35071fb08cee13f4a9e79c396f7c8c028f69db0e | /Tests/Syntaxe/KO/ELSE_PARENTHESIS_KO.tst | 7858bdb49173b2fa419c4b1ff15eba42f267d39a | [] | no_license | V1nc3ntL/Compilation | 2cd9d4fa728055cebd44659cba517e49298142bc | e2008449ddb509021f6ddcfd0a92226807bec9ab | refs/heads/master | 2023-06-01T09:42:01.069684 | 2021-06-02T19:15:13 | 2021-06-02T19:15:13 | 357,205,127 | 0 | 0 | null | 2021-05-31T12:13:32 | 2021-04-12T13:30:46 | C | UTF-8 | Scilab | false | false | 98 | tst | ELSE_PARENTHESIS_KO.tst | void main()
{
int var == 0;
if(var == 1)
{
print("IF");
}
else
(
print("ERROR_IF");
)
} |
a6d9c74e1e364ca65b1dc051dcef5b8328d57986 | 01ecab2f6eeeff384acae2c4861aa9ad1b3f6861 | /xcos_blocks/div_by_n.sci | 0b0c2d13ed196f8eb87120b4a0a6f4f9cfef706a | [] | no_license | jhasler/rasp30 | 9a7c2431d56c879a18b50c2d43e487d413ceccb0 | 3612de44eaa10babd7298d2e0a7cddf4a4b761f6 | refs/heads/master | 2023-05-25T08:21:31.003675 | 2023-05-11T16:19:59 | 2023-05-11T16:19:59 | 62,917,238 | 3 | 3 | null | null | null | null | UTF-8 | Scilab | false | false | 3,165 | sci | div_by_n.sci | // Xcos
//
// Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
// Copyright 2011 - Bernard DUJARDIN <bernard.dujardin@contrib.scilab.org>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See the file ../license.txt
//
function [x,y,typ] = div_by_n(job,arg1,arg2)
x=[];y=[];typ=[];
select job
case 'plot' then
graphics=arg1.graphics;
ierr=execstr('(evstr(graphics.exprs(3))==1)','errcatch')
if ierr<>0 then graphics.exprs(3)='1';end
if (evstr(graphics.exprs(3))==1) then
from=graphics.exprs(1)
to=graphics.exprs(2)
else
from=graphics.exprs(2)
to=graphics.exprs(1)
end
standard_draw(arg1)
case 'getinputs' then
[x,y,typ]=standard_inputs(arg1)
case 'getoutputs' then
[x,y,typ]=standard_outputs(arg1)
case 'getorigin' then
[x,y]=standard_origin(arg1)
case 'set' then
x=arg1;
graphics=arg1.graphics;exprs=graphics.exprs
model=arg1.model;
while %t do
[ok,nofinputs,divN,rule,exprs]=scicos_getvalue([msprintf(gettext("Set %s block parameters"), "Counter"); " "; ..
gettext("Div by N Clock Generator");" "], ..
[gettext("no OF OUTPUTS"); gettext("divNum"); ..
gettext("Rule (1:Increment, 2:Decrement)");], ..
list('vec',1,'vec',1,'vec',1),exprs);
if ~ok then break,end
divN=int(divN);nofinputs=int(nofinputs);
if divN < nofinputs then
block_parameter_error(msprintf(gettext("Wrong values for ''divNum'' and ''nofinputsum'' parameters: %d < %d"), nofinputs, divN), ..
msprintf(gettext("''Minimum'' must be less than ''divNum''.")));
elseif (rule <> 1 & rule <> 2) then
block_parameter_error(msprintf(gettext("Wrong value for ''Rule'' parameter: %d"), rule), ..
msprintf(gettext("Must be in the interval %s."), "[1,2]"));
else
graphics.exprs=exprs
model.dstate=0
model.ipar=[rule;divN;nofinputs]
x.graphics=graphics;x.model=model
break
end
end
case 'define' then
nofinputs=2
in=2
divN=2
rule=1
model=scicos_model()
model.sim=list('div_func',5)
//model.evtin=1
model.in=-[1:in]'
model.intyp=-ones(in,1)
model.out=-[1:nofinputs]'
model.outtyp=-ones(nofinputs,1)
//model.dstate=0
model.rpar=divN;
model.ipar=[rule;divN;nofinputs]
model.blocktype='c'
model.dep_ut=[%t %f]
exprs=[string(nofinputs);string(divN);string(rule)]
gr_i=['text=[''Clk'';'' Reset''];';'xstringb(orig(1),orig(2),text,sz(1),sz(2),''fill'');']
x=standard_define([11 10],model,exprs,gr_i)
end
endfunction
|
326d041112d801b176128a8888352c1a7cc3df41 | b9602336613b26d0b9c22a09d219c0ed8e158b4e | /Examples/Examples_MatFunc/norm.sce | 0116e7945eda3b97f9d157d74f458770b36e2d17 | [
"BSD-2-Clause"
] | permissive | CEG-MCA-Scilab-Hackathon/Scilab_Armadillo_Toolbox | d0a366f5f058ee45d3c4be7a41e08ed419d4b7cd | 70c97cda4e0dd54df0a638e9b99f380c09ffa37e | refs/heads/master | 2022-12-11T01:28:28.742041 | 2020-08-26T12:24:27 | 2020-08-26T12:24:27 | 290,481,428 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 370 | sce | norm.sce | // Function Name: norm
// Return its normalised version, has been normalised to have unit p-norm(3rd parameter)
// 3rd parameter : "-inf"=1, "inf"=2, "fro"=default
// "-inf" is the minimum norm, "inf" is the maximum norm, while "fro" is the Frobenius norm
// Calculating the norm
inputMat = [ 1, 2, 3; 4, 5, 6; 7, 8, 10;]
result = armaMatFunc("norm",inputMat)
|
9ca16c3553f6cb5b75344aa762fb09b8d2e09853 | fe48ae0c518509ac5c57688957075e939956f2b1 | /Least Sqare Fitting.sce | 0bd1d8640629c9794f6bf36bc0e82cba23fd4e0b | [] | no_license | dibakardhar/Scilab-Notes | d8161939a96b5d9f89106440059b6aaa717f5d79 | 6bc6a6caa5120a4c7a20f15430860e5b51e8014e | refs/heads/main | 2023-07-09T18:48:56.525225 | 2021-08-15T16:32:36 | 2021-08-15T16:32:36 | 396,415,364 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 207 | sce | Least Sqare Fitting.sce | x=[2 2 3 4 5 6]'
y=[5 6 19 38 78 115]'
plot2d(x,y,-3)
X=[x ones(x)];
a=X\y;
xx=[0:.01:7]
disp(a(2),"The coefficient a(2) is")
yy=[a(1)*xx+a(2)]
plot2d(xx,yy,2)
disp(a(1),"The coefficient a(1) is")
|
45687587988acf5b81da3d8c7a7ca18e0c7721ad | 449d555969bfd7befe906877abab098c6e63a0e8 | /1628/CH16/EX16.14/Ex16_14.sce | 6c68f49087b4e9284f1194183869d535e2a96ffa | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 755 | sce | Ex16_14.sce |
// Examle 16.14
V=480;
Ia=110; // Armature currernt
Ra=0.2; // Armature resistance
a=6; // No.Of paraller path
p=6; // No.Of poles
Q=0.05; // Megnetic flux per pole
z=864; // Impedence
Eb=V-(Ia*Ra); // Generated emf (Eb)
disp('Generated emf (Eb) = '+string(Eb)+' Volt');
N=(60*a*Eb)/(Q*z*p); // Speed of the moter
disp(' Speed of the moter = '+string(round(N))+' rms');
// ==> Using Formula { td= Qz/2TT x(p/A) xIa }
x=(Q*z)/(2*%pi); // for simlicity
td=(p/a)*Ia*(x); // Total Torque (Td)
disp(' Total Torque (Td) = '+string (round(td))+' Nm');
// p 650 16.14 |
88ea544ec27bde8dc96fc95d3d7fa9f7e41521f7 | 2b69dd8bf1a22286c924c35bdfc4949a817bfdec | /Practical class 3/Functions.sce | 9b75fecde2121226d1a7105426fe8f343f18f192 | [] | no_license | lucasresck/Numerical-Linear-Algebra | 9565e86c7f532f902222d63f4e64c10abc48f1b7 | 40c67a0f44ad4e19d60549ef62d4daf4bf7c3bde | refs/heads/master | 2020-08-05T11:59:26.593340 | 2019-10-05T17:52:29 | 2019-10-05T17:52:29 | 212,490,319 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,228 | sce | Functions.sce | function [lambda, x, N] = Metodo_potencia(A, x0, epsilon, M)
//Método da potência para cálculo de aproximações do módulo do autovalor de maior módulo e do autovetor associado a ele.
p = find(abs(x0) == norm(x0, %inf))(1,1); //Encontra-se o menor índice tal que sua coordenada tenha módulo igual à norma infinito
x = x0 / x0(p, 1); //Divide-se pela coordenada de módulo igual à norma infinito
N = 1;
while N <= M //Até exceder o número máximo de iterações
y = A * x; //Iteração
lambda = y(p, 1);
if norm(y, %inf) == 0 then //Se a norma infinito de y for 0, então A tem autovalor 0
disp("A tem autovalor 0.");
break;
end
y = y / y(p, 1);
err = norm(x - y, %inf); //Erro
x = y;
if err < epsilon //Para a iteração se o erro for menor do que a tolerância
disp("Procedimento bem-sucedido.");
break;
end
N = N + 1;
end
if N > M then
N = N - 1;
disp("Número máximo de iterações excedido.");
end
endfunction
function [lambda, x, N] = Metodo_potencia_simetrico(A, x0, epsilon, M)
//Método da potência simétrico para cálculo de aproximações do módulo do autovalor de maior módulo e do autovetor associado a ele para matrizes simétricas.
x = x0 / norm(x0, 2);
N = 1;
while N <= M
y = A * x;
lambda = x'*y;
if norm(y, 2) == 0 then
disp("A tem autovalor 0.");
break;
end
y = y / norm(y, 2);
err1 = norm(x - y, 2);
err2 = norm(x + y, 2);
x = y;
if err1 < epsilon || err2 < epsilon then
disp("Procedimento bem-sucedido.");
break;
end
N = N + 1;
end
if N > M then
N = N - 1;
disp("Número máximo de iterações excedido.");
end
endfunction
function [lambda, x, N] = Metodo_potencia_inversa(A, x0, epsilon, alfa, M)
//Método da potência inversa para cálculo de aproximações do módulo do autovalor mais próximo de alfa e o autovetor relativo a ele.
if alfa == %inf then //Se o alfa for infinito, então calculamos uma aproximação
alfa = x0' * A * x0 / (x' * x);
end
p = find(abs(x0) == norm(x0, %inf))(1,1);
x = x0 / x0(p, 1);
N = 1;
while N <= M
I = eye(size(A)(1, 1), size(A)(1, 1)); //Matriz identidade de orden igual à de A
y = linsolve(A - alfa * I, -x); //Equivalente a encontrar y = (A - alfa*I)^-1 *x
lambda = y(p, 1);
if norm(y, %inf) == 0 then
disp("A tem autovalor 0.");
break;
end
y = y / y(p, 1);
err = norm(x - y, %inf);
x = y;
if err < epsilon
disp("Procedimento bem-sucedido.");
break;
end
N = N + 1;
end
if N > M then
N = N - 1;
disp("Número máximo de iterações excedido.");
end
lambda = 1 / lambda + alfa; //O autovalor que encontramos é da matriz (A - alfa*I)^-1. Se lambda é um autovalor de A, então lambda_0 = 1/(lambda - q) é autovalor de (A - alfa*I)^-1. Apenas isolamos lambda.
endfunction
|
1cbc3d92a1d9782caf9970a7c038a76fb7924502 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronic_Communication_Systems_R._Blake_761.zip/Electronic_Communication_Systems_R._Blake_761/CH18/EX18.5/18_5.sce | 9fa25185556f00b7b4a1493f691c5d2757a4f2d9 | [] | no_license | hohiroki/Scilab_TBC | cb11e171e47a6cf15dad6594726c14443b23d512 | 98e421ab71b2e8be0c70d67cca3ecb53eeef1df6 | refs/heads/master | 2021-01-18T02:07:29.200029 | 2016-04-29T07:01:39 | 2016-04-29T07:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 185 | sce | 18_5.sce | errcatch(-1,"stop");mode(2);;
// page no 681
// prob no 18.5
NF_dB=2;
NF_power = 10^(NF_dB/10);
T_eq=290*(NF_power -1);
disp('K',T_eq,'The equivalent noise temperature');
exit();
|
94f59b01080b857fd27922422822dd5d5a817626 | 2ed4900de7e171a2d0fe5536f55027a22d1d56d7 | /analysis_script.sce | 2d65b0e61843cc5ec9b9d08f7afe1a80aa89691f | [] | no_license | lucasgamaleri/Ternium_picking_centradores_trendanalyst | 352d98bb4e039d9bbec34225c1635abf30f6fd79 | da489444965af8e88bab590f031020fabc8e75f4 | refs/heads/master | 2022-12-06T15:45:44.578951 | 2020-08-24T20:08:41 | 2020-08-24T20:08:41 | 279,302,213 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 6,877 | sce | analysis_script.sce | //Creado por Lucas GAMALERI; consultas: LGAMALER@ternium.com.ar
//Las variables deben ser descargadas desde el trending de piso de planta en el siguiente orden
// DEC.PLC4.N2_PRUEBA4 (Registro de prueba contador de alarma de automatismo)
// DEC.PLC10.AN2L_CENTRO_RAMPA_REF_VELOCIDAD (Velocidad centro BR3 m/min)
// DEC.PLC4.AN2L_CENTRADOR_6_DESPLAZ_CHAPA (Desplazamiento de chapa en Centrador 6)
// DEC.PLC4.AN2L_CENTRADOR_6_POSIC_RODILLO (Posicion rodillo centrador 6)
// DEC.PLC4.AN2L_PILETAS_CENTR_DESPLAZ_CHAPA (Desplazamiento de chapa en Centrador de Piletas)
// DEC.PLC4.AN2L_PILETAS_CENTR_POSIC_RODILLO (Posicion rodillo centrador de piletas)
// DEC.PLC10.AN2L_BR_4_SAL_VELOC_ACTUAL (Velocidad salida BR4 m/min)
// ---------------------------------------NOTA-------------------------------------------------
// El intervalo maximo de la bajada de datos NO DEBE EXCEDER los 3 días puesto que
// Se produciran errores en el calculo de la frecuencia de muestreo producto del
// Formato de los datos importados desde el piso de planta.
//clear
//Abre base de datos de variables
load('ddbb')
echo = %F;// %T si desea tener acceso a todos los datos creados por el programa, caso contrario reemplazar por %F
guardar = %T; //%T si desea guardar la ejecución en la base de datos, para pruebas o casos particulares reemplazar por %F
//Carga de datos desde trending
if echo then
print('echo is on')
end
if ~guardar then
print('Precaución! las variables no se guardarán en la base de datos')
end
path1='C:\Users\LGAMALER\Downloads\trends.csv';
path2 ='C:\Users\LGAMALER\""OneDrive - TERNIUM""\Documentos\Decapado\""2019.09 - Oscilacion en centrador 6""\""Analisis de patrones en centrador 6 y centrador de piletas""\trends.csv';
command = 'MOVE /Y '+path1+' '+path2;
dos(command,'-echo')
Datanum = csvRead('trends.csv',';',',','double')
Datastr = csvRead('trends.csv',';',',','string')
a = size(Datanum)
a = a(1)
datetime = Datastr(2:a,1);
contador = Datanum(2:a,2);
vel_centro = Datanum(2:a,3);
c6desp = Datanum(2:a,4);
c6pos = Datanum(2:a,5);
cpildesp = Datanum(2:a,6);
cpilpos = Datanum(2:a,7);
vel_salida = Datanum(2:a,8);
longitud_trk = Datanum(2:a,9)
bobina_numero = input("Escriba el numero de bobina: ","string");
if echo == %F then
clear Datanum Datastr a
end
amp_factor_pos = -3
amp_factor_desp = -8
//Handling time
date1 = datetime(1);
date2 = datetime(2);
second1 = part(date1,(length(date1)-5:length(date1)))
second2 = part(date2,(length(date2)-5:length(date2)))
second1 = strtod(second1)
second2= strtod(second2)
frequency_seq = abs(second2-second1)
frequency_min = frequency_seq/60
if echo == %F then
clear second1 second2 date1 date2 datetime
end
time = linspace(0,frequency_min*1000,1000)'
// Integracion numerica
//Pasaje de señal en funcion del tiempo a funcion de los metros de chapa [CORREGIR]
long_centro = zeros(length(time));
long_centro(1) = 0; //metros respecto a centrador de pileta
long_salida = zeros(length(time));
long_salida(2) = 375; //metros respecto a centrador de pileta
T1 = 0; T2 = 0;
for i = 2:length(time)
j = i-1
long_centro(i) = long_centro(j)+vel_centro(i)*(time(i)-time(j))
long_salida(i) = long_salida(j)+vel_salida(i)*(time(i)-time(j))
end
// Fin de integración
clear T1 T2 dt1 dt2 i j
subplot(321)
//Grafico de centrador 6 y centrador de piletas sin desfazaje por trayecto de chapa
plot(time,amp_factor_pos*c6pos,'b-')
plot(time,cpilpos,'r-')
plot(0,240) //max eje y
plot(0,-240) //max neg eje y
xlabel('Tiempo [min]')
ylabel('Posicion centradores [%]')
title('Posición C6 y Centrador de piletas en func del tiempo')
legend(['Centrador 6*300%';'Centrador de piletas'])
subplot(325)
//Grafico de velocidad sobre tiempo
plot(time,vel_centro,'r-')
plot(time,vel_salida,'b-')
plot(0,240) //max eje y
//plot(0,-240) //max neg eje y
ylabel('Velocidad [m/min]')
title('Velocidad de la línea, Centro y salida')
legend(['Centrador de Pileta (BR3)';'Centrador 6 (BR4)'])
subplot(326)
//Grafico de contador de alarma
//plot(time,contador,'r*')
//plot(0,240) //max eje y
//plot(0,-240) //max neg eje y
//ylabel('Contador')
//title('Contador de activacion de lógica')
//legend(['Centrador 6';'Centrador de piletas'])
//Grafico de Longitud por tracking
plot(time,longitud_trk,'b-')
ylabel('m')
title('Longitud trk salida')
subplot(323)
//Grafico de desplazamiento en centrador 6 y centrador de piletas sin desfazaje por trayecto de chapa
plot(time,-cpildesp,'r-')
plot(time,amp_factor_desp*c6desp,'b-')
plot(0,240) //max eje y
plot(0,-240) //max neg eje y
ylabel('Desplazamiento de chapa [mm]')
title('Posición C6 y Centrador de piletas por trending')
legend(['Centrador de piletas';'Centrador 6*500%'])
subplot(322)
//Grafico de centrador 6 y centrador de piletas con desfazaje por trayecto de chapa
plot(long_salida,amp_factor_pos*c6pos,'b-')
plot(long_centro,cpilpos,'r-')
plot(0,240) //max eje y
plot(0,-240) //max neg eje y
xlabel('Metros de chapa [m]')
ylabel('Posicion centradores [%]')
title('Posición C6 y Centrador de piletas por metro de chapa')
legend(['Centrador 6*300%';'Centrador de piletas'])
subplot(324)
//Grafico de desplazamiento en centrador 6 y centrador de piletas sin desfazaje por trayecto de chapa
plot(long_centro,cpildesp,'r-')
plot(long_salida,amp_factor_desp*c6desp,'b-')
plot(0,240) //max eje y
plot(0,-240) //max neg eje y
xlabel('Metros de chapa [m]')
ylabel('Desplazamiento de chapa [mm]')
title('Desplazamiento en C6 y Centrador de piletas por metro de chapa')
legend(['Centrador de piletas';'Centrador 6*500%'])
//Guardado de variables desde archivo
save('variables')
clear ans
//Guardado de base de datos
if guardar == %T then
amp_factor_desp_db = [amp_factor_desp_db,amp_factor_desp];
amp_factor_pos_db = [amp_factor_pos_db,amp_factor_pos];
c6desp_db = [c6desp_db,c6desp];
c6pos_db = [c6pos_db,c6pos];
contador_db = [contador_db,contador];
cpildesp_db = [cpildesp_db,cpildesp];
cpilpos_db = [cpilpos_db,cpilpos];
frequency_min_db = [frequency_min_db,frequency_min];
frequency_sec_db = [frequency_sec_db,frequency_seq];
long_centro_db = [long_centro_db,long_centro];
long_salida_db = [long_salida_db,long_salida];
time_db = [time_db,time];
vel_centro_db = [vel_centro_db,vel_centro];
vel_salida_db = [vel_salida_db,vel_salida];
longitud_trk_db = [longitud_trk_db,longitud_trk];
bobina_numero_db = [bobina_numero_db,bobina_numero];
save('ddbb')
end
if echo == %F then
clear amp_factor_desp amp_factor_pos c6desp c6pos contador cpildesp cpilpos frequency_min frequency_seq long_centro long_salida time vel_centro vel_salida longitud_trk bobina_numero
end
clear ans
|
2c001e9cb5458f3db4c5020ca8971fd35bd78c74 | d3ba33088e5d34eaccff205f30b4515b9f598dcf | /sci2blif/rasp_design_added_blocks/common_source.sce | 0ddc0af9437d75adedf47113b7df27a0d0eb6717 | [] | no_license | woodjamesdee/rasp30 | d707e480bf116ce278cf4b37b73de9d076e5ede1 | 7f9251e3ec8d8a6ef827b09009b08d575254bd2e | refs/heads/master | 2020-04-21T14:35:45.199183 | 2019-05-20T18:58:42 | 2019-05-20T18:58:42 | 169,640,192 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 150 | sce | common_source.sce | style.displayedLabel="common_source";
pal1=xcosPalAddBlock(pal1, "common_source",[], style);
pal1_1=xcosPalAddBlock(pal1_1,"common_source",[],style);
|
19cec933665fe42e9ae4c1d3856243b792cd61d0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2375/CH11/EX11.5/ex11_5.sce | c76b48fc97697d4ff737ef14c2254441fbfeb773 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 529 | sce | ex11_5.sce | // Exa 11.5
clc;
clear;
close;
format('v',6)
// Given data
f = 5;// in kHz
f = f * 10^3;// in Hz
R1 = 14;// in k ohm
R2 = 75;// in k ohm
R_C = 18;// in k ohm
R = 6;// in k ohm
h_ie = 2;// in k ohm
k = R_C/R;// in k ohm
// f = 1/( 2*%pi*RC*sqrt(6+(4*k)) );
C = 1/( 2*%pi*R*10^3*f*sqrt(6+(4*k)) );// in F
C = C * 10^9;// in nF
disp(C,"The value of capacitor in nF is");
h_fe= 23+(29/k)+(4*k);
disp("The value of h_fe >= "+string(h_fe))
disp("Thus the transistor used mush have a minimum current gain of 45")
|
353ce771380d829eb35219e840d3f0fd031da031 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2774/CH5/EX5.12/Ex5_12.sce | 4a9269a1a0bf881e121d44c5d218fae2c77f9c02 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 817 | sce | Ex5_12.sce | clc
// initialization of variables
T1=400+273 // initial temperature in kelvin
P=600 // pressure in kPa
Tsurr=25+273 // surrounding temperature in K
m=2 // mass of steam in kg
//solution
//please refer to steam table for values
s1=7.708 // specific entropy of steam @ 400 degree celsius and 0.6 MPa
s2=1.9316// specific enropy of condensed water @ 25 degree celsius and 0.6 MPa
delSsys=m*(s2-s1) // entropy change in system i.e of steam
h1=3270 // specific enthalpy of steam @ 400 degree celsius and 0.6 MPa
h2=670.6//specific enropy of condensed water @ 25 degree celsius and 0.6 MPa
Q=m*(h1-h2)// heat transfer at constant pressure
delSsurr=Q/Tsurr // entropy change in surroundings
sigma=delSsys+delSsurr // net entropy change
printf("The net entropy production is %.1f kJ/K",sigma)
|
18694174f7800313e55f9b268c03ae358c8f4d5a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2381/CH7/EX7.10/ex_10.sce | 597e4cdded2991d9cc51722f9dd6ea9e2f96445f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 205 | sce | ex_10.sce | //Example 10 // Frequency
clc;
clear;
close
b1=10;//beats per second
f1=300;//Hz
b2=15;//beats per second
f2=325;//Hz
n1=f1-b1;//Hz
n2=f1+b1;//Hz
n3=f2-b2;//Hz
n4=f2+b2;//Hz
disp(n2,"frequency is,(Hz)=")
|
262c7549392c46bba7c3142a5cfe897c6b53a878 | abd7728083df51a785c94e61999237380b32c4f8 | /examples/Presentation Packs/ERP CORE (Version 0.9)/Simple Visual Search N2pc/Scenarios/Simple Visual Search N2pc.sce | e430edb827e9db41c94a3ee98f27a4dd58e6e54f | [] | no_license | LCTO-TLCO/UAVpresentation | 93b0c0e0eb123b550218bbae4e0bb1db8c30cb5e | 83e0f22cfdc2b7172bf0b90a9a14ddf77e6ccf2a | refs/heads/master | 2023-07-25T14:03:39.874916 | 2021-09-07T07:19:38 | 2021-09-07T07:19:38 | 301,918,691 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 22,060 | sce | Simple Visual Search N2pc.sce | # -------------------------- Header Parameters --------------------------
scenario = "Simple Visual Search N2pc";
write_codes = EXPARAM( "Send Port Codes" );
screen_width_distance = EXPARAM( "Display Width" );
screen_height_distance = EXPARAM( "Display Height" );
screen_distance = EXPARAM( "Viewing Distance" );
default_background_color = EXPARAM( "Background Color" );
default_font = EXPARAM( "Non-Stimulus Font" );
default_font_size = EXPARAM( "Non-Stimulus Font Size" );
default_text_color = EXPARAM( "Non-Stimulus Font Color" );
active_buttons = 2;
response_matching = simple_matching;
target_button_codes = 1,2;
response_logging = EXPARAM( "Response Logging" );
stimulus_properties =
event_name, string,
block_name, string,
block_num, number,
trial_num, number,
tgt_side, string,
tgt_color, string,
tgt_gap, string,
dist_gap, string,
p_code, number,
isi_dur, number;
event_code_delimiter = ";";
# ------------------------------- SDL Part ------------------------------
begin;
trial{
trial_type = first_response;
trial_duration = forever;
picture{
text {
caption = "rest";
preload = false;
} instruct_text;
x = 0;
y = 0;
} instruct_pic;
} instruct_trial;
trial {
stimulus_event {
picture {} ISI_pic;
code = "ISI";
} ISI_event;
} ISI_trial;
trial {
clear_active_stimuli = false;
stimulus_event {
picture {
ellipse_graphic {
ellipse_height = EXPARAM( "Fixation Point Size" );
ellipse_width = EXPARAM( "Fixation Point Size" );
color = EXPARAM( "Fixation Point Color" );
} fix_ellipse;
x = 0;
y = 0;
} test_pic;
response_active = true;
} tgt_event;
} tgt_trial;
trial {
trial_duration = forever;
trial_type = specific_response;
terminator_button = 1,2;
stimulus_event {
picture {
text {
caption = "Rest";
preload = false;
} rest_text;
x = 0;
y = 0;
};
code = "Rest";
} rest_event;
} rest_trial;
trial {
stimulus_event {
picture {
text {
caption = "Ready";
preload = false;
} ready_text;
x = 0;
y = 0;
};
code = "Ready";
} ready_event;
} ready_trial;
trial {
stimulus_event {
picture {
text ready_text;
x = 0;
y = 0;
} noise_pic;
} noise_event;
} noise_trial;
# ----------------------------- PCL Program -----------------------------
begin_pcl;
include_once "../../Library/lib_visual_utilities.pcl";
include_once "../../Library/lib_utilities.pcl";
# --- CONSTANTS --- #
string STIM_EVENT_CODE = "Stim";
string PRACTICE_TYPE_PRACTICE = "Practice";
string PRACTICE_TYPE_MAIN = "Main";
string LOG_ACTIVE = "log_active";
int SIDE_IDX = 1;
int GAP_IDX = 2;
int X_IDX = 1;
int Y_IDX = 2;
int TOP_IDX = 1;
int BOT_IDX = 2;
int LEFT_IDX = 1;
int RIGHT_IDX = 2;
int CORR_BUTTON = 201;
int INCORR_BUTTON = 202;
string LEFT_COND = "Left";
string RIGHT_COND = "Right";
string TOP_COND = "Top";
string BOT_COND = "Bottom";
int GRID_COLUMNS = 3;
int GRID_ROWS = 5;
string TOP_BUTTON_LABEL = "[TOP_BUTTON]";
string BOT_BUTTON_LABEL = "[BOTTOM_BUTTON]";
string COLOR_ONE_LABEL = "[COLOR_ONE]";
string COLOR_TWO_LABEL = "[COLOR_TWO]";
string TGT_COLOR_LABEL = "[TARGET_COLOR]";
rgb_color TRAINING_BG = rgb_color( 128,128,128 );
string CHARACTER_WRAP = "Character";
# --- Set up fixed stimulus parameters ---
string language = parameter_manager.get_string( "Language" );
language_file lang = load_language_file( scenario_directory + language + ".xml" );
bool char_wrap = ( get_lang_item( lang, "Word Wrap Mode" ).lower() == CHARACTER_WRAP.lower() );
double font_size = parameter_manager.get_double( "Non-Stimulus Font Size" );
# Set some durations
trial_refresh_fix( tgt_trial, parameter_manager.get_int( "Stimulus Duration" ) );
# Set the requested button codes
begin
array<int> b_codes[2];
b_codes.fill( 1, 0, INCORR_BUTTON, 0 );
response_manager.set_button_codes( b_codes );
b_codes.fill( 1, 0, CORR_BUTTON, 0 );
response_manager.set_target_button_codes( b_codes );
end;
# Setup the fixation point
if ( parameter_manager.get_bool( "Show Fixation Point During ISI" ) ) then
ISI_pic.add_part( fix_ellipse, 0, 0 );
end;
if ( !parameter_manager.get_bool( "Show Fixation Point During Stimulus" ) ) then
test_pic.clear();
end;
# Change response logging
if ( parameter_manager.get_string( "Response Logging" ) == LOG_ACTIVE ) then
ISI_trial.set_all_responses( false );
tgt_trial.set_all_responses( false );
noise_trial.set_all_responses( false );
end;
# --- Stimulus setup --- #
# --- sub pixel_round
# --- This subroutine rounds a custom unit value to the nearest pixel
double custom_to_pixel = double( display_device.height() ) / display_device.custom_height();
double pixel_to_custom = 1.0 / custom_to_pixel;
sub
double pixel_round( double value )
begin
return double( int( ( value * custom_to_pixel ) + 0.5 ) ) * pixel_to_custom
end;
# Initialize some values
array<plane> tgt_planes[2];
plane dist_plane = new plane( 1.0, 1.0 );
double max_dim = 0.0;
# Target Colors
array<rgb_color> tgt_colors[0];
parameter_manager.get_colors( "Target Colors", tgt_colors );
if ( tgt_colors.count() != 2 ) then
exit( "Error: Two colors must be specified in 'Target Colors'" );
end;
# Set up the stimuli
begin
# Get the requested line width (stroke width)
double c_line_width = double( parameter_manager.get_int( "Stimulus Line Width" ) ) * pixel_to_custom;
# Now add a half-pixel so it draws the correct width
double adj_line_width = c_line_width + ( 0.5 * pixel_to_custom );
# Get the requested dim, and subtract out the line width
double c_size = parameter_manager.get_double( "Stimulus Size" );
c_size = pixel_round( c_size - ( 2.0 * c_line_width ) );
if ( c_size <= 0.0 ) then
exit( "Error: 'Stimulus Line Width' must be reduced, or 'Stimulus Size' increased." );
end;
# Check the gap size
double c_inset_size = ( c_size - parameter_manager.get_double( "Gap Size" ) ) / 2.0;
c_inset_size = pixel_round( c_inset_size );
if ( parameter_manager.get_double( "Gap Size" ) > parameter_manager.get_double( "Stimulus Size" ) ) then
exit( "Error: 'Gap Size' must be less than or equal to 'Stimulus Size'" );
end;
# Check the sizes of the line width and the C. We need to make sure that if
# the line width is even, the coordinates land on whole pixels. If the line width is
# odd, the coordinates need to land between pixels. Otherwise, lines may draw
# at the incorrect width
bool odd_width = mod( int( c_line_width * custom_to_pixel + 0.5 ), 2 ) == 1;
bool odd_size = int( c_size ) % 2 == 1;
double mod = 0.0;
if ( odd_size != odd_width ) then
mod = 0.5;
end;
# Build the distractor C
line_graphic my_c = new line_graphic();
my_c.set_join_type( my_c.JOIN_POINT );
my_c.set_line_width( c_line_width );
my_c.set_line_color( parameter_manager.get_color( "Distractor Color" ) );
# If there are "nubs" on the C then we draw them here
if ( c_inset_size > 0.0 ) then
my_c.add_line( c_size/2.0 + mod, c_size/2.0 - c_inset_size + mod, c_size/2.0 + mod, c_size/2.0 + mod );
my_c.line_to( -c_size/2.0 + mod, c_size/2.0 + mod );
my_c.line_to( -c_size/2.0 + mod, -c_size/2.0 + mod );
my_c.line_to( c_size/2.0 + mod, -c_size/2.0 + mod );
my_c.line_to( c_size/2.0 + mod, -c_size/2.0 + c_inset_size + mod );
# If there aren't nubs, we skip drawing them but extend the sides by 1/2 the line width to make like
# they are there.
else
my_c.add_line( c_size/2.0 + mod + ( c_line_width/2.0 ), c_size/2.0 + mod, -c_size/2.0 + mod, c_size/2.0 + mod );
my_c.line_to( -c_size/2.0 + mod, -c_size/2.0 + mod );
my_c.line_to( c_size/2.0 + mod + ( c_line_width/2.0 ), -c_size/2.0 + mod );
end;
my_c.redraw();
# Now copy it to a plane
dist_plane.set_size( my_c.width(), my_c.height() );
dist_plane.set_texture( my_c.copy_to_texture() );
dist_plane.set_emissive( rgb_color( 255,255,255 ) );
# Print some values to the terminal to report the actual sizes
double gap_size = abs ( ( -c_size/2.0 + c_inset_size ) - ( c_size/2.0 - c_inset_size ) );
term.print_line( "Actual Gap Size: " + string( gap_size ) + " degrees" );
term.print_line( "Actual Stim Height: " + string( my_c.height() ) + " degrees" );
term.print_line( "Actual Stim Width: " + string( my_c.width() ) + " degrees" );
# Store the C dimensions
max_dim = my_c.width();
if ( my_c.height() > my_c.width() ) then
max_dim = my_c.height();
end;
# Build the target c
my_c.clear();
if ( c_inset_size > 0.0 ) then
my_c.add_line( c_size/2.0 - c_inset_size + mod, c_size/2.0 + mod, c_size/2.0 + mod, c_size/2.0 + mod );
my_c.line_to( c_size/2.0 + mod, -c_size/2.0 + mod );
my_c.line_to( -c_size/2.0 + mod, -c_size/2.0 + mod );
my_c.line_to( -c_size/2.0 + mod, c_size/2.0 + mod );
my_c.line_to( -c_size/2.0 + c_inset_size + mod, c_size/2.0 + mod );
else
my_c.add_line( c_size/2.0 + mod, c_size/2.0 + mod, c_size/2.0 + mod, -c_size/2.0 + mod );
my_c.line_to( -c_size/2.0 + mod, -c_size/2.0 + mod );
my_c.line_to( -c_size/2.0 + mod, c_size/2.0 + mod );
end;
my_c.set_line_color( tgt_colors[1] );
my_c.redraw();
term.print_line( "Rotated Gap Size: " + string( gap_size ) + " degrees" );
term.print_line( "Rotated Stim Height: " + string( my_c.height() ) + " degrees" );
term.print_line( "Rotated Stim Width: " + string( my_c.width() ) + " degrees" );
# Save it to a plane
tgt_planes[1] = new plane( my_c.width(), my_c.height() );
tgt_planes[1].set_texture( my_c.copy_to_texture() );
tgt_planes[1].set_emissive( rgb_color( 255,255,255 ) );
# Save the second condition plane
my_c.set_line_color( tgt_colors[2] );
my_c.redraw();
tgt_planes[2] = new plane( my_c.width(), my_c.height() );
tgt_planes[2].set_texture( my_c.copy_to_texture() );
tgt_planes[2].set_emissive( rgb_color( 255,255,255 ) );
test_pic.clear();
test_pic.add_3dpart( dist_plane, -0.5, 0.0, 0.0 );
test_pic.add_3dpart( tgt_planes[1], 0.5, 0.0, 0.0 );
end;
# Now set up the search grid
array<double> grid_locs[2][0][0];
array<double> jitters[2];
int num_stim = parameter_manager.get_int( "Stimuli per Side" );
begin
# Get the size of the search array
array<double> array_dims[2];
array_dims[X_IDX] = parameter_manager.get_double( "Bounding Box Width" );
array_dims[Y_IDX] = parameter_manager.get_double( "Bounding Box Height" );
double inner_buffer = parameter_manager.get_double( "Bounding Box Horizontal Position" );
# Exit if the requested dimensions are too big
if ( array_dims[Y_IDX] > display_device.custom_height() ) then
exit( "Error: 'Bounding Box Height' must be reduced." );
end;
if ( ( array_dims[X_IDX] + inner_buffer ) > ( display_device.custom_width()/2.0 ) ) then
exit( "Error: 'Bounding Box Width' must be reduced." );
end;
# Get the total height/width of each possible stimulus slot
array<double> slot_dims[2];
slot_dims[X_IDX] = array_dims[X_IDX]/ double(GRID_COLUMNS);
slot_dims[Y_IDX] = array_dims[Y_IDX]/ double(GRID_ROWS);
# Get the buffer distances
double x_buff = parameter_manager.get_double( "Minimum Horizontal Distance Between Stimuli" );
double y_buff = parameter_manager.get_double( "Minimum Vertical Distance Between Stimuli" );
# Get how much stuff can jitter
jitters[X_IDX] = ( slot_dims[X_IDX] - max_dim - x_buff )/2.0;
jitters[Y_IDX] = ( slot_dims[Y_IDX] - max_dim - y_buff )/2.0;
if ( jitters[X_IDX] < 0.0 ) || ( jitters[Y_IDX] < 0.0 ) then
exit( "Error: Not enough space for all stimuli. Reduce 'Stimulus Size' or the minimum distance between stimuli, or increase the bounding box size" );
end;
# store the x/y locs of the search array(s)
loop
double x_pos = inner_buffer + slot_dims[X_IDX]/2.0;
int i = 1
until
i > GRID_COLUMNS
begin
loop
double y_pos = ( array_dims[Y_IDX]/2.0 ) - ( slot_dims[Y_IDX]/2.0 );
int j = 1
until
j > GRID_ROWS
begin
array<double> temp[2];
temp[X_IDX] = x_pos;
temp[Y_IDX] = y_pos;
grid_locs[RIGHT_IDX].add( temp );
temp[X_IDX] = -x_pos;
grid_locs[LEFT_IDX].add( temp );
y_pos = y_pos - slot_dims[Y_IDX];
j = j + 1;
end;
x_pos = x_pos + slot_dims[X_IDX];
i = i + 1;
end;
end;
# --- Subroutines --- #
# --- sub present_instructions
array<string> color_names[0];
parameter_manager.get_strings( "Target Color Names", color_names );
if ( color_names.count() != 2 ) then
exit( "Error: Two condition names must be specified in 'Condition Color Names'" );
end;
array<string> formatted_color_names[2];
formatted_color_names[1] = "<font color='" + string( tgt_colors[1].red_byte() ) + ", ";
formatted_color_names[1].append( string( tgt_colors[1].green_byte() ) + ", " );
formatted_color_names[1].append( string( tgt_colors[1].blue_byte() ) + "'>" );
formatted_color_names[1].append( color_names[1] + "</font>" );
formatted_color_names[2] = "<font color='" + string( tgt_colors[2].red_byte() ) + ", ";
formatted_color_names[2].append( string( tgt_colors[2].green_byte() ) + ", " );
formatted_color_names[2].append( string( tgt_colors[2].blue_byte() ) + "'>" );
formatted_color_names[2].append( color_names[2] + "</font>" );
int top_button = parameter_manager.get_int( "Response Button Mapping" );
array<string> button_names[2];
button_names[1] = parameter_manager.get_string( "Response Button 1 Name" );
button_names[2] = parameter_manager.get_string( "Response Button 2 Name" );
sub
present_instructions( string instruct_string )
begin
instruct_string = instruct_string.replace( TOP_BUTTON_LABEL, button_names[top_button] );
instruct_string = instruct_string.replace( BOT_BUTTON_LABEL, button_names[ ( top_button % 2 ) + 1 ] );
instruct_string = instruct_string.replace( COLOR_ONE_LABEL, formatted_color_names[1] );
instruct_string = instruct_string.replace( COLOR_TWO_LABEL, formatted_color_names[2] );
instruct_text.set_formatted_text( true );
full_size_word_wrap( instruct_string, font_size, char_wrap, instruct_text );
instruct_trial.present();
default.present();
end;
# --- sub show_rest
# Initialize some values
int within_rest_dur = parameter_manager.get_int( "Within-Block Rest Duration" );
int between_rest_dur = parameter_manager.get_int( "Between-Block Rest Duration" );
string timed_rest_caption = get_lang_item( lang, "Timed Rest Caption" );
string untimed_rest_caption = get_lang_item( lang, "Untimed Rest Caption" );
sub
show_rest( bool within_block )
begin
# Get the duration
int temp_dur = within_rest_dur;
if ( !within_block ) then
temp_dur = between_rest_dur;
end;
# Update the trial type and duration
if ( temp_dur == 0 ) then
rest_text.set_caption( untimed_rest_caption, true );
rest_trial.set_duration( rest_trial.FOREVER );
rest_trial.set_type( rest_trial.FIRST_RESPONSE );
else
rest_text.set_caption( timed_rest_caption, true );
rest_trial.set_duration( temp_dur );
rest_trial.set_type( rest_trial.FIXED );
end;
# Show the trial
full_size_word_wrap( rest_text.caption(), font_size, char_wrap, rest_text );
rest_trial.present();
end;
# --- sub show_reminder
string tgt_id_caption = get_lang_item( lang, "Target Reminder Caption" );
sub
show_reminder( int tgt_id )
begin
string temp_reminder = tgt_id_caption.replace( TGT_COLOR_LABEL, formatted_color_names[tgt_id] );
present_instructions( temp_reminder );
end;
# --- sub ready_set_go ---
int ready_dur = parameter_manager.get_int( "Ready-Set-Go Duration" );
trial_refresh_fix( ready_trial, ready_dur );
array<string> ready_caps[3];
ready_caps[1] = get_lang_item( lang, "Ready Caption" );
ready_caps[2] = get_lang_item( lang, "Set Caption" );
ready_caps[3] = get_lang_item( lang, "Go Caption" );
sub
ready_set_go
begin
if ( ready_dur > 0 ) then
loop
int i = 1
until
i > ready_caps.count()
begin
full_size_word_wrap( ready_caps[i], font_size, char_wrap, ready_text );
ready_trial.present();
i = i + 1;
end;
end;
end;
# --- sub build_test_pic
array<double> stim_rots[2];
stim_rots[TOP_IDX] = 0.0;
stim_rots[BOT_IDX] = 180.0;
sub
build_test_pic( int tgt_rot, int tgt_side, int tgt_number, int dist_rot )
begin
# Clear the test pic then add the fixation
test_pic.clear();
test_pic.add_part( fix_ellipse, 0, 0 );
# Shuffle the locs
grid_locs[LEFT_IDX].shuffle();
grid_locs[RIGHT_IDX].shuffle();
# Loop to add the picture parts
loop
int j = 1
until
j > grid_locs.count()
begin
loop
int k = 1
until
k > num_stim
begin
# Grab a random x/y jitter for this position
double x_jitter = double( random_exclude( -1,1,0 ) ) * jitters[X_IDX] * random();
double y_jitter = double( random_exclude( -1,1,0 ) ) * jitters[Y_IDX] * random();
# Get the final x/y value
double this_x = grid_locs[j][k][X_IDX] + x_jitter;
double this_y = grid_locs[j][k][Y_IDX] + y_jitter;
# Add the 3dpart at a random rotation
test_pic.add_3dpart( dist_plane, this_x, this_y, 0.0 );
test_pic.set_3dpart_rot( test_pic.d3d_part_count(), 0.0, 0.0, stim_rots[random(1,stim_rots.count() )] );
# If this is the last stim, we need to add a target/distractor
if ( k == num_stim ) then
if ( j == tgt_side ) then
test_pic.set_3dpart( test_pic.d3d_part_count(), tgt_planes[tgt_number] );
test_pic.set_3dpart_rot( test_pic.d3d_part_count(), 0.0, 0.0, stim_rots[tgt_rot] );
else
test_pic.set_3dpart( test_pic.d3d_part_count(), tgt_planes[( tgt_number % 2 ) + 1] );
test_pic.set_3dpart_rot( test_pic.d3d_part_count(), 0.0, 0.0, stim_rots[dist_rot] );
end;
end;
k = k + 1;
end;
j = j + 1;
end;
end;
# --- sub show_block
# Initialize some values
array<int> buttons[2];
buttons[TOP_IDX] = parameter_manager.get_int( "Response Button Mapping" );
buttons[BOT_IDX] = ( buttons[TOP_IDX] % 2 ) + 1;
array<string> side_cond_names[2];
side_cond_names[LEFT_IDX] = LEFT_COND;
side_cond_names[RIGHT_IDX] = RIGHT_COND;
array<string> gap_cond_names[2];
gap_cond_names[TOP_IDX] = TOP_COND;
gap_cond_names[BOT_IDX] = BOT_COND;
array<int> ISI_range[0];
parameter_manager.get_ints( "ISI Range", ISI_range );
if ( ISI_range.count() != 2 ) then
exit( "Error: Two values must be specified in 'ISI Range'" );
end;
int trials_per_rest = parameter_manager.get_int( "Trials Between Rest Breaks" );
sub
show_block( array<int,2>& order, int block_num, int tgt_id, string prac_check )
begin
# Shuffle the order
order[SIDE_IDX].shuffle();
order[GAP_IDX].shuffle();
# Ready set go
ready_set_go();
ISI_trial.set_duration( random( ISI_range[1], ISI_range[2] ) );
ISI_trial.present();
# Loop to present stimuli
loop
int i = 1
until
i > order[1].count()
begin
# Get some trial information
int tgt_side = order[SIDE_IDX][i];
int dist_gap = random( 1, stim_rots.count() );
int tgt_gap = order[GAP_IDX][i];
build_test_pic( tgt_gap, tgt_side, tgt_id, dist_gap );
# Get port code
int p_code = int( string( tgt_id ) + string( tgt_side ) + string( tgt_gap ) );
tgt_event.set_port_code( p_code );
# Set target button
tgt_event.set_target_button( buttons[tgt_gap] );
# Setup ISI
trial_refresh_fix( ISI_trial, random( ISI_range[1], ISI_range[2] ) );
# Set event code
tgt_event.set_event_code(
STIM_EVENT_CODE + ";" +
prac_check + ";" +
string( block_num ) + ";" +
string( i ) + ";" +
side_cond_names[tgt_side] + ";" +
color_names[tgt_id] + ";" +
gap_cond_names[tgt_gap] + ";" +
gap_cond_names[dist_gap] + ";" +
string( p_code ) + ";" +
string( ISI_trial.duration() )
);
# Trial sequence
tgt_trial.present();
ISI_trial.present();
# Do rest sequence
if ( trials_per_rest > 0 ) && ( prac_check == PRACTICE_TYPE_MAIN ) then
if ( i % trials_per_rest == 0 ) && ( i < order[1].count() ) then
show_rest( true );
show_reminder( tgt_id );
ready_set_go();
ISI_trial.present();
end;
end;
i = i + 1;
end;
end;
# --- Trial Order & Conditions --- #
int trials_per_block = parameter_manager.get_int( "Trials per Block" );
array<int> trial_order[2][trials_per_block];
trial_order[SIDE_IDX].fill( 1, 0, LEFT_IDX, 0 );
trial_order[SIDE_IDX].fill( 1, trials_per_block/2, RIGHT_IDX, 0 );
double top_gap_prop = parameter_manager.get_double( "Top Gap Proportion" );
int top_gap_trials = int( round( double( trials_per_block ) * top_gap_prop, 0 ) );
trial_order[GAP_IDX].fill( 1, 0, BOT_IDX, 0 );
trial_order[GAP_IDX].fill( 1, top_gap_trials, TOP_IDX, 0 );
int prac_trials = parameter_manager.get_int( "Practice Trials" );
array<int> prac_trial_order[2][prac_trials];
if ( prac_trials > 0 ) then
prac_trial_order[SIDE_IDX].fill( 1, 0, LEFT_IDX, 0 );
prac_trial_order[SIDE_IDX].fill( 1, prac_trials/2, RIGHT_IDX, 0 );
int prac_top_trials = int( round( double( prac_trials ) * top_gap_prop, 0 ) );
prac_trial_order[GAP_IDX].fill( 1, 0, BOT_IDX, 0 );
prac_trial_order[GAP_IDX].fill( 1, prac_top_trials, TOP_IDX, 0 );
end;
array<int> block_order[0];
parameter_manager.get_ints( "Target Color Order", block_order );
if ( block_order.count() == 0 ) then
exit( "Error: At least one value must be specified in 'Block Order'" );
elseif ( parameter_manager.get_bool( "Randomize Block Order" ) ) then
block_order.shuffle();
end;
# --- Main Sequence --- #
string practice_caption = get_lang_item( lang, "Practice Caption" );
string prac_complete_caption = get_lang_item( lang, "Practice Complete Caption" );
string instructions = get_lang_item( lang, "Main Instructions" );
loop
int i = 1
until
i > block_order.count()
begin
# Block setup
int this_tgt = block_order[i];
# Do the practice and/or show the instructions
if ( i == 1 ) then
present_instructions( instructions );
if ( prac_trials > 0 ) then
string temp_reminder = tgt_id_caption.replace( TGT_COLOR_LABEL, formatted_color_names[this_tgt] );
present_instructions( temp_reminder + " " + practice_caption );
show_block( prac_trial_order, i, this_tgt, PRACTICE_TYPE_PRACTICE );
present_instructions( prac_complete_caption );
end;
end;
show_reminder( this_tgt );
# Show the block
show_block( trial_order, i, this_tgt, PRACTICE_TYPE_MAIN );
if ( i < block_order.count() ) then
show_rest( false );
end;
# Increment
i = i + 1;
end;
present_instructions( get_lang_item( lang, "Completion Screen Caption" ) ); |
25bb3c3b395fcb9fce3318e2447325d533aacd86 | bc0cc3311298e69d5931f0eb5f32c708df32857a | /Test/output/3.tst | 266713d7c30cb83e0ec226c90e6c526b0c13195e | [] | no_license | Misho13/Min-DNF | 695096b79d795b70243208036668012b5eb05793 | bdf648d77a26eb6e277ecd583a6bb26bb9004f55 | refs/heads/master | 2021-05-12T16:19:05.027543 | 2018-05-30T21:07:01 | 2018-05-30T21:07:01 | 117,011,414 | 0 | 2 | null | null | null | null | UTF-8 | Scilab | false | false | 41 | tst | 3.tst | !x0!x1 U !x0!x2 U x0x1x2 U !x1!x3 U !x2x3 |
0f31d29f4e2cf62fb71ca23cac498ff76c01c27c | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.3.1/Unix-Windows/scilab-2.3/macros/scicos_blocks/SUPER_f.sci | 9ebdf06a6a85ea972c2d02082232d700266e9491 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 3,020 | sci | SUPER_f.sci | function [x,y,typ]=SUPER_f(job,arg1,arg2)
x=[];y=[],typ=[]
select job
case 'plot' then
standard_draw(arg1)
case 'getinputs' then
[x,y,typ]=standard_inputs(arg1)
case 'getoutputs' then
[x,y,typ]=standard_outputs(arg1)
case 'getorigin' then
[x,y]=standard_origin(arg1)
case 'set' then
graphics=arg1(2);label=graphics(4)
model=arg1(3);
x=model(8)
while %t do
[x,newparameters,needcompile]=scicos(model(8))
model(8)=x
nin=0;nout=0;nclkin=0;nclkout=0;
in=[],out=[],cin=[],cout=[]
inp=[],outp=[],cinp=[],coutp=[]
for k=2:size(x)
o=x(k)
if o(1)=='Block' then
modelb=o(3)
select o(5)
case 'IN_f' then
nin=nin+1
inp=[inp modelb(9)]
in=[in;modelb(3)]
case 'OUT_f' then
nout=nout+1
outp=[outp modelb(9)]
out=[out;modelb(2)]
case 'CLKIN_f' then
nclkin=nclkin+1
cinp=[cinp modelb(9)]
cin=[cin;modelb(5)]
case 'CLKINV_f' then
nclkin=nclkin+1
cinp=[cinp modelb(9)]
cin=[cin;modelb(5)]
case 'CLKOUT_f' then
nclkout=nclkout+1
coutp=[coutp modelb(9)]
cout=[cout;modelb(4)]
case 'CLKOUTV_f' then
nclkout=nclkout+1
coutp=[coutp modelb(9)]
cout=[cout;modelb(4)]
end
end
end
ok=%t
mess=[]
if nin>0 then
[inp,k]=sort(-inp)
if ~and(inp==-(1:nin)) then
mess=[mess;
'Super_block input ports must be numbered';
'from 1 to '+string(nin);' ']
ok=%f
end
in=in(k)
end
if nout>0 then
[outp,k]=sort(-outp)
if ~and(outp==-(1:nout)) then
mess=[mess;
'Super_block output ports must be numbered';
'from 1 to '+string(nout);' ']
ok=%f
end
out=out(k)
end
if nclkin>0 then
[cinp,k]=sort(-cinp)
if ~and(cinp==-(1:nclkin)) then
mess=[mess;
'Super_block event input ports must be numbered';
'from 1 to '+string(nclkin);' ']
ok=%f
end
cin=cin(k)
end
if nclkout>0 then
[coutp,k]=sort(-coutp)
if ~and(coutp==-(1:nclkout)) then
mess=[mess;
'Super_block event output ports must be numbered';
'from 1 to '+string(nclkout);' ']
ok=%f
end
cout=cout(k)
end
if ok then
[model,graphics,ok]=check_io(model,graphics,in,out,cin,cout)
else
message(mess)
end
if ok then
model(8)=x
model(11)=[] //compatibility
x=arg1;x(3)=model;x(2)=graphics;
y=needcompile
typ=newparameters
break
end
end
case 'define' then
model=list('super',1,1,[],[],[],' ',..
list(list([600,450,0,0],'Super Block',[],[],[])),[],'h',[],[%f %f])
gr_i=['thick=xget(''thickness'');xset(''thickness'',2);';
'xx=orig(1)+ [2 4 4]*(sz(1)/7);';
'yy=orig(2)+sz(2)-[2 2 6]*(sz(2)/10);';
'xrects([xx;yy;[sz(1)/7;sz(2)/5]*ones(1,3)]);';
'xx=orig(1)+ [1 2 3 4 5 6 3.5 3.5 3.5 4 5 5.5 5.5 5.5]*sz(1)/7;';
'yy=orig(2)+sz(2)-[3 3 3 3 3 3 3 7 7 7 7 7 7 3 ]*sz(2)/10;';
'xsegs(xx,yy,0);';
'xset(''thickness'',thick)']
x=standard_define([2 2],model,[],gr_i)
end
|
6f7ebd002c9b58328bd625f2578cb976bddc4f0c | 449d555969bfd7befe906877abab098c6e63a0e8 | /476/CH4/EX4.18/Example_4_18.sce | 442a66f00e60915968685f1aef0ed1142342c28c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,345 | sce | Example_4_18.sce | //A Textbook of Chemical Engineering Thermodynamics
//Chapter 4
//Second Law of Thermodynamics
//Example 18
clear;
clc;
//Given:
m_oil = 5000; //mass flow rate of hydrocarbon oil (kg/h)
Tin_oil = 425; //inlet temperature of oil (K)
Tout_oil = 340; //exit temperature of oil (K)
m_water = 10000; //mass flow rate of water (kg/h)
Tin_water = 295; //inlet temperature of water (K)
c_oil = 2.5; //mean specific heat of oil (kJ/kg K)
c_water = 4.2; //mean specific heat of water (kJ/kg K)
//To determine total change in entropy and available work
//(a)
//By energy balance
Tout_water = ((m_oil*c_oil*(Tin_oil-Tout_oil))/(m_water*c_water))+295; //exit temperature of water (K)
S_oil = m_oil*c_oil*log(Tout_oil/Tin_oil); //change in entropy of oil (kJ/K)
S_water = m_water*c_water*log(Tout_water/Tin_water); //change in entropy of water (kJ/K)
S_tot = S_oil+S_water; //total entropy change
mprintf('The total entropy change is %f kJ/K',S_tot);
//(b)
To = 295; //temperature at which heat is rejected to surrounding (K)
//Let Q be heat given out by the oil on cooling
Q = m_oil*c_oil*(Tin_oil-Tout_oil);
//Heat rejected to the surrounding at To by the Carnot Engine is given by
//Q2 = To(Q/T) = -To*S_oil
Q2 = -To*S_oil; //(kJ)
//Let W be the work output of engine
W = Q-Q2;
mprintf('\nThe work output of the engine would be %4.3e kJ', W);
//end |
13ae37301840b36b651da9eb7b57e350b23e979c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3755/CH6/EX6.13/Ex6_13.sce | 820fd2d874b8b552e4bd2a5d41286358b8f5d53f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 483 | sce | Ex6_13.sce | clear
//
//
//
//Variable declaration
h=6.625*10^-34; //planck's constant(J-sec)
m=1.675*10^-27; //mass of neutron(kg)
e=1.6*10^-19; //charge of electron(c)
E=12.8*10^6; //energy of neutron(eV)
//Calculations
v=sqrt(2*E*e/m); //velocity(m/sec)
lamda=h/(m*v); //de-broglie wavelength of neutron(m)
//Result
printf("\n de-broglie wavelength of neutron is %0.3f *10^-15 m",lamda*10^15)
printf("\n answer in the book is wrong")
|
22d0ed0ac0279b48ddd41dde01827404125f018c | 449d555969bfd7befe906877abab098c6e63a0e8 | /845/CH8/EX8.6/Ex8_6.sce | 2ec208ec09ba263e7c50af9b1578dfa416c5d411 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 693 | sce | Ex8_6.sce | //Example 8.6
clc
clear
function [f] = f1(x,y,p)
f = p;
endfunction
function [f] = f2(x,y,p)
f = 0.1*(1-y^2)*p - y;
endfunction
x0 = 0;
y0 = 1;
p0 = 0;
h = 0.2;
x = 0.2;
n = (x-x0)/h;
for i = 1:n
k1 = h*f1(x0,y0,p0);
l1 = h*f2(x0,y0,p0);
k2 = h*f1(x0+h/2,y0+k1/2,p0+l1/2);
l2 = h*f2(x0+h/2,y0+k1/2,p0+l1/2);
k3 = h*f1(x0+h/2,y0+k2/2,p0+l2/2);
l3 = h*f2(x0+h/2,y0+k2/2,p0+l2/2);
k4 = h*f1(x0+h,y0+k3,p0+l3);
l4 = h*f2(x0+h,y0+k3,p0+l3);
y = y0 + 1/6*(k1+2*(k2+k3)+k4);
p = p0 + 1/6*(l1+2*(l2+l3)+l4);
y = round(y*10^4)/10^4;
p = round(p*10^4)/10^4;
end
disp(y,"y(0.2) = ")
disp(p,"y''(0.2) = ")
|
676109e43d7974dd966c2e87317a24890a584f0d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2840/CH13/EX13.5/ex13_5.sce | 01dd3a28787569eb16b1537eb83471118856caf2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 162 | sce | ex13_5.sce | clc;
clear all;
ur=16;//relative permiability
I=3300;//intensity of magnetization
H=I/(ur-1);//strength of the field
disp('A/m',H,'strength of the field');
|
6c1c14f281af432328f8d15a8624beb2cda633c6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1760/CH8/EX8.20/EX8_20.sce | 1218b45685bdead73da923c6681fabd6e44ddca6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 176 | sce | EX8_20.sce | //EXAMPLE 8-20 PG NO-535
Ro=450;
Fc=20000;
L=Ro/(4*%pi*Fc);
C=1/(4*%pi*Fc*Ro);
Z1=Ro/(2*%pi*Fc);
disp('i) IMPEDANCE (Z1) is = '+string (Z1) +' ');
|
64ff673eef118aca107107b9b4ec37896da0a881 | 5900f4bae371f44e90fa8de76d746cc470223e04 | /src/add_functions.sci | 6afedcb3e7ff94ed301862dcde7bc780c1060380 | [] | no_license | olgerd27/union__gte_reducer_oil | 6400148e100224e0c59c4ca807afa5de07ffcb09 | be994038b218ba7cac13b59faf2391a8e2bdd861 | refs/heads/master | 2021-01-10T20:21:06.558271 | 2014-10-01T06:56:23 | 2014-10-01T06:56:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,427 | sci | add_functions.sci | // Additional functions
function [x, y] = sortByX(x, y)
//*********************************************************************
// Sorting by "x" array. Others arrays, that stores in "y" variable, *
// will be sorted in accordance with with "x" array. *
//*********************************************************************
n = length(x);
col = size(y, 'c');
for j = 1 : n
for i = 2 : n
if (x(i) < x(i - 1))
tempX = x(i);
x(i) = x(i - 1);
x(i - 1) = tempX;
for k = 1 : col
tempY(k) = y(i, k);
y(i, k) = y(i - 1, k);
y(i - 1, k) = tempY(k);
end
end
end
end
endfunction
// Mathematical functions
function yu = interExtraPolation(x, y, xu)
//********************************************************
// The function of the linear inter- and extrapolations *
//********************************************************
n = length(x);
i = 2;
while (xu > x(i))
i = i + 1;
if (i > n)
x1 = x(n - 1);
x2 = x(n);
y1 = y(n - 1);
y2 = y(n);
yu = (xu - x1) * (y2 - y1) / (x2 - x1) + y1;
return;
end
end
if (xu == x(i))
yu = y(i);
return;
elseif (xu < x(i))
x1 = x(i - 1);
x2 = x(i);
y1 = y(i - 1);
y2 = y(i);
yu = (xu - x1) * (y2 - y1) / (x2 - x1) + y1;
end
endfunction
// Approximation
function coef = coeffs_trend_n(x, y, n)
//*****************************************************************
// The function, that calculate coefficients of n-degree trend *
// In: x, y - the arrays of points, that approximate *
// n - the polynomial power value *
// Out: the trend coefficients: a, b, c, d ... - coef(1 2 3 4...) *
//*****************************************************************
M = 2 * n + 1;
for j = 1 : n + 1
for i = 1 : n + 1
K(j, i) = sum(x .^ (M - i - j + 1));
end
end
K(n + 1, n + 1) = length(x);
for i = 1 : n + 1
S(i) = sum(x .^ (n + 1 - i) .* y);
end
coef = inv(K) * S;
endfunction
function y_apr = approximation(x_init, y_init, x_apr, powers, Nrows_apr, Ncols_apr)
//****************************************************************************************************
// Function, that perform approximation of distributions points by polynomial line with any power. *
// The main features are: *
// - perform the calculation of approximate values for "x_apr" array values; *
// - if arrays "x_init", "y_init" and "x_apr" is more than 1-dimension arrays (need to *
// approximate more than 1 line), every line can be approximated by the different powers, *
// stores in the "powers" array variable. *
// In: x_init - array of the "x" initial points values *
// y_init - array of the "y" initial points values *
// x_apr - array of the "x" approximation line points values *
// powers - array of the polynomial powers (for every approximation line) *
// Out: y_apr - array of the "y" polynomial line points values *
//****************************************************************************************************
y_apr(Nrows_apr, Ncols_apr) = 0;
for i = 1 : Ncols_apr
coefs = coeffs_trend_n(x_init, y_init(:, i), powers(i)); // define the polynomial coefficients for the current line
for j = 1 : powers(i) + 1
y_apr(:, i) = y_apr(:, i) + coefs(j) * x_apr .^ (powers(i) + 1 - j);
end
end
endfunction
// Data & Time
function date_time_str = getDateTimeString()
//********************************************************************
// Preparing the string in the format: "year.month.day_hour:min:sec" *
//********************************************************************
date_time_int = round(datevec(now()));
date_time_str = sprintf("%i.%i.%i_%i:%i:%i", date_time_int(1), date_time_int(2),..
date_time_int(3), date_time_int(4),..
date_time_int(5), date_time_int(6));
endfunction
|
d6c50b6ad954781188b0b3f538bb71a072fe81f5 | 5887829f5a0a005033807cf7dc4fb7231eb280ec | /Listing/chapter 4/Listing422.sce | 45f7e9b72d7a229c43283d6e1a374552e26855fc | [] | no_license | joaolrneto/learning_scilab | 78ecc0019f167b57bc35647c4ac785ece01e443e | 9624c9a6736860a8a836b0f801256b6224756585 | refs/heads/main | 2023-03-17T22:17:51.853368 | 2021-03-15T20:58:34 | 2021-03-15T20:58:34 | 344,478,059 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 128 | sce | Listing422.sce | clc
clear
clf()
t=linspace(-%pi,%pi,30);
function z=my_surface(x, y),z=x*sin(x)^2*cos(y),endfunction
contour(t,t,my_surface,10)
|
619b4e602ed8b13ab927855e649e6e0f9dc6dd7a | 449d555969bfd7befe906877abab098c6e63a0e8 | /2672/CH3/EX3.40/Ex3_40.sce | 36b2987dc01459395522f5bb8c15cfef643b22f4 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 421 | sce | Ex3_40.sce | //Example 3_40
clc;
clear;
close;
format('v',7);
//given data :
R=10;//ohm
L=100;//mH
C=20;//micro F
V=100;//V
f0=1/2/%pi*sqrt(1/(L/1000*C*10^-6)-R^2/(L/1000)^2);//Hz
disp(f0,"Resonant frequency(Hz)");
Q=2*%pi*f0*L/1000/R;//Q-factor
disp(Q,"Q-factor");
Z0=L/1000/(C*10^-6)/R;//ohm
disp(Z0,"Dynamic Impedence(ohm)");
I0=V/Z0;//A
disp(I0,"Current at resonance(A)");
//Answer is not accurate in the book.
|
60210bfe6785a90982b35343dce7733bdf523385 | 449d555969bfd7befe906877abab098c6e63a0e8 | /181/CH3/EX3.20/example3_20.sce | 1abc395ff20ce31cc891a8b0c28591594da3128a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 571 | sce | example3_20.sce | // Calculate input voltage,value of filter
// Basic Electronics
// By Debashis De
// First Edition, 2010
// Dorling Kindersley Pvt. Ltd. India
// Example 3-20 in page 163
clear; clc; close;
// Given data
Vdc=30; // DC voltage in volts
Rl=1000; // Load resistance in ohms
gamma_fwr=0.015; // Ripple factor
// Calculation
Idc=Vdc/Rl;
C=2900/(gamma_fwr*Rl);
Vm=Vdc+((5000*Idc)/C);
Vi=(2*Vm)/sqrt(2);
printf("Value of capacitor filter = %0.0f mu-F",C);
printf("Input voltage required = %0.2f V\n",Vi);
// Result
// V_in = 43.52 V
// C = 193 mu-F |
bde62290c122c38f184f8ea76e56518d7430428f | 449d555969bfd7befe906877abab098c6e63a0e8 | /2873/CH12/EX12.8/Ex12_8.sce | 1a76291331bcbd6ef17fb371c997ba10596366df | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,278 | sce | Ex12_8.sce | // Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
clear;
clc;
disp("Engineering Thermodynamics by Onkar Singh Chapter 12 Example 8")
mc=20;//mass of oil in kg/min
Tc_out=100;//initial temperature of oil in degree celcius
Th_in=30;//final temperature of oil in degree celcius
Th_out=25;//temperature of water in degree celcius
Cpc=2;//specific heat of oil in KJ/kg K
Cph=4.18;//specific heat of water in KJ/kg K
mh=15;//water flow rate in kg/min
U=25;//overall heat transfer coefficient in W/m^2 K
disp("This oil cooler has arrangement similar to a counter flow heat exchanger.")
disp("by heat exchanger,Q=U*A*LMTD=mc*Cpc*(Tc_out-Th_in)=mh*Cph*(Tc_in-Th_out)")
disp("so Q in KJ/min")
Q=mc*Cpc*(Tc_out-Th_in)
disp("and T=Th_out+(Q/(mh*Cph))in degree celcius")
T=Th_out+(Q/(mh*Cph))
disp("LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)in degree ")
disp("here deltaT_in=Tc_out-T in degree celcius")
deltaT_in=Tc_out-T
disp("deltaT_out=Th_in-Th_out in degree celcius")
deltaT_out=Th_in-Th_out
disp("so LMTD in degree celcius")
LMTD=(deltaT_in-deltaT_out)/log(deltaT_in/deltaT_out)
disp("substituting in,Q=U*A*LMTD")
disp("A=(Q*10^3/60)/(U*LMTD)in m^2")
A=(Q*10^3/60)/(U*LMTD)
disp("so surface area=132.85 m^2")
|
0f0996763615ea7785bbcc8ec9d7edd9ef729be7 | 1db0a7f58e484c067efa384b541cecee64d190ab | /macros/fftshift1.sci | 90260254ae8386775d3916f81d8210586d4bbac9 | [] | no_license | sonusharma55/Signal-Toolbox | 3eff678d177633ee8aadca7fb9782b8bd7c2f1ce | 89bfeffefc89137fe3c266d3a3e746a749bbc1e9 | refs/heads/master | 2020-03-22T21:37:22.593805 | 2018-07-12T12:35:54 | 2018-07-12T12:35:54 | 140,701,211 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,277 | sci | fftshift1.sci | function y= fftshift1(X,DIM)
//Perform a shift of the vector X, for use with the 'fft1' and 'ifft1' functions, in order the move the frequency 0 to the center of the vector or matrix.
//Calling Sequence
// fftshift1 (X)
// fftshift1 (X, DIM)
//Parameters
//X:It is a vector of N elements corresponding to time samples
//DIM: The optional DIM argument can be used to limit the dimension along which the permutation occurs
//Description
//This is an Octave function.
//Perform a shift of the vector X, for use with the 'fft1' and 'ifft1' functions, in order the move the frequency 0 to the center of the vector or matrix.
//
//If X is a vector of N elements corresponding to N time samples spaced by dt, then 'fftshift1 (fft1 (X))' corresponds to frequencies
//
//f = [ -(ceil((N-1)/2):-1:1)*df 0 (1:floor((N-1)/2))*df ]
//
//where df = 1 / dt.
//
//If X is a matrix, the same holds for rows and columns. If X is an array, then the same holds along each dimension.
//
//The optional DIM argument can be used to limit the dimension along
which the permutation occurs.
rhs= argn(2);
if(rhs <1 | rhs >2)
error('Wrong number of Input arguments');
end
select(rhs)
case 1 then
y=callOctave("fftshift",X);
case 2 then
y=callOctave("fftshift",X,DIM);
end
endfunction
|
9203b42737f68adaaa4b449a3c27ec902c986e05 | 978b15852ad0d9219e0cd69e9da3a9140b84aa97 | /exo5+exo6/factorisationLU.sce | 3baa2da09f8fcefe6116373d8ea91aa6ff81f60c | [] | no_license | nadine867/TP_CN | cd2acc700471c7f595ada5f2b799b43ca44590ce | fcf09074e27723ca3e9b1eec870386c848b190f9 | refs/heads/master | 2023-02-03T04:07:38.525606 | 2020-12-18T20:23:55 | 2020-12-18T20:23:55 | 316,060,516 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 593 | sce | factorisationLU.sce | function [mat]=tridiagonale(A)
n=size(A,1);
for i=1:n
mat(i,i)=A(i,i);
end
for (i=2:n)
mat(i-1,i)=A(i-1,i);
mat(i,i-1)=A(i,i-1);
end
// facto
endfunction
function [L,U]=factorisation(mat)
//on fait appel a la fonction tridiagonale pour assurer que la matrice donnée est tridiagonale
[mat]=tridiagonale(A);
for k=1:n-1
i=k+1:n;
mat(i,k)=mat(i,k)/mat(k,k);
j=k+1:n;
mat(i,j)=mat(i,j)-mat(i,k)*mat(k,j)
end
//expression de U
U=triu(mat);
// expression de L
L=tril(mat)
L(1:n+1:$)=1;
endfunction
|
2d00bea0cb54ec48e1497f91ceacc1b7b45ef5d4 | b29e9715ab76b6f89609c32edd36f81a0dcf6a39 | /ketpicscifiles6/Mixmake.sci | 7f05a2ab9d63c6c6ca46d1eeb4c819ffc9fa177b | [] | no_license | ketpic/ketcindy-scilab-support | e1646488aa840f86c198818ea518c24a66b71f81 | 3df21192d25809ce980cd036a5ef9f97b53aa918 | refs/heads/master | 2021-05-11T11:40:49.725978 | 2018-01-16T14:02:21 | 2018-01-16T14:02:21 | 117,643,554 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 181 | sci | Mixmake.sci | // 08.05.19
// Structure changed
// 09.10.11
function PL=Mixmake(varargin)
PL=list();
for I=1:length(varargin)
Tmp=varargin(I);
PL=Mixadd(PL,Tmp);
end
endfunction
|
16b632e7b1cd6c9297fc681897580009bf607fcd | 449d555969bfd7befe906877abab098c6e63a0e8 | /2090/CH2/EX2.2/Chapter2_example2.sce | 254d00813e5edff163314afe14cf4f3b4ce74f76 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 763 | sce | Chapter2_example2.sce | clc
clear
//Input data
CV=42000;//The calorific value of the fuel in kJ/kg
pa=5//Percentage of compression
Pa=1.2;//Pressure in the cylinder at 5% compression stroke
pb=75//Percentage of compression
Pb=4.8;//Pressure in the cylinder at 75% compression stroke
g=1.3;//polytropic index
g1=1.4//Isentropic index
n=0.6;//Air standard efficiency
//Calculations
V=(Pb/Pa)^(1/1.3);//Ratio of volumes
r=(V*(pb/100)-(pa/100))/((1-(pa/100))-(V*(1-(pb/100))))//Compression ratio
n1=((1-(1/r)^(g1-1)))*100//Relative efficiency
nthj=n*(n1/100)//Indicated thermal efficiency
x=(1/(CV*nthj))*3600//Specific fuel consumption in kg/kW.h
//Output
printf('The compression ratio of the engine is %3.1f \n The specific fuel consumption is %3.3f kg/kW.h',r,x)
|
1ecb5e6b4bb9f0968438d1c54593c2be7422cae9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1484/CH1/EX1.27/1_27.sce | 507081e60fd0e224208a53d5ad08c5f7b704823b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 244 | sce | 1_27.sce | clc
//initialisation of variables
w= 62.4 //lbs/ft^3
h= 9 //ft
l= 10 //ft
//CALCULATIONS
P= w*h^2/2
h1= h/3
Ra= P/2
x= (w*4*h^2/9)/Ra
x1= x+(h/3)
hb= h1-x
W= Ra*l
//RESULTS
printf ('magnitude od total in each beam= %.f lbs ',W)
|
08de220e472b5dbf3c22066d9790fd5428c54b94 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2561/CH4/EX4.11/Ex4_11.sce | bad29f8509e83ffa39fbc337700979e5e41f27be | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,886 | sce | Ex4_11.sce | //Ex4_11 Refer fig 4.7(b)// ANS is not correct check &correct
clc
RF=6*10^(3)
disp("RF= "+string(RF)+ " ohm") // feedback resistance
VDD=(20)
disp("VDD= "+string(VDD)+" volts") // Drain voltage supply
disp("part(i) ")// part(i) of this question
VT=(2)
disp("VT= "+string(VT)+" volts") // Threshold voltage for EMOSFET
KF=0.25*10^(-3)
disp("KF= "+string(KF)+" A/V^2") // Constant for EMOSFET
ID=1*10^(-3)
disp("ID = "+string(ID)+" A") // drain current EMOSFET in Ampere
RL=[VDD-VT-sqrt(ID/KF)]/ID // Using formulae ID=KF*(VDD-ID*RL-VT)
disp("RL=[VDD-VT-sqrt(ID/KF)]/ID= "+string(RL)+ " ohm") //Load resistance
disp("part(ii) ")// part(ii) of this question
VT=(3)
disp("VT= "+string(VT)+" volts") // Threshold voltage for EMOSFET
KF=0.375*10^(-3)
disp("KF= "+string(KF)+" A/V^2") // Constant for EMOSFET
disp("Quadratic equation =(256)*ID^(2)-(546.67)*ID+289=0")//IDS=KF*(VGS-VT)^2 =KF*(VDS-VT)^2 and VDS=VDD-ID*RL,so Quadratic equation is:IDS=KF*(VDD-ID*RL-VT)^2 ,where ID in mA
p = [256 -546.66 289]
ID=roots(p)*10^(-3)//values of ID converted into Ampere by multiplying by 10^(-3)
disp("ID = "+string(ID)+" A") // drain current EMOSFET in Ampere
VDS=VDD-ID*RL// Drain voltage for ID = 1.173 mA and ID = 0.962 mA
disp("VDS =VDD-ID*RL = "+string(VDS)+" volts") // Drain voltage
IDQ=0.962*10^(-3)
disp("IDQ ="+string(IDQ)+" A")//Since VDS < VT for ID=1.173 mA, hence ID = 1.173 mA cannot be chosen, so we chose ID= 0.962 mA as operating drain current IDQ
Percentage_change=[(1-0.962)*100]/(1)
disp("Percentage change= "+string(Percentage_change)+" percent")// Percent change in IDQ value from 1 mA(part(i)) to its value ( of part(ii))IDQ=0.91mA
// NOTE: part(ii):the values of ID = 1.173 mA or ID = 0.962 mA but in book given as ID= 1.197 mA and ID = 0.939 mA .Hence (correct) Percentage_change in ID= 3.8 % but in book given as 6.1 %
|
68aa89b08d5fbed185533cf76f547f8ff1f300ce | 449d555969bfd7befe906877abab098c6e63a0e8 | /38/CH1/EX1.4b/4b.sce | 66b51985c0a72747795fdb6e9c6274405ba315ff | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 207 | sce | 4b.sce | // Caption: Finding Induced voltage of a magnetic circuit
close;
clc;
syms t
w=2*%pi*60//angular frequency
B=1.0*sin(w*t);
N=500;
A=9*10^-4;
e=N*A*diff(B,t);
disp(e,'Induced Voltage = ');
|
d3236bc0a5fdf63f9f5c6d6a2d39591e2ae5681f | 4c888070ef0e5ac657898d54a469c6587077d0f9 | /tests/ok/multi-path-10.tst | 695602c8d59081faa26bbcd5c8ee0ab480227a0e | [] | no_license | Vezyr68/Tests4lemin | 047babbbdd269de9841cfda1f0bd229e9761838f | 426cf85358a1879c039f06d2de595451126d746e | refs/heads/master | 2023-01-06T19:39:28.329496 | 2020-11-10T12:28:17 | 2020-11-10T12:28:17 | 310,910,849 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 365 | tst | multi-path-10.tst | 10
#rooms
##end
e 4 1
r11 1 1
r12 1 2
r13 1 3
r22 2 2
r23 2 3
r33 3 3
r14 1 4
r24 2 4
r34 3 4
r44 4 4
r54 5 4
r64 6 4
##start
s 0 0
#links
#from start
s-r11
s-r12
s-r13
s-r14
#from end
e-r33
e-r22
e-r11
e-r64
#internal links
r11-r12
r11-r22
r12-r13
r12-r22
r13-r23
r22-r23
r22-r33
r23-r33
#for N=10 this path havn't to work!
r14-r24
r24-r34
r34-r44
r44-r54
r54-r65
|
ed6af12cd7b282eeaaf98a9c160d7a212a015693 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2783/CH3/EX3.5/Ex3_5.sce | 5a526f1da84e2da82a0f28be93d3c89abc0f037f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 250 | sce | Ex3_5.sce | clc
//initialization of new variables
clear
W=275 //kg
rho_c=1.22 //kg/m^3
D=15 //m
g=9.8 //m/s^2
Tc=290 //K
//calculations
L=W*g
Tr=1-(6*L/(rho_c*g*%pi*D^3)) // Tc/Th
Th=Tc/Tr
//result
printf('The temperature required is % .1f K',Th)
|
1c475cbbb70346c335cc367a742c113de9acae99 | 449d555969bfd7befe906877abab098c6e63a0e8 | /215/CH15/EX15.9/ex15_9.sce | a3e04d87b1c51a7fb51d51219fa0fc51986140c0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 230 | sce | ex15_9.sce | clc
//Example 15.9
//Install Symbolic toolbox
//Find the inverse Laplace transform
syms s
s=%s
//Let a=1 and b=3
a=1;b=3;
V=1/((s+a)*(s+b))
Vp=pfss (V)
Vp1=ilaplace(Vp(1))
Vp2=ilaplace(Vp(2))
v=Vp1+Vp2
disp(v,'v(t)=') |
33ca01065838216f425890b7cfd7a8fee738d4bb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2318/CH1/EX1.7/ex_1_7.sce | 5041fd8310e90608373a71f6518d6911c8c795a5 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 332 | sce | ex_1_7.sce | //Example 1.7://limiting error
clc;
clear;
close;
fse=1;//full scale deflection
vr=150;//range in volts
ev=(fse/100)*vr;//voltas
v1=100;//volts
le100=((ev)/v1)*100;//in percentage
ve=100;//range in mA
ee=(fse/100)*ve;//mA
e1=55;//mA
le50=((ee/e1)*100);//in percentage
ler=le100+le50;//
disp(ler,"limiting error for power is, (%)=")
|
947dad0623e216e9593c19b98aaefedab7e90769 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2891/CH6/EX6.6/Ex6_6.sce | 924aad0b0879398ff7d732a2a230dedf4fa3726b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 490 | sce | Ex6_6.sce | //Exa 6.6
clc;
clear;
close;
// given :
f_MHz=172 // frequency in MHz
c=3*10^8 // speed of light in m/s
lambda=c/f_MHz // wavelength in m
La=478/f_MHz // length of driven element in feet
Lr=492/f_MHz // length of reflector in feet
Ld=461.5/f_MHz // length of director in feet
S=142/f_MHz // element spacing in feet
disp(La,"length of driven element in feet:")
disp(Lr,"length of reflector in feet:")
disp(Ld,"length of director in feet:")
disp(S,"element spacing in feet:")
|
f609989c2538168da26f07e011c2e0583c530a74 | 9cb37875b74a713c93c09fa50ccc70ac0f71ecdb | /Gesture/SAVE_SCENARIOS/PR2TwoCupsFacing.sce | f86081b941f2d87107a64eeef3595ed8127184f2 | [] | no_license | jmainpri/move3d-assets | a5b621daaedaaf8784fed0da1e80d029c83f3983 | 939db49d17a14e052bb58324b70e6112803d3105 | refs/heads/master | 2021-01-16T17:48:56.669119 | 2016-02-16T14:04:09 | 2016-02-16T14:04:09 | 20,237,987 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 6,053 | sce | PR2TwoCupsFacing.sce | #************************************************************
# Scenario of humanTestEnv
#
# date : Wed Mar 6 17:44:03 2013
#************************************************************
p3d_sel_desc_name P3D_ENV humanTestEnv
p3d_sel_desc_name P3D_ROBOT HERAKLES_HUMAN1
p3d_set_robot_steering_method Linear
p3d_set_robot_current 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.014000 -1.354000 0.809730 0.000000 0.000000 93.959349 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 84.132000 -13.500000 -1.296000 0.069068 19.616929 0.000000 0.000000 0.000000 0.000000 -76.896000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
p3d_set_robot_goto 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
p3d_sel_desc_name P3D_ROBOT PR2_ROBOT
p3d_set_robot_steering_method Multi-Localpath
p3d_set_robot_radius 1.000000
p3d_set_robot_current 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.058000 -0.110000 0.000000 0.000000 0.000000 -100.836000 0.310000 0.000000 0.000000 0.000000 -67.566000 68.681000 -7.876000 -133.000000 -175.378382 -60.040104 104.621599 0.000000 0.000000 -4.966000 79.626000 83.104000 -54.144000 82.692000 -62.511000 179.153866 0.000000 0.000000 0.000000 0.000000 0.000000 -0.650535 -0.204575 1.040293 74.988150 23.394585 -178.000409 -0.116916 -0.092738 0.480933 137.246776 -49.852550 -118.849496
p3d_set_robot_goto 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.058000 -0.110000 0.000000 0.000000 0.000000 -100.836000 0.310000 0.000000 0.000000 0.000000 -3.961000 -1.246000 -125.153000 -92.714000 180.000000 -34.569000 -96.336000 0.000000 0.000000 -4.966000 79.626000 83.104000 -54.144000 82.692000 -62.511000 179.153866 0.000000 0.000000 0.000000 0.000000 0.000000 0.107522 -0.709624 0.849858 3.779789 38.871127 -46.698229 -0.116916 -0.111738 0.480933 137.246776 -49.852550 -118.849496
p3d_set_robot_config Config__1 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.058000 -0.110000 0.000000 0.000000 0.000000 -100.836000 0.310000 0.000000 0.000000 0.000000 -29.623000 21.722000 -81.014000 -32.146000 -29.808000 -54.776000 -22.644000 0.000000 0.000000 -4.966000 79.626000 83.104000 -54.144000 82.692000 -62.511000 179.153866 0.000000 0.000000 0.000000 0.000000 0.000000 -0.334613 -0.806522 0.837364 -110.136867 34.183515 28.759198 -0.116916 -0.092738 0.480933 137.246776 -49.852550 -118.849496
p3d_set_robot_config Config__2 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.058000 -0.110000 0.000000 0.000000 0.000000 -100.836000 0.310000 0.000000 0.000000 0.000000 -3.961000 -1.246000 -125.153000 -92.714000 180.000000 -34.569000 -96.336000 0.000000 0.000000 -4.966000 79.626000 83.104000 -54.144000 82.692000 -62.511000 179.153866 0.000000 0.000000 0.000000 0.000000 0.000000 0.107522 -0.709624 0.849858 3.779789 38.871127 -46.698229 -0.116916 -0.111738 0.480933 137.246776 -49.852550 -118.849496
p3d_constraint p3d_lin_rel_dofs 1 15 1 14 2 1.000000 0.000000 0
p3d_constraint p3d_lin_rel_dofs 1 25 1 24 2 1.000000 0.000000 0
p3d_constraint p3d_pr2_arm_ik 7 6 7 9 10 11 12 13 1 32 0 1 8
p3d_set_cntrt_Tatt 2 1.000000 0.000000 0.000000 -0.180000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000
p3d_set_cntrt_Tatt2 2 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 0.000000 0.000000 -0.180000
p3d_constraint p3d_pr2_arm_ik 7 16 17 19 20 21 22 23 1 33 0 1 18
p3d_set_cntrt_Tatt 3 1.000000 0.000000 0.000000 -0.180000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000
p3d_set_cntrt_Tatt2 3 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 1.000000 0.000000 0.000000 -0.180000
p3d_constraint p3d_fix_jnts_relpos 1 32 1 13 0 0
p3d_set_cntrt_Tatt 4 1.000000 0.000000 0.000000 0.180000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000
p3d_constraint p3d_fix_jnts_relpos 1 33 1 23 0 0
p3d_set_cntrt_Tatt 5 1.000000 0.000000 0.000000 0.180000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000
p3d_set_object_base_and_arm_constraints 32 1 0 2 2 3
p3d_set_arm_data 2 3 32
p3d_set_arm_data 3 3 33
p3d_sel_desc_name P3D_ROBOT TABLE
p3d_set_robot_steering_method Linear
p3d_set_robot_current 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.004000 -0.720000 0.000000 0.000000 0.000000 -90.000000
p3d_set_robot_goto 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
p3d_sel_desc_name P3D_ROBOT Cup1
p3d_set_robot_steering_method Linear
p3d_set_robot_current 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.165000 -0.781000 0.725000 0.000000 0.000000 43.056000
p3d_set_robot_goto 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
p3d_sel_desc_name P3D_ROBOT Cup2
p3d_set_robot_steering_method Linear
p3d_set_robot_current 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.304000 -0.696000 0.730000 0.000000 0.000000 -15.840000
p3d_set_robot_goto 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
p3d_set_camera_pos -0.319258 -0.641405 0.781993 2.042140 5.979435 0.852500 0.000000 0.000000 1.000000 0.000000
|
7c7243c7f0c771528df0e0435306802b84d9c528 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3745/CH1/EX1.10/Ex1_10.sce | 416fdfe6f93297f63875180a98b20fae321812c1 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 415 | sce | Ex1_10.sce | // Ex 10 Page 350
clc;clear;close;
// Given
V=400;//V
f=50;//Hz
n=3;//no of phase
R=100;//ohm
//Star connection
Vph=V/sqrt(n);//V
Iph=Vph/R;//A
IL=Iph;//A
cos_fi=1;// for only resitor load
P=sqrt(3)*V*IL*cos_fi/1000;//kW
printf("Star Connection : P=%.1f kW",P)
//Delta Connection
Vph=V;//V
Iph=Vph/R;//A
IL=sqrt(3)*Iph;//A
VL=Vph;//V
P=sqrt(3)*VL*IL*cos_fi/1000;//kW
printf("\n Delta Connection : P=%.1f kW",P)
|
8cce525df3ff2f4d18abdec38e4b36b6f9ca4485 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set7/s_Electronic_Measurements_And_Instrumentation_P._Sharma_876.zip/Electronic_Measurements_And_Instrumentation_P._Sharma_876/CH5/EX5.11/Ex5_11.sce | 501515254d5e5bfa53dadbaa1770442af8a66441 | [] | no_license | hohiroki/Scilab_TBC | cb11e171e47a6cf15dad6594726c14443b23d512 | 98e421ab71b2e8be0c70d67cca3ecb53eeef1df6 | refs/heads/master | 2021-01-18T02:07:29.200029 | 2016-04-29T07:01:39 | 2016-04-29T07:01:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 553 | sce | Ex5_11.sce | errcatch(-1,"stop");mode(2);//caption:Find (a)value of R1 and R2(b)change in value of R2(c)half scale deflection
//Ex5.11
Ifsd=0.001//current(in A)
Rm=100//internal resistance(in ohm)
E=9//battery voltage(in V)
Rh=5000//half scale deflection(in ohm)
R1=Rh-((Ifsd*Rm*Rh)/E)
disp(R1,'(a)value of R1(in ohm)=')
R2=(Ifsd*Rm*Rh)/(E-Ifsd*Rh)
disp(R2,'(a)value of R2(in ohm)=')
Eo=E-0.9
Ro=(Ifsd*Rm*Rh)/(Eo-Ifsd*Rh)
disp(Ro,'(b)change in value of R2(in ohm)=')
Rh2=R1+((Ro*Rm)/(Ro+Rm))
disp(Rh2,'(c)half scale deflection(in ohm)=')
exit();
|
2623e6982d59564ee9ec1eca478c38fcaf400dd1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2438/CH3/EX3.18/Ex3_18.sce | 45a1ff8ce181cfe111f54f7269e8b030b46486cb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 766 | sce | Ex3_18.sce | //==============================================================================================================
// chapter 3 example 18
clc;
clear;
//input data
A = 6*10^-4; //area in m^2
l = 0.5; //length in m
u = 65*10^-4; //permiability in H/m
phi = 4*10^-5; // magnetic flux in Wb
//calculation
B = phi/A;
H = B/u;
N = H*l;
//result
mprintf('number of turns =%1f\n',N);
mprintf(' Note: calculation mistake in textbook in calculattig H by taking B value as 0.06 instead of 0.0666');
//=====================================================================================================================
|
9fcd06f01ff12fbb341ab88fbb8f7101545fbd8b | 449d555969bfd7befe906877abab098c6e63a0e8 | /965/CH7/EX7.16/16.sci | c7b95a2fbdd852dbcd4a81f197fd74ffe6a98a24 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 599 | sci | 16.sci | clc;
clear all;
disp("Rate of cooling")
A=1;//m^2
T=20;// degree C
Ts=90;// degree C
U=2;//m/s velocity of air
rhog=2500;// kg/m^3 density of glass
mu=19.8*10^(-6);// N.s/m^2 viscosity
L=1;//m length
k=0.0286;//W/m.C
cpa=1008;//J/kg.K
rhoa=1.076;// kg/m^3 density of air
Re=rhoa*U*L/mu;
Pr=mu*cpa/k;
Nu=0.664*Re^0.5*Pr^(1/3);
h=Nu*k/L;
disp("W/m^2.C",h,"Heat transfer coefficient =")
Q=2*h*A*(Ts-T);
disp("W",Q,"Heat transfer rate =")
t=3/1000;// thickness
m=rhog*A*t;// mass of glass
cp=670;//J/kg.K
delT=Q/(m*cp);
disp("degree C/s",delT,"Initial heating rate =")
|
51bd4eb049072fef2f020e1129b5329d79e7ab1a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3754/CH3/EX3.8/3_8.sce | 061bad0e0244b95b90e1d7daaab7c6d03f9a92da | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 444 | sce | 3_8.sce | clear//
//Variables
l = 120 //length of wire (in meter)
d = 0.25 * 10**-2 //Diameter of cross section (in meter)
p = 1.7 * 10**-8 //Resistivity (in ohm-meter)
//Calculation
r = d/2 //Radius of cross section (in meter)
A = %pi *r*r //Area of cross section (in metersquare)
R = p*l/A //Resistance (in ohm)
//Result
printf("\n Resistance of the wire is %0.3f ohm.",R)
|
3afdc5fc97efcc7ae037acd67f3f8af3189583a1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /213/CH16/EX16.7/16_7.sce | 9c07dad33e8b1bb81e3637d9767482f3040d5aaf | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,451 | sce | 16_7.sce | //To find coefficient of fluctuation
clc
//Given:
N=100 //rpm
k=1.75 //m
//Solution:
//Refer Fig. 16.9
//Calculating the angular speed of the crank
omega=2*%pi*N/60 //rad/s
//Calculating the coefficient of fluctuation of speed
CS=1.5/100
//Coefficient of fluctuation of energy:
AB=2000, LM=1500 //N-m
//Calculating the work done per cycle
WD=(1/2*%pi*AB)+(1/2*%pi*LM) //Work done per cycle, N-m
//Calculating the mean resisting torque
Tmean=WD/(2*%pi) //N-m
//Calculating the value of CD
CD=%pi/2000*(2000-875) //rad
//Calculating the maximum fluctuation of energy
deltaE=1/2*CD*(2000-875) //N-m
//Calculating the coefficient of fluctuation of energy
Ce=deltaE/WD*100 //%
//Calculating the mass of the flywheel
m=deltaE/(k^2*omega^2*CS) //kg
//Crank angles for minimum and maximum speeds:
//Calculating the value of CE
CE=(2000-875)/2000*(4*%pi/9) //rad
//Calculating the crank angle for minimum speed
thetaC=((4*%pi/9)-CE)*180/%pi //degrees
//Calculating the value of ED
ED=(2000-875)/2000*(%pi-(4*%pi/9)) //rad
//Calculating the crank angle for maximum speed
thetaD=((4*%pi/9)+ED)*180/%pi //degrees
//Results:
printf("\n\n Coefficient of fluctuation of energy, CE = %d %c.\n\n",Ce,"%")
printf(" Mass of the flywheel, m = %.1f kg.\n\n",m)
printf(" Crank angle from IDC for the minimum speed, thetaC = %d degrees.\n\n",thetaC)
printf(" Crank angle from IDC for the maximum speed, thetaD = %d degrees.\n\n",thetaD) |
e83c1198690e34dd0425e1e9a799956de32fdcaa | 449d555969bfd7befe906877abab098c6e63a0e8 | /293/CH11/EX11.2/eg11_2.sce | 215862003a8c8378c41f7342d4b7de6f5244bffa | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 279 | sce | eg11_2.sce | //a
N8 = '432'; //octal number
N = oct2dec(N8); //decimal representation of N8
disp("a")
disp(N,"decimal equivalent of 432 = ")
//b
N16 = 'C4F'; //hexadecimal number
N = hex2dec(N16); //decimal representation of N16
disp("b")
disp(N,"decimal equivalent of C4F = ")
|
424c762d9783fcc447bf32b105234ba0fc22c945 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1898/CH9/EX9.1/Ex9_1.sce | f76c3b2ecfa08be7f9ce63de2ca256baebd3563e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,153 | sce | Ex9_1.sce |
clear all; clc;
disp("Scilab Code Ex 9.1 : ")
//Given:
tou = 25; //MPa
sigma1 = 50; //MPa
sigma2 = 80; //MPa
phi = 30*(%pi/180);
// Calculations:
sigma_x1 = (sigma1*cos(phi)*cos(phi))- (tou*cos(phi)*sin(phi)) - (sigma2*sin(phi)*sin(phi))- (tou*sin(phi)*cos(phi));
tou1 = (sigma1*cos(phi)*sin(phi))+ (tou*cos(phi)*cos(phi)) + (sigma2*sin(phi)*cos(phi))- (tou*sin(phi)*sin(phi));
sigma_x2 = (tou*cos(phi)*sin(phi))- (sigma2*cos(phi)*cos(phi)) + (tou*sin(phi)*cos(phi))+ (sigma1*sin(phi)*sin(phi));
tou2 = (tou*cos(phi)*cos(phi))+ (sigma2*cos(phi)*sin(phi)) - (tou*sin(phi)*sin(phi))+ (sigma1*sin(phi)*cos(phi));
//Display:
printf("\n\nThe normal stress component in the x diection is = %1.2f MPa',sigma_x1);
printf("\n The shear stress component in the x diection is = %1.1f MPa',tou1);
printf("\n The normal stress component in the y diection is = %1.1f MPa',sigma_x2);
printf("\n The shear stress component in the y diection is = %1.1f MPa',tou2);
//----------------------------------------------------------------------END--------------------------------------------------------------------------------
|
043066ce42706435c05f989ea48422b540041b10 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3428/CH22/EX14.22.1/Ex14_22_1.sce | 74de685f0d4e08ca5ead260fd46c9df8d357c94f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 596 | sce | Ex14_22_1.sce | //Section-14,Example-1,Page no.-PC.48
//To calculate the surface tension of ethyl alcohol and the no. of times a water drop is heavier than a drop of ethyl alcohol.
clc;
y_r=7.2*10^-2 //N/m
n_r=30
n_e=30
d_e=0.865*10^3 //g/cm^3
d_r=0.996*10^3 //g/cm^3
y_e=(((y_r)*(n_r)*(d_e))/((n_r)*(d_r))) //N/m
disp(y_e,'Surface tension of ethyl alcohol(N/m)')
//m=m_r/m_e=y_r/y_e
m=(y_r/y_e)
disp(m,'No.of times a water drop is heavier than a drop of the ethyl alcohol')
//y_e=3.75*10^-2,(m_r/m_e)=1.92, is wrong in the book.
|
1f523d6f089efd3d34c9ea39b040219e228da7f2 | af7cd799acb90ee773382c3b1b8630e092971cd8 | /TP3_exo6/jaccobi.sce | 2197e80f235eb78a44f714d0940366fe23d58ca5 | [] | no_license | Souad742/my-repo | 1e080b1a593aa1f8f24edd2ed4a766680344510f | 3c0df0e0cf230cbd6160d8e9a08ca7b51bdbf324 | refs/heads/main | 2023-02-03T05:06:47.269245 | 2020-12-18T23:32:27 | 2020-12-18T23:32:27 | 305,127,993 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 956 | sce | jaccobi.sce | function[sol,niter,info]= myjacobi(A,b,nmaxit,tol)
//vérification si aucun terme de la diagonal de A n'est nulle
if ~and(diag(A)) then
error('erreur:diagonale est nulle')
end
//décomposition de A: A=D-E-F
D=diag(diag(A))
E=-triu(A)+D
F=-tril(A)+D
x=inv(A)*b
sol=b
niter=0
info=0
err=[]
for k=1:nmaxit
sol =(eye(n,n)-inv(D)*A)*sol+inv(D)*b
err=[err,norm(x-sol)];
if max(abs(A*sol-b))< tol
info = 1;
niter= k;
break
end
end
xtitle('le graphe de convergence pour la méthode de jacobi')
plot(1:niter,log(err),xtitle)
endfunction
n=3
A=[2 -1 0;-1 2 -1;0 -1 2]
b=[1; 2; 3]
[sol,niter,info]= myjacobi(A,b,100,0.01)
x=inv(A)*b
b=A*x;
x=inv(A)*b
M=eye(n,n)-(inv(diag(diag(A)))*A);
R_spectral=max(abs(spec(M)));
disp(R_spectral)
|
8fd784cdce4cfc2922bee05fbbf795659b72ebeb | 449d555969bfd7befe906877abab098c6e63a0e8 | /2102/CH6/EX6.20/exa_6_20.sce | 9aca639583287217f21d71bbaa238f423fee867c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 835 | sce | exa_6_20.sce | // Exa 6.20
clc;
clear;
close;
// Given data
I_DSS= 6;// in mA
I_DSS= I_DSS*10^-3;// in A
V_P= -4.5;// in V
// Part (i)
// At V_GS= -2V
V_GS= -2;// in V
I_DS= I_DSS*(1-V_GS/V_P)^2;// in A
disp(I_DS*10^3,"At V_GS= -2V, the value of I_DS in mA is : ")
// At V_GS= -3.6V
V_GS= -3.6;// in V
I_DS= I_DSS*(1-V_GS/V_P)^2;// in A
disp(I_DS*10^3,"At V_GS= -3.6V, the value of I_DS in mA is : ")
// Part (ii)
// At I_DS= 3mA
I_DS= 3*10^-3;// in A
V_GS= V_P*(1-sqrt(I_DS/I_DSS));
disp(V_GS,"At I_DS= 3mA, the value of V_GS in volts is :")
// At I_DS= 5.5mA
I_DS= 5.5*10^-3;// in A
V_GS= V_P*(1-sqrt(I_DS/I_DSS));
disp(V_GS,"At I_DS= 5.5mA, the value of V_GS in volts is :")
// Note: There is calculation error in the second part to find the value of V_GS in both the condition . So the answer in the book is wrong
|
77b8f34efcde4ffd7a9598759ddd9fab75d919c6 | 6613f2185ff14cbcc91627ae4073f1e3a69aae60 | /logc.tst | be920c984e26b004a659a41647c1bfdcb246a566 | [] | no_license | akylKerimbekov/oracle_pl_sql_programming | cdd28df7a98a2331038f5835970e2fbe4e943006 | 573969a17a9ac15751aca2406021424ec3f54c4c | refs/heads/master | 2020-04-29T11:09:23.540999 | 2014-10-10T18:18:58 | 2014-10-10T18:18:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 980 | tst | logc.tst | /* Demonstrates nesting of auton transactions. */
DROP table emp2;
CREATE TABLE emp2 as select * from emp;
CREATE OR REPLACE PROCEDURE test_auton
IS
PROCEDURE auton
IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
DELETE
FROM emp2;
DBMS_OUTPUT.PUT_LINE ('emp2 ' || tabcount ('emp2'));
log81.saveline (0, 'Deleted all from emp2');
ROLLBACK;
END;
BEGIN
DBMS_OUTPUT.PUT_LINE ('emp2 ' || tabcount ('emp2'));
DBMS_OUTPUT.PUT_LINE ('log81tab ' || tabcount ('log81tab'));
auton;
DBMS_OUTPUT.PUT_LINE ('emp2 ' || tabcount ('emp2'));
DBMS_OUTPUT.PUT_LINE ('log81tab ' || tabcount ('log81tab'));
END;
/
/*======================================================================
| Supplement to the fifth edition of Oracle PL/SQL Programming by Steven
| Feuerstein with Bill Pribyl, Copyright (c) 1997-2009 O'Reilly Media, Inc.
| To submit corrections or find more code samples visit
| http://oreilly.com/catalog/9780596514464/
*/ |
29771e552b108beb14c74fee24d69144abf96d1b | 8e5600d8c3c3db3bfeaef408e3b311eab409974a | /src/ItemTemplates/Empty/Template.tst | f1840b6f8a08eb9ed5bbd8ece97e6c59623e4d23 | [
"Apache-2.0"
] | permissive | avilv/TypewriterX | 8496d49294c03f80524502a008d9ca1233a4eb39 | 249f072adfbd27730d87810d2a355f8f0e81823d | refs/heads/master | 2020-04-11T13:16:01.913008 | 2019-01-04T13:05:20 | 2019-01-04T13:05:20 | 161,809,956 | 3 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 1,182 | tst | Template.tst | ${
// Enable extension methods by adding using Typewriter.Extensions.*
using Typewriter.Extensions.Types;
// Uncomment the constructor to change template settings.
//Template(Settings settings)
//{
// settings.IncludeProject("Project.Name");
// settings.OutputExtension = ".tsx";
//}
// Custom extension methods can be used in the template by adding a $ prefix e.g. $LoudName
string LoudName(Property property)
{
return property.Name.ToUpperInvariant();
}
}
module $rootnamespace$ {
// $Classes/Enums/Interfaces(filter)[template][separator]
// filter (optional): Matches the name or full name of the current item. * = match any, wrap in [] to match attributes or prefix with : to match interfaces or base classes.
// template: The template to repeat for each matched item
// separator (optional): A separator template that is placed between all templates e.g. $Properties[public $name: $Type][, ]
// More info: http://avilv.github.io/TypewriterX/
$Classes(*Model)[
export class $Name {
$Properties[
// $LoudName
public $name: $Type = $Type[$Default];]
}]
} |
a9d135006d9be957afc2a04661dd2763bb613bd0 | 3c47dba28e5d43bda9b77dca3b741855c25d4802 | /microdaq/examples/led_script_demo.sce | 56d8746e29cd90719db1ac5c436a59d591b575be | [
"BSD-3-Clause"
] | permissive | microdaq/Scilab | 78dd3b4a891e39ec20ebc4e9b77572fd12c90947 | ce0baa6e6a1b56347c2fda5583fb1ccdb120afaf | refs/heads/master | 2021-09-29T11:55:21.963637 | 2019-10-18T09:47:29 | 2019-10-18T09:47:29 | 35,049,912 | 6 | 3 | BSD-3-Clause | 2019-10-18T09:47:30 | 2015-05-04T17:48:48 | Scilab | UTF-8 | Scilab | false | false | 230 | sce | led_script_demo.sce | // Switch LED1/LED2 on/off every 0.5 sec
LEDState1 = %F;
for i=1:10
mdaqLEDWrite(1, LEDState1);
mdaqLEDWrite(2, ~LEDState1);
LEDState1 = ~LEDState1;
sleep(500);
end
mdaqLEDWrite(1, %F);
mdaqLEDWrite(2, %F);
|
3a86961885f3674ecb315398ee89eccd0e55e323 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2342/CH6/EX6.10/EX6_10.sce | ae3a4dc1e8b9808702c04ece3b48be51213e175b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 545 | sce | EX6_10.sce | // Exa 6.10
format('v',6)
clc;
clear;
close;
// Given data
Beta= 100;
V_CC= 12;// in V
V_BE= 0;// in V
I_B= 0.3*10^-3;// in A
R_C= 300;// in Ω
// Applying KVL for input side, V_CC= I_B*R_B+V_BE or
R_B= (V_CC-V_BE)/I_B;// in Ω
R_B= R_B*10^-3;// in k ohm
disp(R_B,"The value of base resistor in kΩ is : ")
I_C= Beta*I_B;// in A
// The collector to emitter voltage
V_CE= V_CC-I_C*R_C;// in V
disp(V_CE,"The collector to emitter voltage in V is : ")
// The stability factor,
S= 1+Beta;
disp(S,"The stability factor is : ")
|
260c9c913e8ab4e8fb05d48047633c99535bd131 | a88bc351c907b9f0e662e251314c78a075880265 | /Scilab/Lagrange.sce | e87c67351cc20487bfdec047e5b44376c0b2a2e1 | [] | no_license | decospdl/Exercise | 2ff1161f101a892ac511c62e1dce67a07606107a | 14d61a9553aab9af259edc8af504fdaa8568ec8f | refs/heads/master | 2020-05-26T15:22:22.243902 | 2019-06-13T22:55:10 | 2019-06-13T22:55:10 | 188,279,547 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 821 | sce | Lagrange.sce | clc
clear
xs = [0 0.2 0.4 0.5]
ys = [0 2.008 4.064 5.125]
row = size(xs,'c')
function [P] = P(x)
P = ys(1) * L(1,x) + ys(2) * L(2,x) + ys(3) * L(3,x) + ys(4) * L(4,x)
endfunction
function Polinomial(k)
x = poly(0,'x')
cima = 1
baixo = 1
for i = 1 : row
if i <> k then
cima = (x - xs(i)) * cima
baixo = (xs(k) - xs(i)) * baixo
end
end
printf("L%d Polinomial ",k)
disp(baixo,cima)
endfunction
function [L] = L(k,x)
cima = 1
baixo = 1
for i = 1 : row
if i <> k then
cima = (x - xs(i)) * cima
baixo = (xs(k) - xs(i)) * baixo
end
end
printf("L%d ",k)
printf("L%d = %.4f / %.4f \n", k, cima, baixo)
L = cima/baixo
endfunction
Polinomial(1)
Polinomial(2)
Polinomial(3)
Polinomial(4)
|
17c91af1c3b005c7823803a9b66f36d450ba72c2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3834/CH14/EX14.1.2/Ex14_1_2.sce | 88f74079a4683c810490fdfaffaebcc451a589fb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 646 | sce | Ex14_1_2.sce | //Fiber Optics Communication Technology, by Djafer K. Mynbaev and Lovell L.scheiner
//Windows 8
//Scilab version- 6.0.0
//Example 14.1.2
clc;
clear ;
//given
lambda=1310;//operating wavelength in nm
Transport_line=36;//Length of transport line in km
Power_budget=10;//linked power budget in dB
Loss_singlemode_fiber=0.6;//loss of SM fiber in dB/km
Linkloss=Loss_singlemode_fiber*Transport_line;//total link loss in dB
mprintf("Link loss = %.1f dB\n ",Linkloss);
if (Power_budget < Linkloss) then
mprintf("Hence, we need to use an in-line amplifier");
else
mprintf("Hence, we need not use an in-line amplifier");
end
|
ff6f9a5c14d1f6671275720242bbd82b1db130ee | 449d555969bfd7befe906877abab098c6e63a0e8 | /281/CH12/EX12.4/example12_4.sce | 54de3ae47cc157f5b49739115d667c2a7b587436 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,007 | sce | example12_4.sce | disp('chapter 12 ex12.4')
disp('given')
disp("output =10V to 15V")
Vomax=15
disp("max load current=4000mA")
Il=.4
disp("Vsmin=Vomax+3 V")
Vsmin=Vomax+3
disp('volts',Vsmin)
disp("allowing Vrs=3V(p to p)")
Vrs=3
disp("Vs=Vsmin+Vrs/2")
Vs=Vsmin+Vrs/2
disp('volts',Vs)
disp("ZENER CIRCUIT")
disp("let Vz=Vo/2")
Vz=Vomax/2
disp('volts',Vz)
disp("Iz=20mA")
Iz=.02
disp("R1=(Vo-Vz)/Iz")
R1=(Vomax-Vz)/Iz
disp('ohms',R1)
disp("R1=330 ohm std value")
R1=390
disp("POTENTIAL DIVIDER")
disp("let I2>>Ibmax I2=50uA Vomin=10")
I2=50*10^(-6)
Vomin=10
disp("R2=(Vomin-Vz)/I2")
Vz=7.5
R2=(Vomin-Vz)/I2
disp('ohms',R2)
disp("R2=47kohm std value")
R2=47000
disp("I2=(Vomin-Vz)/R2")
I2=(Vomin-Vz)/R2
disp('amperes',I2)
disp("R34=R3+R4=Vz/Iz")
R34=Vz/I2
disp('ohms',R34)
disp("when Vo is at its max,moving contact is at bottom of R4")
disp("I2=Vomax/(R2+R34)")
I2=Vomax/(R2+R34)
disp('amperes',I2)
disp("R3=Vz/Iz")
R3=Vz/I2
disp('ohms',R3)
disp("use 100 k ohm std value")
R3=100000
disp("R4=(R3+R4)-R3")
R4=R34-R3
disp('ohms',R4)
disp("use 50 k ohm std value")
disp("CAPACITOR")
disp("select C1=100uF")
C1=100*10^(-6)
disp("Q1 specification")
disp("Vcemax=Vsmax=Vs+Vrs/2")
Vcemax=Vs+Vrs/2
disp('volts',Vcemax)
Ie=Il
disp("P=Vce*Il=(Vs-Vomin)*Il")
P=(Vs-Vomin)*Il
disp('watts',P)
disp("A 2N3055 is a suitable device")
disp("Q2 specification")
disp("Vcemax=Vsmax=Vs+Vrs/2")
Vcemax=Vs+Vrs/2
disp('volts',Vcemax)
disp("Ie=Il/hFE1 ,hFE1=20 for Q1")
hFE1=20
Ie=Il/hFE1
disp('amperes',Ie)
disp("P=Vce*Il=(Vs-Vomin)*Il")
P=(Vs-Vomin)*Il
disp('watts',P)
disp("A 2N3904 is a suitable device")
disp("R5 Calculation")
disp("let Ie2min=0.5mA,Vbe1=0.7")
Ie2min=0.5*10^(-3)
Vbe1=0.7
disp("R5=(Vomin+Vbe1)/Ie2min")
R5=(Vomin+Vbe1)/Ie2min
disp('ohms',R5)
disp("R5=18kohm std value")
disp("OPERATIONAL AMPLIFIER")
disp("because I2 is sselected for bipolar opamp either a bipolar or BIFEt opamp can be used")
disp("supply voltage Vs=19.5V")
Vs=19.5
disp("Input supply voltage range=Vs/2-Vz")
ipvoltage=(Vs/2)-Vz
disp('volts',ipvoltage) |
f3bcfba5bf03f5bb389f7b8452f30f9a91552177 | 3c47dba28e5d43bda9b77dca3b741855c25d4802 | /microdaq/macros/microdaq_blocks/mdaq_led.sci | f97fc874833630e1c0658706c928d73788934efe | [
"BSD-3-Clause"
] | permissive | microdaq/Scilab | 78dd3b4a891e39ec20ebc4e9b77572fd12c90947 | ce0baa6e6a1b56347c2fda5583fb1ccdb120afaf | refs/heads/master | 2021-09-29T11:55:21.963637 | 2019-10-18T09:47:29 | 2019-10-18T09:47:29 | 35,049,912 | 6 | 3 | BSD-3-Clause | 2019-10-18T09:47:30 | 2015-05-04T17:48:48 | Scilab | UTF-8 | Scilab | false | false | 2,358 | sci | mdaq_led.sci | function [x,y,typ] = mdaq_led(job,arg1,arg2)
led_desc = ["This block sets MicroDAQ LED state.";
"";
"LED number: 1 or 2";
"";
"Set block parameters:"];
x=[];y=[];typ=[];
select job
case 'set' then
x=arg1
model=arg1.model;
graphics=arg1.graphics;
exprs=graphics.exprs;
while %t do
try
getversion('scilab');
[ok,led_num,exprs]=..
scicos_getvalue(led_desc,..
['Led:'],..
list('vec',-1),exprs)
catch
[ok,led_num,exprs]=..
scicos_getvalue('Enter LED block parameters',..
['Led:'],..
list('vec',-1),exprs)
end;
err_message = [];
if ~ok then
break
end
if led_num > 2 | led_num < 1 then
err_message=[err_message ;gettext("Wrong LED selected - use 1 or 2!")];
ok=%f;
end
if exists('inport') then in=ones(1,1), out=[], else in=1, out=[], end
[model,graphics,ok]=check_io(model,graphics,in,out,1,[])
if ok then
graphics.exprs=exprs;
model.rpar=[]
model.ipar=[led_num];
model.dstate=[];
x.graphics=graphics;
x.model=model
x.graphics.style=["mdaq_led;blockWithLabel;verticalLabelPosition=center;displayedLabel=D%s;fontColor=#616161"]
break
else
message(err_message);
end
end
case 'define' then
led_num=1
model=scicos_model()
model.sim=list('mdaq_led_sim',5)
if exists('inport') then model.in=ones(1,1), model.out=[], else model.in=1, model.out=[], end
model.evtin=1
model.ipar=[led_num];
model.dstate=[];
model.blocktype='d'
model.dep_ut=[%t %f]
exprs=[sci2exp(led_num)]
gr_i=['xstringb(orig(1),orig(2),[''D'';led_num],sz(1),sz(2),''fill'');']
x=standard_define([4 3],model,exprs,gr_i)
x.graphics.in_implicit=[];
x.graphics.style=["blockWithLabel;verticalLabelPosition=center;displayedLabel=D%s;fontColor=#616161"]
x.graphics.exprs=[string(led_num)];
end
endfunction
|
a534b3d1914b9e1e4884751c39fc4bfe1ff956ca | 1db0a7f58e484c067efa384b541cecee64d190ab | /macros/sigmoid_train.sci | 534a370a9df593b5de76a9644d45e2bb4f31b65d | [] | no_license | sonusharma55/Signal-Toolbox | 3eff678d177633ee8aadca7fb9782b8bd7c2f1ce | 89bfeffefc89137fe3c266d3a3e746a749bbc1e9 | refs/heads/master | 2020-03-22T21:37:22.593805 | 2018-07-12T12:35:54 | 2018-07-12T12:35:54 | 140,701,211 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,311 | sci | sigmoid_train.sci | <<<<<<< HEAD
function y = sigmoid_train(t, ranges, rc)
// Evaluate a train of sigmoid functions at T.
//Calling Sequence
//y = sigmoid_train(t, ranges, rc)
//Parameters
//t: integer
//ranges: matrix
//rc:timeconstant
//Description
//The number and duration of each sigmoid is determined from RANGES. Each row of RANGES represents a real interval, e.g. if sigmoid 'i' starts at 't=0.1' and ends at 't=0.5', then 'RANGES(i,:) = [0.1 0.5]'. The input RC is an array that defines the rising and falling time constants of each sigmoid. Its size must equal the size of RANGES.
//Examples
//sigmoid_train(0.1,[1:3],4)
//Output :
// ans =
//
// 0.2737470
funcprot(0);
//**************************************************************************************************
//______________________________________________version1 code (not working)_________________________
//__________________________________________________________________________________________________
//**************************************************************************************************
//rhs=argn(2);
//if (rhs<3 | rhs>3) then
// error("Wrong number of input arguments");
//end
//
//select(rhs)
//case 3 then
// y=callOctave("sigmoid_train", t, ranges, rc)
//end
//**************************************************************************************************
//______________________________________________version2 code ( working)____________________________
//__________________________________________________________________________________________________
//**************************************************************************************************
nRanges = size (ranges, 1);
if isscalar (rc)
rc = rc * ones (nRanges,2);
elseif or( size(rc) ~= [1 1])
if length(rc) ~= nRanges
error('signalError','Length of time constant must equal number of ranges.')
end
if isrow (rc)
rc = rc';
end
rc = repmat (rc,1,2);
end
flag_transposed = %F;
if iscolumn (t)
t = t.';
flag_transposed = %T;
end
[ncol nrow] = size (t);
T = repmat (t, nRanges, 1);
RC1 = repmat (rc(:,1), 1, nrow);
RC2 = repmat (rc(:,2), 1, nrow);
a_up = (repmat (ranges(:,1), 1 ,nrow) - T)./RC1;
a_dw = (repmat (ranges(:,2), 1 ,nrow) - T)./RC2;
Y = 1 ./ ( 1 + exp (a_up) ) .* (1 - 1 ./ ( 1 + exp (a_dw) ) )
y = max(Y,'r');
if flag_transposed
y = y.';
end
=======
function y =sigmoid_train(t, ranges, rc)
// Evaluate a train of sigmoid functions at T.
//Calling Sequence
//y = sigmoid_train(t, ranges, rc)
//Parameters
//t: integer
//ranges: matrix
//Description
//The number and duration of each sigmoid is determined from RANGES. Each row of RANGES represents a real interval, e.g. if sigmoid 'i' starts at 't=0.1' and ends at 't=0.5', then 'RANGES(i,:) = [0.1 0.5]'. The input RC is an array that defines the rising and falling time constants of each sigmoid. Its size must equal the size of RANGES.
//Examples
//sigmoid_train(0.1,[1:3],4)
//ans =
// 0.27375
funcprot(0);
rhs=argn(2);
if (rhs<3 | rhs>3) then
error("Wrong number of input arguments");
end
select(rhs)
case 3 then
y=callOctave("sigmoid_train", t, ranges, rc)
end
>>>>>>> 6bbb00d0f0128381ee95194cf7d008fb6504de7d
endfunction
|
202c74ec771411750d960b9d29ef613e7d48e5c6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3515/CH5/EX5.25/Ex_5_25.sce | 591f1d47cbc5781045bf1dd0e77c5c32c5b8378f | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 404 | sce | Ex_5_25.sce | // Exa 5.25
format('v',7);clc;
clear;
close;
// Given data
Vs= 100;// in mV
Vf= 95;// in mV
Vs= Vs*10^-3;// in V
Vf= Vf*10^-3;// in V
Vo=10;// in V
Vi= Vs-Vf;// in V
Av= Vo/Vi;// in V/V
disp(Av,"Value of A in V/V is : ")
Bita= Vf/Vo;// in V/V
disp(Bita,"Value of Bita in V/V is : ")
// Note: In the book Calculation to find the value of Bita is wrong so the asnwer in the book is wrong
|
51d1e28f5e0de4788462bcad101f2d5f7bde7459 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1332/CH15/EX15.15/15_15.sce | eb0fec2dd67ee9f3bcb81c087970145bed46b72a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 407 | sce | 15_15.sce | //Example 15.15
//Third Order Runge Kutta Method
//Page no. 526
clc;clear;close;
deff('y=f(x,y)','y=x-y')
y=1;x=1;h=0.1;
//scheme 1
K1=h*f(x,y);
K2=h*f(x+h/2,y+K1/2);
K3=h*f(x+h/2,y-K1+2*K2);
y1=y+(K1+4*K2+K3)/6
printf('\ny(1.1) by scheme 1 = %g\n\n',y1)
//scheme 2
K1=h*f(x,y);
K2=h*f(x+h/3,y+K1/3);
K3=h*f(x+2*h/3,y+2*K2/3);
y1=y+(K1+3*K3)/4
printf('\ny(1.1) by scheme 2 = %.7f\n\n',y1) |
177640a9f3fe7551a62bd4f25f8a639b9f2e4bad | f8bb2d5287f73944d0ae4a8ddb85a18b420ce288 | /Scilab/example/リカッチ方程式(離散時間系).sce | 8df0a0e61103c7176a615cf231695120ce14fdfc | [] | no_license | nishizumi-lab/sample | 1a2eb3baf0139e9db99b0c515ac618eb2ed65ad2 | fcdf07eb6d5c9ad9c6f5ea539046c334afffe8d2 | refs/heads/master | 2023-08-22T15:52:04.998574 | 2023-08-20T04:09:08 | 2023-08-20T04:09:08 | 248,222,555 | 8 | 20 | null | 2023-02-02T09:03:50 | 2020-03-18T12:14:34 | C | SHIFT_JIS | Scilab | false | false | 180 | sce | リカッチ方程式(離散時間系).sce | //リカッチ方程式(離散時間系)
A=[0 1;1 0]; b=[0;1]; r=1; Q=diag([1 1]);
B=b; R=r; G=B*inv(R)*B';
P=ricc(A,G,Q,'disc'), spec(P)
k=-inv(r+b'*P*b)*b'*P*A, spec(A+b*k)
|
d1474cb3bfd1a933cba8e0d2b69da4b45d09262a | b23687e2eb02bcb6d0f581b7975f42c496faeda1 | /Filtering_two_sine_waves_bandpass.sce | 082f9ca3f9247081b720f82edfa6c4925efd11e8 | [
"MIT"
] | permissive | harvishj/Scilab | bd3fbd3e679eb07aa088ff2bab40d491c6499770 | 9daada512f42ea6f52199a34d6b18e64b107af94 | refs/heads/master | 2021-07-14T15:06:03.621923 | 2020-10-05T06:35:43 | 2020-10-05T06:35:43 | 213,328,984 | 1 | 3 | MIT | 2020-10-05T06:35:44 | 2019-10-07T08:16:52 | Scilab | UTF-8 | Scilab | false | false | 332 | sce | Filtering_two_sine_waves_bandpass.sce | clear;
clf;
clc;
f = 100;
T = 1/f;
fs = 5000;
t = 0:1/fs:10*T;
y1 = sin(2 * %pi * f * t);
y2 = sin(10 * %pi * f * t);
y = y1+y2;
c1 = ffilt("bp", 100, 0.1,0.3);
c= filter(c1,1,y);
subplot(211);
plot(c);
title("Different frequency sinewaves filtering", "fontsize", 3);
[hm fr] = frmag(c,1,100);
subplot(212);
plot(fr,hm);
|
0c597f38c6c2d81a4971a1a503dfb6379514474a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3440/CH1/EX1.4/Ex1_4.sce | 933d0431713afcbc87cf51f0ad36f594a76edd54 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 392 | sce | Ex1_4.sce | clc
T=300 //K
Nd=10**16//atoms/cm^3
Nc=2.86*10**19//cm^-3
ni=9.65*10**9//cm^-3
k=8.617*10^-5 //eV/K
e=1.6*10**-19 //C
n=Nd
disp(n,"in cm^-3 is")
p=ni^2/Nd
disp(p,"in cm^-3 is")
//Ec-Ef=z
z=k*T*log(Nc/Nd)
disp(z,"fermi level measured from bottom of conduction band in eV is")
//Ef-Ei=y
y=k*T*log(Nd/ni)
disp(y,"Fermi level measured from the intrinsic fermi level in eV is")
|
9895a39a280bfdaad082b4c96643f3138e13405c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2198/CH1/EX1.40.11/Ex1_40_11.sce | b698d23ce5f49cc992b9e04381bdbc7400a6b2d0 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 249 | sce | Ex1_40_11.sce | //Ex 1.40.11
clc;clear;close;
format('v',9);
//Given :
ni=1.5*10^10;//per cm^3
n_n=2.25*10^15;//per cm^3
disp(n_n,"Equillibrium electron density(per cm^3) : ");
p_n=ni^2/n_n;//per cm^3
disp(p_n,"Equillibrium hole density(per cm^3) : ");
|
29a97c0eec9875b73bb3c2afc1b37a530cbf3c2e | da5b40d917ec2982828bd9bdf06b18b7bf189f26 | /sim/cmd/test/man-cooler.tst | ecf633d878b9bc2e9ea606baf0e83c3143c9b163 | [] | no_license | psy007/NNPC-CHEMICAL-SIM- | 4bddfc1012e0bc60c5ec6307149174bcd04398f9 | 8fb4c90180dc96be66f7ca05a30e59a8735fc072 | refs/heads/master | 2020-04-12T15:37:04.174834 | 2019-02-06T10:10:20 | 2019-02-06T10:10:20 | 162,587,144 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 359 | tst | man-cooler.tst | #Cooler Example - Distillation Tower Condenser Duty
$thermo = VirtualMaterials.NRTL/Ideal/HC
/ -> $thermo
thermo + ETHANOL WATER
topVap = Stream.Stream_Material()
topVap.In.P = 101.325
topVap.In.VapFrac = 1
topVap.In.MoleFlow = 100
topVap.In.Fraction = 0.85 0.15
cond = Heater.Cooler()
topVap.Out -> cond.In
cond.DeltaP = 0
cond.Out.VapFrac = 0
cond.OutQ
|
36ac653f0e463010052f70fb08f3b39336f50886 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3250/CH4/EX4.8/Ex4_8.sce | 7b3793db10bde6648e00626cd054622fd146311b | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 382 | sce | Ex4_8.sce | clc
// Given that
alpha = 0 // Rake angle in degree
gama = 3 // Clearance angle in Degree
w = 1 // Maximum length of flank wear allowed in mm
gama_ = 7 // Increased clearance angle in Degree
// Sample Problem 8 on page no. 212
printf("\n # PROBLEM 4.8 # \n")
I_per = (((tand(gama_))-(tand(gama)))/tand(gama))*100
printf(" \n Percentage increase in tool life = %d percent.",I_per)
|
e3d1df26324914974d5003547a03c7d5bf284181 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3648/CH5/EX5.12/Ex5_12.sce | 57c8f60a699288c9d9285bb8dba394e3576941c9 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 589 | sce | Ex5_12.sce | //Example 5_12
clc();
clear;
//How far the average velocity and how far beyond B does the car goes
m=2000 //units in Kg
vb=5 //units in meters/sec
va=20 //units in meters/sec
hb_ha=8 //units in meters
g=9.8 //units in meters/sec^2
sab=100 //units in meters
f=-((0.5*m*(vb^2-va^2))+(m*g*(hb_ha)))/sab //units in Newtons
printf("Average frictional force is f=%d N\n",f)
Sbe=(0.5*m*vb^2)/f //units in meters
printf("The distance by which the car goes beyond is Sbe=%.1f meters",Sbe)
//In text book answer is printed wrong as f=2180 N but correct answer is f=2182N |
78c51c87480c41dc1ea161ae40cf79a9404a5ce0 | 964a1ce44b6391e555c0e2aeff6c55dda847d718 | /Mini Compiler for LaTeX/test result/tcabe_res.tst | 32b1e96fab14cb8a579ef1c8b92f09c78160bc85 | [] | no_license | kennethwty/mini-compiler-latex | 6c165567298c216d39a806fa7cc05ed67f1babfc | d1b99a4fbbac906bf61242a977886578e1eb3594 | refs/heads/master | 2021-09-28T10:08:02.927880 | 2018-11-16T17:45:46 | 2018-11-16T17:45:46 | 104,703,352 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 2,097 | tst | tcabe_res.tst |
1. Single is for Single spacing
2. Center allows a block to be centered
- Itemize uses ticks to indicate items
- Center allows a block to be centered
Single is for Single spacing
Itemize uses ticks to indicate items
One
Column
1. Single is for Single spacing
2. Single is for Single spacing. A nested itemize
3. Verbatim allows text that matches the what you see is what you get mode
1. Itemize uses ticks to indicate items
2. Center allows a block to be centered
1. Verbatim allows text that matches the what you see is what you get mode
2. Itemize uses ticks to indicate items
3. Single is for Single spacing. A second level of enums!!!!
4. Center allows a block to be centered
1. Center allows a block to be centered
- Single is for Single spacing
- Single is for Single spacing. A nested itemize
- Verbatim allows text that matches the what you see is what you get mode
- Itemize uses ticks to indicate items
- Center allows a block to be centered
- Verbatim allows text that matches the what you see is what you get mode
- Itemize uses ticks to indicate items
- Single is for Single spacing. A second level of itemize!!!!
- Center allows a block to be centered
- Center allows a block to be centered
1. Single is for Single spacing
- Single is for Single spacing. A nested itemize
- Verbatim allows text that matches the what you see is what you get mode
Single is for Single spacing
Verbatim allows text that matches the
Itemize uses ticks to indicate items
Center allows a block to be centered
Does
Does
A
A
One
One
Column
Column
Table
Table
Work???????
Work???????
|
e3f631cddcf64d54b3fa742714c08faccd5c1084 | 367fb86cc145c187bc8aa89afab0f15f7e8826e4 | /functions/cv_thresh_truncate.sci | 102f10d8958367c790296a71077a6e8be920b0f1 | [] | no_license | rishubhjain/funcforscilab | 19180cefb15a88df5cd55d91c2e50ab1829e4860 | 3f9fb8b1f467e1e89da1297bee8bd14645da5605 | refs/heads/master | 2021-01-23T00:15:23.622940 | 2015-04-22T09:32:28 | 2015-04-22T09:32:28 | 31,612,595 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 140 | sci | cv_thresh_truncate.sci | function[img_ret]=cv_thresh_truncate(image)
pyImport simple_thresholding
img_ret=simple_thresholding.thresh_trunc(image)
endfunction |
b577ce7e43d844c334caf29ddf4dfbf5206cebd6 | 9b046504c3b7683d3bfa294fe100408058e75aa3 | /Metodos/Clase1/SolucionesScilab/Ejercicios/ejercicio1.sce | 45b7d1340202d716395f5012aa34387a09d12220 | [] | no_license | DavidAlex99/Cursos | f15cb4f4fbb35a6eb62cbae0a9b51ea671f3ea8f | aee547ab09db7e535bea5a6d41ed6e455f8a9a89 | refs/heads/master | 2023-01-08T02:46:07.502656 | 2020-11-14T00:45:57 | 2020-11-14T00:45:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 477 | sce | ejercicio1.sce | x=0:10000:100000
g0= 9.8
R = 6.37*10^6
v0 = 1400
diffX = 10000
//No es posible realizar 1/(1+x) siendo x un vector
v = sqrt(2*g0*R^2*(R+x)^-1+v0^2-2*g0*R)
plot(x,v,'marker','.','color','red')
v(1) = 1400
for i = 1:1:length(x)-1
v(i+1)= -g0*R^2/(v(i)*(R+x(i))^2)*diffX + v(i)
end
plot(x,v,'marker','>','color','blue')
ylabel("$\frac{m}{s}$",'fontsize',4)
xlabel("m",'fontsize',4)
title("Velocidad vs distancia")
legend(['Método análitico';'Método de Euler'],[-1]);
|
d7055dbd1c68a6cbf944705c0f9abd5e8409778c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3720/CH8/EX8.5/Ex8_5.sce | b92bf469a084cf6f363d6b5d6da69ca40be16326 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 761 | sce | Ex8_5.sce | //Example 8_5
clc;clear;funcprot(0);
//From Example 8_4
// Given values
P=1;// atm
T=35;// degree celsius
L=300;// m
D=0.267;// m
h_L=20;// m
v_old=0.35;// m^3/s
g=9.81;// m/s^2
//Properties
rho=1.145;// kg/m^3
mu=1.895*10^-5;// kg/m.s
nu=1.655*10^-5;// m^2/s
//Calculation
//V=y(1); Re=y(2); f=y(3);v=y(4)
function[X]=flowrate(y);
X(1)=real((y(4)/(%pi*D^2/4))-y(1));
X(2)=real(((y(1)*D)/(nu))-y(2));
X(3)=real((-2.0*log10(2.51/(y(2)*sqrt(y(3)))))-(1/sqrt(y(3))));
X(4)=real(((y(3)*L*y(1)^2)/(D*2*9.81))-20);
endfunction
y=[1 10000 0.01 0.1];
z= fsolve(y,flowrate);
v_new=z(4);// m^3/s
v_drop=v_old-v_new;//The drop in the flow rate
printf('The drop in the flow rate through the duct.v_drop=%0.2f m^3/s\n',v_drop);
|
e24fbba3aeeb5c4b47b7faf96f2dd62b7a52cb6a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3831/CH11/EX11.2/Ex11_2.sce | 5456fc8eadaa1a2c1e8025cb5d4973a54b773a7a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 536 | sce | Ex11_2.sce | // Example 11_2
clc;funcprot(0);
// Given data
p=200;// psia
T=400;// °F
// Solution
// From Table C.3a in Thermodynamic Tables to accompany Modern Engineering Thermodynamics, we find that, at this state,
u=1123.5;// Btu/lbm
h=1210.8;// Btu/lbm
s=1.5602;// Btu/lbm.R
f=u-((T+459.67)*s);// Btu/lbm
g=h-((T+459.67)*s);// Btu/lbm
printf("\nThe value of the specific Helmholtz function for superheated water vapor,f=%3.0f Btu/lbm \nThe value of the specific Gibbs function for superheated water vapor,g=%3.0f Btu/lbm",f,g);
|
67cd41249ee53c16a8d29735ba054eb65bbecbd0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2627/CH3/EX3.6/Ex3_6.sce | 9b3242d99b0c0044416721b481d5380585d3db56 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 195 | sce | Ex3_6.sce | //Ex 3.6
clc;clear;close;
format('v',5);
L=318;//mH
R=75;//ohm
VR=150;//V
f=50;///Hz
I=VR/R;//A
XL=2*%pi*f*L/1000;//ohm
VL=I*XL;//V
V=sqrt(VR^2+VL^2);//V
disp(V,"Supply Voltage(V)");
|
701487367998b25cd43476e142de0be6bf33af10 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1514/CH13/EX13.1/13_1.sce | 7f4b39c0b16942bcf1cbc7b09c39d49a2f3dd93a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 605 | sce | 13_1.sce | //chapter 13
//example 13.1
//page 396
clear all;
clc ;
//given
Rc=10;//collector resistors
Re=3.9;//emitter resistor
Vcc=12;Vee=-12;//dual supply
Vbe=0.7;
Vb4=-3.5;//Q4 base voltage with respect to ground
VB4=Vb4-(Vee);//voltage at base of transistor 4
Ie=(VB4-Vbe)/Re;//emitter current
printf("\nemitter current through Q4= %d mA",Ie);
Ie2=Ie/2;
Ie1=Ie2;
Ic1=Ie1;
Ic2=Ie2;
printf("\nemitter currents through Q1&Q2= %d mA",Ie1);
printf("\ncollector currents through Q1&Q2= %d mA",Ic1);
Vc2=Vcc-Ic1*Rc;
Vc1=Vc2;
printf("\nvoltage across collectors of transistors Q1&Q2 = %d V",Vc1)
|
c11b57679fcfa6907db1ab812ee960690ecdc315 | 28b24ec288a5cf2babf644edafb55fc68a19cabf | /edo/dormand.sce | f4e6eaf499d642fdbd85b06442ef600de9e99105 | [] | no_license | ferreiraalves/metodos-numericos | 5100e3d66613c266203d87880fc5c944bcc81e0e | 31162df9dd824c6a621c34a8a1c5c81ee521c470 | refs/heads/master | 2020-03-25T21:43:35.324923 | 2018-12-04T14:32:58 | 2018-12-04T14:32:58 | 144,187,337 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,795 | sce | dormand.sce |
function[result] = f(x,y)
//inserir a formula aqui yo
result= x - 2*y + 1
endfunction
//a = limite inferior
//b = limite superior
//m = numero de subintervalos
//y = valor inicial
function[VetX, VetY, EG] = dormand(a,b,m,y0)
a21 = 1/5; a31 = 3/40; a32 = 9/40; a41 = 44/45; a42 = -56/15; a43 = 32/9;
a51 = 19372/6561; a52 = -25369/2187; a53 = 94448/6561; a54 = -212/729;
a61 = 9017/3168; a62 = -355/33; a63 = 46732/5247; a64 = 49/176;
a65 = -5103/18656; a71 = 35/384; a73 = 500/1113; a74 = 125/192;
a75 = -2187/6784; a76 = 11/84;
c2 = 1/5; c3 = 3/10; c4 = 4/5; c5 = 8/9; c6 = 1; c7 = 1;
e1 = 71/57600; e3 = -71/16695; e4 = 71/1920; e5 = -17253/339200;
e6 = 22/525; e7= -1/40;
h = (b-a)/m; xt = a; yt = y0;
VetX(1) = xt; VetY(1) = yt; EG(1)= 0;
printf('i\txt\t\txy\n');
printf('%d\t',0);
printf('%f\t',xt);
printf('%f\n',yt);
for i=1:m
x = xt; y = yt; k1 = h * f(x, y);
x = xt + c2 * h; y = yt + a21 * k1; k2 = h * f(x, y);
x = xt + c3 * h; y = yt + a31 * k1 + a32 * k2; k3 = h * f(x, y);
x = xt + c4 * h; y = yt + a41 * k1 + a42 * k2 + a43 * k3; k4 = h * f(x, y);
x = xt + c5 * h; y = yt + a51 * k1 + a52 * k2 + a53 * k3 + a54 * k4; k5 = h * f(x, y);
x = xt + c6 * h; y = yt + a61 * k1 + a62 * k2 + a63 * k3 + a64 * k4 + a65 * k5; k6 = h * f(x, y);
x = xt + c7 * h; y = yt + a71 * k1 + a73 * k3 + a74 * k4 + a75 * k5 + a76 * k6; k7 = h * f(x, y);
xt = a + i * h; yt = yt + a71 * k1 + a73 * k3 + a74 * k4 + a75 * k5 + a76 * k6;
ErroGlobal = e1 * k1 + e3 * k3 + e4 * k4 + e5 * k5 + e6 * k6 + e7 * k7
VetX(i + 1) = xt; VetY (i + 1) = yt; EG(i + 1) = ErroGlobal;
printf("%d\t%f\t%f\t%f\n",i, xt, yt, ErroGlobal);
end
endfunction
|
86d4ca3933ac31c32f903bfb91254f92d165ffdc | 382f1dd66c084cf9a1f9ff595be26967356245a1 | /scilab/p.sce | e9b6b9f544701c24dd87727e90c420f7fb50caa3 | [] | no_license | osho-agyeya/Implementation-of-Graph-Theory-in-Computer-Networking | 262ac759658444fddee02906506a20590b5d2b92 | 4c7edc99da2304e2ceb3a422508bd29660b60870 | refs/heads/master | 2022-03-25T08:02:39.169796 | 2020-01-11T12:30:43 | 2020-01-11T12:30:43 | 107,777,536 | 3 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 1,157 | sce | p.sce | clc;
l=input("Enter the no. of vertices in the matrix. The adjacency matrix shall be read from the text file:");
h=fscanfMat("testfile1.txt");
a=h';
fid = mopen('Result.txt','w'); // Output file
mfprintf(fid,'Original matrix\n\n'); // Printing the original matrix in the output file
for i=1:l
for k=1:l
mfprintf(fid,'%6d',a(i,k));
end
mfprintf(fid,' \n');
end
k=1:l ;
listV(k)=0 ;
listV(1)=1 ; //list of visited vertices
e=1;
while (e<l)
mini=%inf;
for i=1:l
if listV(i)==1
for j=1:l
if listV(j)==0
if mini>a(i,j) & i~=j & a(i,j)~=0
mini=a(i,j);
b=a(i,j);
s=i;
d=j;
end
end
end
end
end
listV(d)=1;
distance(e)=b;
source(e)=s;
destination(e)=d;
e=e+1;
end
mfprintf(fid,'\nThe nodes and shortest distances are \n');
mfprintf(fid,'\nFORMAT: Distance(Source, destination) \n');
for g=1:e-1
mfprintf(fid,'%d(%d,%d)\n',distance(g),source(g),destination(g));
end
status = mclose(fid);
clear;
|
faae23e26476edeaed3c3060f4f3564131ccce33 | c565d26060d56f516d954d4b378b8699c31a71ef | /Vikas_self/codes/SelfTuning_Vikas/PIDControllerFandisturbance/pidselftuned40to45.sce | 4d6d035734edfc9e4e56509def3deafefb63a0ab | [] | no_license | rupakrokade/sbhs-manual | 26d6e458c5d6aaba858c3cb2d07ff646d90645ce | 5aad4829d5ba1cdf9cc62d72f794fab2b56dd786 | refs/heads/master | 2021-01-23T06:25:53.904684 | 2015-10-24T11:57:04 | 2015-10-24T11:57:04 | 5,258,478 | 0 | 0 | null | 2012-11-16T11:45:07 | 2012-08-01T11:36:17 | Scilab | UTF-8 | Scilab | false | false | 24,750 | sce | pidselftuned40to45.sce | 0.100E+00 0.000E+00 0.000E+00 0.100E+03
0.110E+01 0.200E+02 0.390E+02 0.100E+03
0.210E+01 0.201E+02 0.000E+00 0.100E+03
0.310E+01 0.200E+02 0.390E+02 0.100E+03
0.410E+01 0.200E+02 0.390E+02 0.100E+03
0.510E+01 0.201E+02 0.390E+02 0.100E+03
0.610E+01 0.201E+02 0.390E+02 0.100E+03
0.710E+01 0.200E+02 0.390E+02 0.100E+03
0.810E+01 0.200E+02 0.390E+02 0.100E+03
0.910E+01 0.202E+02 0.390E+02 0.100E+03
0.101E+02 0.203E+02 0.390E+02 0.100E+03
0.111E+02 0.205E+02 0.390E+02 0.100E+03
0.121E+02 0.208E+02 0.390E+02 0.100E+03
0.131E+02 0.208E+02 0.390E+02 0.100E+03
0.141E+02 0.209E+02 0.390E+02 0.100E+03
0.151E+02 0.212E+02 0.390E+02 0.100E+03
0.161E+02 0.216E+02 0.390E+02 0.100E+03
0.171E+02 0.218E+02 0.390E+02 0.100E+03
0.181E+02 0.220E+02 0.390E+02 0.100E+03
0.191E+02 0.225E+02 0.390E+02 0.100E+03
0.201E+02 0.224E+02 0.222E+02 0.100E+03
0.211E+02 0.227E+02 0.390E+02 0.100E+03
0.221E+02 0.232E+02 0.171E+02 0.100E+03
0.231E+02 0.234E+02 0.119E+02 0.100E+03
0.241E+02 0.238E+02 0.390E+02 0.100E+03
0.251E+02 0.240E+02 0.362E+02 0.100E+03
0.261E+02 0.240E+02 0.390E+02 0.100E+03
0.271E+02 0.243E+02 0.390E+02 0.100E+03
0.281E+02 0.247E+02 0.263E+02 0.100E+03
0.291E+02 0.248E+02 0.326E+02 0.100E+03
0.301E+02 0.251E+02 0.390E+02 0.100E+03
0.311E+02 0.254E+02 0.361E+02 0.100E+03
0.321E+02 0.255E+02 0.390E+02 0.100E+03
0.331E+02 0.257E+02 0.390E+02 0.100E+03
0.341E+02 0.259E+02 0.390E+02 0.100E+03
0.351E+02 0.261E+02 0.390E+02 0.100E+03
0.361E+02 0.264E+02 0.390E+02 0.100E+03
0.371E+02 0.266E+02 0.390E+02 0.100E+03
0.381E+02 0.266E+02 0.390E+02 0.100E+03
0.391E+02 0.268E+02 0.390E+02 0.100E+03
0.401E+02 0.270E+02 0.349E+02 0.100E+03
0.411E+02 0.272E+02 0.390E+02 0.100E+03
0.421E+02 0.274E+02 0.390E+02 0.100E+03
0.431E+02 0.276E+02 0.390E+02 0.100E+03
0.441E+02 0.275E+02 0.390E+02 0.100E+03
0.451E+02 0.277E+02 0.390E+02 0.100E+03
0.461E+02 0.280E+02 0.225E+02 0.100E+03
0.471E+02 0.281E+02 0.219E+02 0.100E+03
0.481E+02 0.283E+02 0.390E+02 0.100E+03
0.491E+02 0.284E+02 0.390E+02 0.100E+03
0.501E+02 0.284E+02 0.390E+02 0.100E+03
0.511E+02 0.284E+02 0.390E+02 0.100E+03
0.521E+02 0.286E+02 0.390E+02 0.100E+03
0.531E+02 0.287E+02 0.305E+02 0.100E+03
0.541E+02 0.288E+02 0.390E+02 0.100E+03
0.551E+02 0.290E+02 0.390E+02 0.100E+03
0.561E+02 0.289E+02 0.390E+02 0.100E+03
0.571E+02 0.290E+02 0.390E+02 0.100E+03
0.581E+02 0.291E+02 0.327E+02 0.100E+03
0.591E+02 0.293E+02 0.390E+02 0.100E+03
0.601E+02 0.294E+02 0.382E+02 0.100E+03
0.611E+02 0.296E+02 0.390E+02 0.100E+03
0.621E+02 0.295E+02 0.375E+02 0.100E+03
0.631E+02 0.297E+02 0.390E+02 0.100E+03
0.641E+02 0.298E+02 0.191E+02 0.100E+03
0.651E+02 0.301E+02 0.381E+02 0.100E+03
0.661E+02 0.301E+02 0.236E+02 0.100E+03
0.671E+02 0.302E+02 0.390E+02 0.100E+03
0.681E+02 0.302E+02 0.390E+02 0.100E+03
0.691E+02 0.302E+02 0.390E+02 0.100E+03
0.701E+02 0.303E+02 0.390E+02 0.100E+03
0.711E+02 0.303E+02 0.388E+02 0.100E+03
0.721E+02 0.303E+02 0.390E+02 0.100E+03
0.731E+02 0.303E+02 0.390E+02 0.100E+03
0.741E+02 0.304E+02 0.390E+02 0.100E+03
0.751E+02 0.304E+02 0.385E+02 0.100E+03
0.761E+02 0.304E+02 0.390E+02 0.100E+03
0.771E+02 0.305E+02 0.390E+02 0.100E+03
0.781E+02 0.307E+02 0.383E+02 0.100E+03
0.791E+02 0.307E+02 0.342E+02 0.100E+03
0.801E+02 0.308E+02 0.390E+02 0.100E+03
0.811E+02 0.307E+02 0.376E+02 0.100E+03
0.821E+02 0.307E+02 0.390E+02 0.100E+03
0.831E+02 0.308E+02 0.390E+02 0.100E+03
0.841E+02 0.309E+02 0.376E+02 0.100E+03
0.851E+02 0.310E+02 0.390E+02 0.100E+03
0.861E+02 0.310E+02 0.390E+02 0.100E+03
0.871E+02 0.309E+02 0.390E+02 0.100E+03
0.881E+02 0.310E+02 0.390E+02 0.100E+03
0.891E+02 0.311E+02 0.286E+02 0.100E+03
0.901E+02 0.311E+02 0.350E+02 0.100E+03
0.911E+02 0.312E+02 0.390E+02 0.100E+03
0.921E+02 0.312E+02 0.367E+02 0.100E+03
0.931E+02 0.312E+02 0.390E+02 0.100E+03
0.941E+02 0.314E+02 0.390E+02 0.100E+03
0.951E+02 0.315E+02 0.251E+02 0.100E+03
0.961E+02 0.314E+02 0.387E+02 0.100E+03
0.971E+02 0.314E+02 0.390E+02 0.100E+03
0.981E+02 0.314E+02 0.390E+02 0.100E+03
0.991E+02 0.314E+02 0.390E+02 0.100E+03
0.100E+03 0.314E+02 0.390E+02 0.100E+03
0.101E+03 0.315E+02 0.390E+02 0.100E+03
0.102E+03 0.314E+02 0.360E+02 0.100E+03
0.103E+03 0.315E+02 0.390E+02 0.100E+03
0.104E+03 0.316E+02 0.277E+02 0.100E+03
0.105E+03 0.316E+02 0.328E+02 0.100E+03
0.106E+03 0.317E+02 0.390E+02 0.100E+03
0.107E+03 0.317E+02 0.356E+02 0.100E+03
0.108E+03 0.317E+02 0.390E+02 0.100E+03
0.109E+03 0.318E+02 0.390E+02 0.100E+03
0.110E+03 0.318E+02 0.354E+02 0.100E+03
0.111E+03 0.319E+02 0.390E+02 0.100E+03
0.112E+03 0.319E+02 0.352E+02 0.100E+03
0.113E+03 0.319E+02 0.390E+02 0.100E+03
0.114E+03 0.318E+02 0.390E+02 0.100E+03
0.115E+03 0.319E+02 0.390E+02 0.100E+03
0.116E+03 0.319E+02 0.270E+02 0.100E+03
0.117E+03 0.320E+02 0.390E+02 0.100E+03
0.118E+03 0.320E+02 0.350E+02 0.100E+03
0.119E+03 0.320E+02 0.390E+02 0.100E+03
0.120E+03 0.320E+02 0.390E+02 0.100E+03
0.121E+03 0.322E+02 0.390E+02 0.100E+03
0.122E+03 0.322E+02 0.239E+02 0.100E+03
0.123E+03 0.323E+02 0.390E+02 0.100E+03
0.124E+03 0.323E+02 0.344E+02 0.100E+03
0.125E+03 0.323E+02 0.390E+02 0.100E+03
0.126E+03 0.324E+02 0.390E+02 0.100E+03
0.127E+03 0.324E+02 0.342E+02 0.100E+03
0.128E+03 0.324E+02 0.390E+02 0.100E+03
0.129E+03 0.324E+02 0.390E+02 0.100E+03
0.130E+03 0.325E+02 0.390E+02 0.100E+03
0.131E+03 0.325E+02 0.340E+02 0.100E+03
0.132E+03 0.325E+02 0.390E+02 0.100E+03
0.133E+03 0.325E+02 0.390E+02 0.100E+03
0.134E+03 0.325E+02 0.390E+02 0.100E+03
0.135E+03 0.325E+02 0.390E+02 0.100E+03
0.136E+03 0.325E+02 0.390E+02 0.100E+03
0.137E+03 0.325E+02 0.390E+02 0.100E+03
0.138E+03 0.325E+02 0.390E+02 0.100E+03
0.139E+03 0.325E+02 0.390E+02 0.100E+03
0.140E+03 0.325E+02 0.390E+02 0.100E+03
0.141E+03 0.325E+02 0.390E+02 0.100E+03
0.142E+03 0.325E+02 0.390E+02 0.100E+03
0.143E+03 0.325E+02 0.390E+02 0.100E+03
0.144E+03 0.325E+02 0.390E+02 0.100E+03
0.145E+03 0.327E+02 0.390E+02 0.100E+03
0.146E+03 0.326E+02 0.231E+02 0.100E+03
0.147E+03 0.327E+02 0.390E+02 0.100E+03
0.148E+03 0.326E+02 0.258E+02 0.100E+03
0.149E+03 0.325E+02 0.390E+02 0.100E+03
0.150E+03 0.325E+02 0.390E+02 0.100E+03
0.151E+03 0.325E+02 0.366E+02 0.100E+03
0.152E+03 0.325E+02 0.390E+02 0.100E+03
0.153E+03 0.325E+02 0.390E+02 0.100E+03
0.154E+03 0.325E+02 0.390E+02 0.100E+03
0.155E+03 0.324E+02 0.390E+02 0.100E+03
0.156E+03 0.325E+02 0.390E+02 0.100E+03
0.157E+03 0.325E+02 0.261E+02 0.100E+03
0.158E+03 0.325E+02 0.390E+02 0.100E+03
0.159E+03 0.326E+02 0.390E+02 0.100E+03
0.160E+03 0.324E+02 0.338E+02 0.100E+03
0.161E+03 0.324E+02 0.390E+02 0.100E+03
0.162E+03 0.325E+02 0.289E+02 0.100E+03
0.163E+03 0.325E+02 0.238E+02 0.100E+03
0.164E+03 0.325E+02 0.372E+02 0.100E+03
0.165E+03 0.325E+02 0.390E+02 0.100E+03
0.166E+03 0.325E+02 0.390E+02 0.100E+03
0.167E+03 0.325E+02 0.390E+02 0.100E+03
0.168E+03 0.325E+02 0.390E+02 0.100E+03
0.169E+03 0.325E+02 0.390E+02 0.100E+03
0.170E+03 0.325E+02 0.390E+02 0.100E+03
0.171E+03 0.325E+02 0.390E+02 0.100E+03
0.172E+03 0.325E+02 0.390E+02 0.100E+03
0.173E+03 0.326E+02 0.390E+02 0.100E+03
0.174E+03 0.327E+02 0.338E+02 0.100E+03
0.175E+03 0.329E+02 0.362E+02 0.100E+03
0.176E+03 0.330E+02 0.278E+02 0.100E+03
0.177E+03 0.331E+02 0.372E+02 0.100E+03
0.178E+03 0.330E+02 0.387E+02 0.100E+03
0.179E+03 0.330E+02 0.390E+02 0.100E+03
0.180E+03 0.331E+02 0.356E+02 0.100E+03
0.181E+03 0.331E+02 0.294E+02 0.100E+03
0.182E+03 0.331E+02 0.390E+02 0.100E+03
0.183E+03 0.330E+02 0.390E+02 0.100E+03
0.184E+03 0.330E+02 0.390E+02 0.100E+03
0.185E+03 0.330E+02 0.356E+02 0.100E+03
0.186E+03 0.330E+02 0.390E+02 0.100E+03
0.187E+03 0.331E+02 0.390E+02 0.100E+03
0.188E+03 0.331E+02 0.328E+02 0.100E+03
0.189E+03 0.332E+02 0.390E+02 0.100E+03
0.190E+03 0.331E+02 0.326E+02 0.100E+03
0.191E+03 0.331E+02 0.390E+02 0.100E+03
0.192E+03 0.330E+02 0.354E+02 0.100E+03
0.193E+03 0.331E+02 0.390E+02 0.100E+03
0.194E+03 0.331E+02 0.251E+02 0.100E+03
0.195E+03 0.330E+02 0.369E+02 0.100E+03
0.196E+03 0.330E+02 0.390E+02 0.100E+03
0.197E+03 0.331E+02 0.356E+02 0.100E+03
0.198E+03 0.330E+02 0.294E+02 0.100E+03
0.199E+03 0.331E+02 0.390E+02 0.100E+03
0.200E+03 0.330E+02 0.251E+02 0.500E+02
0.201E+03 0.327E+02 0.390E+02 0.500E+02
0.202E+03 0.329E+02 0.390E+02 0.500E+02
0.203E+03 0.329E+02 0.000E+00 0.500E+02
0.204E+03 0.330E+02 0.200E+02 0.500E+02
0.205E+03 0.330E+02 0.140E+02 0.500E+02
0.206E+03 0.330E+02 0.260E+02 0.500E+02
0.207E+03 0.331E+02 0.303E+02 0.500E+02
0.208E+03 0.332E+02 0.241E+02 0.500E+02
0.209E+03 0.333E+02 0.254E+02 0.500E+02
0.210E+03 0.334E+02 0.264E+02 0.500E+02
0.211E+03 0.336E+02 0.273E+02 0.500E+02
0.212E+03 0.336E+02 0.177E+02 0.500E+02
0.213E+03 0.337E+02 0.356E+02 0.500E+02
0.214E+03 0.338E+02 0.284E+02 0.500E+02
0.215E+03 0.338E+02 0.284E+02 0.500E+02
0.216E+03 0.339E+02 0.383E+02 0.500E+02
0.217E+03 0.338E+02 0.307E+02 0.500E+02
0.218E+03 0.338E+02 0.390E+02 0.500E+02
0.219E+03 0.338E+02 0.340E+02 0.500E+02
0.220E+03 0.339E+02 0.365E+02 0.500E+02
0.221E+03 0.340E+02 0.289E+02 0.500E+02
0.222E+03 0.340E+02 0.285E+02 0.500E+02
0.223E+03 0.343E+02 0.379E+02 0.500E+02
0.224E+03 0.343E+02 0.103E+02 0.500E+02
0.225E+03 0.344E+02 0.335E+02 0.500E+02
0.226E+03 0.346E+02 0.250E+02 0.500E+02
0.227E+03 0.346E+02 0.139E+02 0.500E+02
0.228E+03 0.347E+02 0.290E+02 0.500E+02
0.229E+03 0.346E+02 0.201E+02 0.500E+02
0.230E+03 0.347E+02 0.376E+02 0.500E+02
0.231E+03 0.347E+02 0.216E+02 0.500E+02
0.232E+03 0.346E+02 0.293E+02 0.500E+02
0.233E+03 0.346E+02 0.390E+02 0.500E+02
0.234E+03 0.346E+02 0.326E+02 0.500E+02
0.235E+03 0.346E+02 0.334E+02 0.500E+02
0.236E+03 0.346E+02 0.342E+02 0.500E+02
0.237E+03 0.347E+02 0.350E+02 0.500E+02
0.238E+03 0.348E+02 0.261E+02 0.500E+02
0.239E+03 0.350E+02 0.241E+02 0.500E+02
0.240E+03 0.351E+02 0.124E+02 0.500E+02
0.241E+03 0.351E+02 0.169E+02 0.500E+02
0.242E+03 0.352E+02 0.237E+02 0.500E+02
0.243E+03 0.353E+02 0.140E+02 0.500E+02
0.244E+03 0.354E+02 0.111E+02 0.500E+02
0.245E+03 0.353E+02 0.800E+01 0.500E+02
0.246E+03 0.353E+02 0.236E+02 0.500E+02
0.247E+03 0.352E+02 0.161E+02 0.500E+02
0.248E+03 0.351E+02 0.250E+02 0.500E+02
0.249E+03 0.351E+02 0.272E+02 0.500E+02
0.250E+03 0.348E+02 0.200E+02 0.500E+02
0.251E+03 0.346E+02 0.390E+02 0.500E+02
0.252E+03 0.346E+02 0.374E+02 0.500E+02
0.253E+03 0.345E+02 0.239E+02 0.500E+02
0.254E+03 0.343E+02 0.345E+02 0.500E+02
0.255E+03 0.344E+02 0.390E+02 0.500E+02
0.256E+03 0.345E+02 0.161E+02 0.500E+02
0.257E+03 0.344E+02 0.147E+02 0.500E+02
0.258E+03 0.345E+02 0.328E+02 0.500E+02
0.259E+03 0.345E+02 0.170E+02 0.500E+02
0.260E+03 0.344E+02 0.252E+02 0.500E+02
0.261E+03 0.345E+02 0.360E+02 0.500E+02
0.262E+03 0.345E+02 0.202E+02 0.500E+02
0.263E+03 0.344E+02 0.284E+02 0.500E+02
0.264E+03 0.344E+02 0.390E+02 0.500E+02
0.265E+03 0.343E+02 0.330E+02 0.500E+02
0.266E+03 0.344E+02 0.390E+02 0.500E+02
0.267E+03 0.344E+02 0.233E+02 0.500E+02
0.268E+03 0.344E+02 0.318E+02 0.500E+02
0.269E+03 0.345E+02 0.330E+02 0.500E+02
0.270E+03 0.345E+02 0.244E+02 0.500E+02
0.271E+03 0.346E+02 0.326E+02 0.500E+02
0.272E+03 0.347E+02 0.238E+02 0.500E+02
0.273E+03 0.347E+02 0.220E+02 0.500E+02
0.274E+03 0.348E+02 0.298E+02 0.500E+02
0.275E+03 0.350E+02 0.207E+02 0.500E+02
0.276E+03 0.350E+02 0.893E+01 0.500E+02
0.277E+03 0.351E+02 0.230E+02 0.500E+02
0.278E+03 0.351E+02 0.135E+02 0.500E+02
0.279E+03 0.351E+02 0.203E+02 0.500E+02
0.280E+03 0.351E+02 0.201E+02 0.500E+02
0.281E+03 0.351E+02 0.199E+02 0.500E+02
0.282E+03 0.351E+02 0.197E+02 0.500E+02
0.283E+03 0.351E+02 0.195E+02 0.500E+02
0.284E+03 0.351E+02 0.193E+02 0.500E+02
0.285E+03 0.351E+02 0.191E+02 0.500E+02
0.286E+03 0.351E+02 0.189E+02 0.500E+02
0.287E+03 0.350E+02 0.187E+02 0.500E+02
0.288E+03 0.350E+02 0.281E+02 0.500E+02
0.289E+03 0.348E+02 0.211E+02 0.500E+02
0.290E+03 0.347E+02 0.390E+02 0.500E+02
0.291E+03 0.346E+02 0.348E+02 0.500E+02
0.292E+03 0.345E+02 0.380E+02 0.500E+02
0.293E+03 0.344E+02 0.390E+02 0.500E+02
0.294E+03 0.343E+02 0.390E+02 0.500E+02
0.295E+03 0.344E+02 0.390E+02 0.500E+02
0.296E+03 0.345E+02 0.233E+02 0.500E+02
0.297E+03 0.346E+02 0.219E+02 0.500E+02
0.298E+03 0.346E+02 0.203E+02 0.500E+02
0.299E+03 0.347E+02 0.283E+02 0.500E+02
0.300E+03 0.350E+02 0.194E+02 0.500E+02
0.301E+03 0.350E+02 0.000E+00 0.500E+02
0.302E+03 0.350E+02 0.211E+02 0.500E+02
0.303E+03 0.351E+02 0.211E+02 0.500E+02
0.304E+03 0.350E+02 0.116E+02 0.500E+02
0.305E+03 0.350E+02 0.280E+02 0.500E+02
0.306E+03 0.350E+02 0.210E+02 0.500E+02
0.307E+03 0.350E+02 0.210E+02 0.500E+02
0.308E+03 0.350E+02 0.210E+02 0.500E+02
0.309E+03 0.348E+02 0.210E+02 0.500E+02
0.310E+03 0.346E+02 0.390E+02 0.500E+02
0.311E+03 0.347E+02 0.390E+02 0.500E+02
0.312E+03 0.346E+02 0.158E+02 0.500E+02
0.313E+03 0.346E+02 0.333E+02 0.500E+02
0.314E+03 0.345E+02 0.270E+02 0.500E+02
0.315E+03 0.345E+02 0.376E+02 0.500E+02
0.316E+03 0.345E+02 0.314E+02 0.500E+02
0.317E+03 0.345E+02 0.324E+02 0.500E+02
0.318E+03 0.346E+02 0.334E+02 0.500E+02
0.319E+03 0.347E+02 0.246E+02 0.500E+02
0.320E+03 0.348E+02 0.228E+02 0.500E+02
0.321E+03 0.348E+02 0.208E+02 0.500E+02
0.322E+03 0.351E+02 0.283E+02 0.500E+02
0.323E+03 0.352E+02 0.775E-01 0.500E+02
0.324E+03 0.352E+02 0.113E+02 0.500E+02
0.325E+03 0.352E+02 0.179E+02 0.500E+02
0.326E+03 0.352E+02 0.175E+02 0.500E+02
0.327E+03 0.351E+02 0.172E+02 0.500E+02
0.328E+03 0.351E+02 0.263E+02 0.500E+02
0.329E+03 0.350E+02 0.191E+02 0.500E+02
0.330E+03 0.347E+02 0.285E+02 0.500E+02
0.331E+03 0.348E+02 0.390E+02 0.500E+02
0.332E+03 0.347E+02 0.859E+01 0.500E+02
0.333E+03 0.345E+02 0.258E+02 0.500E+02
0.334E+03 0.345E+02 0.389E+02 0.500E+02
0.335E+03 0.344E+02 0.254E+02 0.500E+02
0.336E+03 0.344E+02 0.363E+02 0.500E+02
0.337E+03 0.344E+02 0.303E+02 0.500E+02
0.338E+03 0.343E+02 0.315E+02 0.500E+02
0.339E+03 0.344E+02 0.390E+02 0.500E+02
0.340E+03 0.343E+02 0.233E+02 0.500E+02
0.341E+03 0.344E+02 0.390E+02 0.500E+02
0.342E+03 0.344E+02 0.233E+02 0.500E+02
0.343E+03 0.345E+02 0.318E+02 0.500E+02
0.344E+03 0.345E+02 0.232E+02 0.500E+02
0.345E+03 0.346E+02 0.314E+02 0.500E+02
0.346E+03 0.346E+02 0.226E+02 0.500E+02
0.347E+03 0.347E+02 0.306E+02 0.500E+02
0.348E+03 0.348E+02 0.216E+02 0.500E+02
0.349E+03 0.350E+02 0.197E+02 0.500E+02
0.350E+03 0.347E+02 0.793E+01 0.500E+02
0.351E+03 0.350E+02 0.390E+02 0.500E+02
0.352E+03 0.351E+02 0.000E+00 0.500E+02
0.353E+03 0.351E+02 0.115E+02 0.500E+02
0.354E+03 0.351E+02 0.183E+02 0.500E+02
0.355E+03 0.351E+02 0.181E+02 0.500E+02
0.356E+03 0.350E+02 0.179E+02 0.500E+02
0.357E+03 0.348E+02 0.273E+02 0.500E+02
0.358E+03 0.347E+02 0.390E+02 0.500E+02
0.359E+03 0.347E+02 0.348E+02 0.500E+02
0.360E+03 0.347E+02 0.283E+02 0.500E+02
0.361E+03 0.345E+02 0.289E+02 0.500E+02
0.362E+03 0.345E+02 0.390E+02 0.500E+02
0.363E+03 0.345E+02 0.256E+02 0.500E+02
0.364E+03 0.345E+02 0.266E+02 0.500E+02
0.365E+03 0.345E+02 0.276E+02 0.500E+02
0.366E+03 0.347E+02 0.286E+02 0.500E+02
0.367E+03 0.347E+02 0.102E+02 0.500E+02
0.368E+03 0.346E+02 0.250E+02 0.500E+02
0.369E+03 0.347E+02 0.354E+02 0.500E+02
0.370E+03 0.348E+02 0.193E+02 0.500E+02
0.371E+03 0.348E+02 0.173E+02 0.500E+02
0.372E+03 0.350E+02 0.248E+02 0.500E+02
0.373E+03 0.350E+02 0.606E+01 0.500E+02
0.374E+03 0.351E+02 0.202E+02 0.500E+02
0.375E+03 0.351E+02 0.106E+02 0.500E+02
0.376E+03 0.350E+02 0.174E+02 0.500E+02
0.377E+03 0.348E+02 0.268E+02 0.500E+02
0.378E+03 0.348E+02 0.390E+02 0.500E+02
0.379E+03 0.347E+02 0.252E+02 0.500E+02
0.380E+03 0.346E+02 0.353E+02 0.500E+02
0.381E+03 0.345E+02 0.385E+02 0.500E+02
0.382E+03 0.345E+02 0.390E+02 0.500E+02
0.383E+03 0.346E+02 0.328E+02 0.500E+02
0.384E+03 0.346E+02 0.240E+02 0.500E+02
0.385E+03 0.346E+02 0.320E+02 0.500E+02
0.386E+03 0.347E+02 0.328E+02 0.500E+02
0.387E+03 0.348E+02 0.239E+02 0.500E+02
0.388E+03 0.348E+02 0.219E+02 0.500E+02
0.389E+03 0.348E+02 0.294E+02 0.500E+02
0.390E+03 0.351E+02 0.298E+02 0.500E+02
0.391E+03 0.352E+02 0.154E+01 0.500E+02
0.392E+03 0.351E+02 0.128E+02 0.500E+02
0.393E+03 0.352E+02 0.290E+02 0.500E+02
0.394E+03 0.353E+02 0.123E+02 0.500E+02
0.395E+03 0.352E+02 0.938E+01 0.500E+02
0.396E+03 0.352E+02 0.253E+02 0.500E+02
0.397E+03 0.352E+02 0.179E+02 0.500E+02
0.398E+03 0.351E+02 0.175E+02 0.500E+02
0.399E+03 0.351E+02 0.267E+02 0.500E+02
0.400E+03 0.350E+02 0.195E+02 0.500E+02
0.401E+03 0.347E+02 0.289E+02 0.500E+02
0.402E+03 0.347E+02 0.390E+02 0.500E+02
0.403E+03 0.345E+02 0.182E+02 0.500E+02
0.404E+03 0.345E+02 0.384E+02 0.500E+02
0.405E+03 0.346E+02 0.250E+02 0.500E+02
0.406E+03 0.346E+02 0.162E+02 0.500E+02
0.407E+03 0.346E+02 0.242E+02 0.500E+02
0.408E+03 0.345E+02 0.250E+02 0.500E+02
0.409E+03 0.345E+02 0.356E+02 0.500E+02
0.410E+03 0.346E+02 0.294E+02 0.500E+02
0.411E+03 0.346E+02 0.206E+02 0.500E+02
0.412E+03 0.346E+02 0.286E+02 0.500E+02
0.413E+03 0.346E+02 0.294E+02 0.500E+02
0.414E+03 0.346E+02 0.302E+02 0.500E+02
0.415E+03 0.347E+02 0.310E+02 0.500E+02
0.416E+03 0.348E+02 0.221E+02 0.500E+02
0.417E+03 0.350E+02 0.201E+02 0.500E+02
0.418E+03 0.350E+02 0.833E+01 0.500E+02
0.419E+03 0.352E+02 0.224E+02 0.500E+02
0.420E+03 0.352E+02 0.341E+01 0.500E+02
0.421E+03 0.353E+02 0.170E+02 0.500E+02
0.422E+03 0.353E+02 0.714E+01 0.500E+02
0.423E+03 0.353E+02 0.135E+02 0.500E+02
0.424E+03 0.352E+02 0.129E+02 0.500E+02
0.425E+03 0.351E+02 0.219E+02 0.500E+02
0.426E+03 0.348E+02 0.240E+02 0.500E+02
0.427E+03 0.347E+02 0.390E+02 0.500E+02
0.428E+03 0.346E+02 0.277E+02 0.500E+02
0.429E+03 0.346E+02 0.309E+02 0.500E+02
0.430E+03 0.345E+02 0.245E+02 0.500E+02
0.431E+03 0.344E+02 0.351E+02 0.500E+02
0.432E+03 0.344E+02 0.387E+02 0.500E+02
0.433E+03 0.343E+02 0.327E+02 0.500E+02
0.434E+03 0.341E+02 0.390E+02 0.500E+02
0.435E+03 0.344E+02 0.390E+02 0.500E+02
0.436E+03 0.344E+02 0.000E+00 0.500E+02
0.437E+03 0.344E+02 0.229E+02 0.500E+02
0.438E+03 0.345E+02 0.241E+02 0.500E+02
0.439E+03 0.346E+02 0.155E+02 0.500E+02
0.440E+03 0.347E+02 0.139E+02 0.500E+02
0.441E+03 0.347E+02 0.121E+02 0.500E+02
0.442E+03 0.346E+02 0.199E+02 0.500E+02
0.443E+03 0.347E+02 0.302E+02 0.500E+02
0.444E+03 0.346E+02 0.142E+02 0.500E+02
0.445E+03 0.345E+02 0.317E+02 0.500E+02
0.446E+03 0.345E+02 0.351E+02 0.500E+02
0.447E+03 0.344E+02 0.289E+02 0.500E+02
0.448E+03 0.344E+02 0.390E+02 0.500E+02
0.449E+03 0.343E+02 0.330E+02 0.500E+02
0.450E+03 0.344E+02 0.390E+02 0.500E+02
0.451E+03 0.344E+02 0.233E+02 0.500E+02
0.452E+03 0.345E+02 0.318E+02 0.500E+02
0.453E+03 0.345E+02 0.232E+02 0.500E+02
0.454E+03 0.346E+02 0.314E+02 0.500E+02
0.455E+03 0.347E+02 0.226E+02 0.500E+02
0.456E+03 0.347E+02 0.208E+02 0.500E+02
0.457E+03 0.348E+02 0.285E+02 0.500E+02
0.458E+03 0.350E+02 0.195E+02 0.500E+02
0.459E+03 0.352E+02 0.772E+01 0.500E+02
0.460E+03 0.351E+02 0.268E+01 0.500E+02
0.461E+03 0.352E+02 0.259E+02 0.500E+02
0.462E+03 0.352E+02 0.918E+01 0.500E+02
0.463E+03 0.352E+02 0.158E+02 0.500E+02
0.464E+03 0.351E+02 0.154E+02 0.500E+02
0.465E+03 0.348E+02 0.245E+02 0.500E+02
0.466E+03 0.347E+02 0.390E+02 0.500E+02
0.467E+03 0.347E+02 0.277E+02 0.500E+02
0.468E+03 0.345E+02 0.212E+02 0.500E+02
0.469E+03 0.345E+02 0.390E+02 0.500E+02
0.470E+03 0.345E+02 0.256E+02 0.500E+02
0.471E+03 0.345E+02 0.266E+02 0.500E+02
0.472E+03 0.343E+02 0.276E+02 0.500E+02
0.473E+03 0.344E+02 0.390E+02 0.500E+02
0.474E+03 0.344E+02 0.161E+02 0.500E+02
0.475E+03 0.345E+02 0.245E+02 0.500E+02
0.476E+03 0.345E+02 0.159E+02 0.500E+02
0.477E+03 0.346E+02 0.241E+02 0.500E+02
0.478E+03 0.347E+02 0.154E+02 0.500E+02
0.479E+03 0.347E+02 0.136E+02 0.500E+02
0.480E+03 0.347E+02 0.213E+02 0.500E+02
0.481E+03 0.347E+02 0.219E+02 0.500E+02
0.482E+03 0.348E+02 0.225E+02 0.500E+02
0.483E+03 0.348E+02 0.134E+02 0.500E+02
0.484E+03 0.348E+02 0.209E+02 0.500E+02
0.485E+03 0.348E+02 0.213E+02 0.500E+02
0.486E+03 0.348E+02 0.217E+02 0.500E+02
0.487E+03 0.348E+02 0.221E+02 0.500E+02
0.488E+03 0.347E+02 0.225E+02 0.500E+02
0.489E+03 0.346E+02 0.326E+02 0.500E+02
0.490E+03 0.346E+02 0.358E+02 0.500E+02
0.491E+03 0.346E+02 0.294E+02 0.500E+02
0.492E+03 0.346E+02 0.302E+02 0.500E+02
0.493E+03 0.347E+02 0.310E+02 0.500E+02
0.494E+03 0.346E+02 0.221E+02 0.500E+02
0.495E+03 0.346E+02 0.390E+02 0.500E+02
0.496E+03 0.346E+02 0.326E+02 0.500E+02
0.497E+03 0.346E+02 0.334E+02 0.500E+02
0.498E+03 0.347E+02 0.342E+02 0.500E+02
0.499E+03 0.348E+02 0.253E+02 0.500E+02
0.500E+03 0.348E+02 0.233E+02 0.500E+02
0.501E+03 0.350E+02 0.308E+02 0.500E+02
0.502E+03 0.351E+02 0.120E+02 0.500E+02
0.503E+03 0.351E+02 0.165E+02 0.500E+02
0.504E+03 0.353E+02 0.233E+02 0.500E+02
0.505E+03 0.353E+02 0.421E+01 0.500E+02
0.506E+03 0.354E+02 0.175E+02 0.500E+02
0.507E+03 0.355E+02 0.754E+01 0.500E+02
0.508E+03 0.355E+02 0.428E+01 0.500E+02
0.509E+03 0.355E+02 0.102E+02 0.500E+02
0.510E+03 0.354E+02 0.926E+01 0.500E+02
0.511E+03 0.352E+02 0.177E+02 0.500E+02
0.512E+03 0.351E+02 0.290E+02 0.500E+02
0.513E+03 0.348E+02 0.241E+02 0.500E+02
0.514E+03 0.346E+02 0.390E+02 0.500E+02
0.515E+03 0.346E+02 0.374E+02 0.500E+02
0.516E+03 0.345E+02 0.239E+02 0.500E+02
0.517E+03 0.343E+02 0.345E+02 0.500E+02
0.518E+03 0.343E+02 0.390E+02 0.500E+02
0.519E+03 0.341E+02 0.259E+02 0.500E+02
0.520E+03 0.341E+02 0.390E+02 0.500E+02
0.521E+03 0.343E+02 0.262E+02 0.500E+02
0.522E+03 0.343E+02 0.820E+01 0.500E+02
0.523E+03 0.343E+02 0.241E+02 0.500E+02
0.524E+03 0.341E+02 0.256E+02 0.500E+02
0.525E+03 0.344E+02 0.390E+02 0.500E+02
0.526E+03 0.344E+02 0.000E+00 0.500E+02
0.527E+03 0.345E+02 0.229E+02 0.500E+02
0.528E+03 0.345E+02 0.143E+02 0.500E+02
0.529E+03 0.345E+02 0.225E+02 0.500E+02
0.530E+03 0.345E+02 0.235E+02 0.500E+02
0.531E+03 0.345E+02 0.245E+02 0.500E+02
0.532E+03 0.345E+02 0.255E+02 0.500E+02
0.533E+03 0.345E+02 0.265E+02 0.500E+02
0.534E+03 0.346E+02 0.275E+02 0.500E+02
0.535E+03 0.345E+02 0.187E+02 0.500E+02
0.536E+03 0.346E+02 0.366E+02 0.500E+02
0.537E+03 0.345E+02 0.206E+02 0.500E+02
0.538E+03 0.345E+02 0.384E+02 0.500E+02
0.539E+03 0.346E+02 0.322E+02 0.500E+02
0.540E+03 0.345E+02 0.235E+02 0.500E+02
0.541E+03 0.344E+02 0.390E+02 0.500E+02
0.542E+03 0.346E+02 0.390E+02 0.500E+02
0.543E+03 0.347E+02 0.135E+02 0.500E+02
0.544E+03 0.350E+02 0.189E+02 0.500E+02
0.545E+03 0.351E+02 0.000E+00 0.500E+02
0.546E+03 0.353E+02 0.115E+02 0.500E+02
0.547E+03 0.353E+02 0.000E+00 0.500E+02
0.548E+03 0.353E+02 0.133E+02 0.500E+02
0.549E+03 0.352E+02 0.127E+02 0.500E+02
|
e00a6ae7299e288ed6f7524d8996949a9a994f32 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3673/CH5/EX5.10/Ex5_10.sce | 18d45391b26a9cdd8efde7ec76f20ab79b5d672c | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 762 | sce | Ex5_10.sce | //Example 5_10 page no:200
clc
funcprot(0);
function [r,th]=rect2pol(x,y)
//rectangle to polar coordinate conversion
r=sqrt(x^2+y^2);
th=atan(y,x)*180/3.14;
endfunction
V=20//input voltage
f=50//frequency in Hz
R1=10//resistance in ohm
R2=20//resistance in ohm
L=0.1//inductance in henry
Xl=2*%pi*f*L*%i
Zt=R1+((R2*Xl)/(R2+Xl))
disp(Zt,"impedance is (in ohm)")
[mag,theta]=rect2pol(real(Zt),imag(Zt))
disp("In polar form")
disp(mag,"magnitude is (in ohm)")
disp(theta,"angle is (in degree)")
It=V/Zt
disp(It,"the current is (in A)")
[mag,theta]=rect2pol(real(It),imag(It))
disp("In polar form")
disp(mag,"magnitude is (in A)")
disp(theta,"angle is (in degree)")
disp(-theta,"the phase angle between current and voltage is(in degree)")
|
ce09580acaf16df13a266eb5cd6289681f769de9 | 430e7adb489914d378a5b0a27d8d41352fa45f3a | /scilab/example/ステップ応答シミュレーション.sce | efc3c42f54d5af56f7e6e78d28d8405ae34ba95b | [] | no_license | ziaddorbuk/Lesson | 04906ff94bf8c1f6bbc6971d5692ae011a9b8869 | 20fe20a6c9c145ef48a35574d885d3952f9ab6ff | refs/heads/master | 2021-09-23T11:48:05.958608 | 2018-04-30T01:54:13 | 2018-04-30T01:54:13 | null | 0 | 0 | null | null | null | null | SHIFT_JIS | Scilab | false | false | 241 | sce | ステップ応答シミュレーション.sce | //ステップ応答シミュレーション
A=[-1 0;1 -2]; b=[0;1]; c=[1 1]; x0=[1;0];
sys=syslin('c',A,b,c);
t=0:0.01:10;
y=csim('step',t,sys,x0);
clf(); plot2d(t,y,rect=[0,0,10,1.5])
xtitle("Step responce","time [s]","output y")
|
ba0123ca2c72ce88cb0fc79a8d0b2b260fbe0510 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.5/tests/examples/eqfir.man.tst | 66a6604278a6b5e91b24944ca834e241467bb97a | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 103 | tst | eqfir.man.tst | clear;lines(0);
hn=eqfir(33,[0 .2;.25 .35;.4 .5],[0 1 0],[1 1 1]);
[hm,fr]=frmag(hn,256);
plot(fr,hm),
|
4908bcd2c7f4e67c588754e32f9437c113ce0606 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3537/CH2/EX2.19/Ex2_19.sce | 28cc60d3ce4840b5ffd41b636cbb74570124316e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 315 | sce | Ex2_19.sce | //Example 2_19
clc();
clear;
//To calculate the wavelength of the spectral line
n=2
N=4250 //units in centimeters
theta=30 //units in degrees
lemda=(((1/N)*sin(theta*%pi/180))/n)*10^8
printf("The wavelength of the spectral line is %.0f angstrom",lemda)
|
cfca696178ef30ad54fc92e1586165e51d4bba19 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2318/CH4/EX4.13/ex_4_13.sce | ee6fa514881ea1157001069e9a7dfdde485a5ee2 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 437 | sce | ex_4_13.sce | //Example 4.13:resistance and reactance
clc;
clear;
close;
r1=2;//ohm
r2=9;//
imp=r1+%i*r2;//ohm
mg=sqrt(r1^2+r2^2);//
th=atand(r2/r1);//
vm=85;//V
va=40;//degree
vm1=90;//V
va1=45;//degree
ccm=vm/mg;//A
cca=va-th;//degree
impm=vm1/ccm;//ohm
impa=va1-cca;//degree
reac=impm*sind(impa);//ohm
rc=sqrt(impm^2-reac^2);//ohm
f=50;//Hz
ind=reac/(2*%pi*f);//
disp(rc,"reactance is,(ohm)=")
disp(fix(ind*10^3),"inductance of the coil is,(mH)=")
|
a1a564786547894d47ff5ee7ab7db6cb1191cef9 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.3/macros/metanet/graph_power.sci | 54f2b4944e2fd932d3d4c55130621fea36d0f3e0 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain"
] | permissive | clg55/Scilab-Workbench | 4ebc01d2daea5026ad07fbfc53e16d4b29179502 | 9f8fd29c7f2a98100fa9aed8b58f6768d24a1875 | refs/heads/master | 2023-05-31T04:06:22.931111 | 2022-09-13T14:41:51 | 2022-09-13T14:41:51 | 258,270,193 | 0 | 1 | null | null | null | null | UTF-8 | Scilab | false | false | 601 | sci | graph_power.sci | function [g1]=graph_power(g,k)
[lhs,rhs]=argn(0)
if rhs<>2 then error(39), end
// check g
check_graph(g)
if g('directed')<>1 then
error('The graph must be directed')
end
// check k
if k<1 then
error('Power must be greater than 0')
end
if k==1 then
g1=g; return;
end
//graph power
ta=g('tail');he=g('head');
n=g('node_number');
X=sparse([ta' he'],ones(ta)',[n n]);Y=X;Z=X;
for i=2:k,
Y=Y*X;
[ij,v,mn]=spget(Y);
if (v <> []) then
Z=Z+Y;i=k;
end;
end;
[ij,v,mn]=spget(Z);
ta=[ij(:,1)'];he=[ij(:,2)'];
g1=make_graph('foo',1,n,ta,he);
g1('node_x')=g('node_x');g1('node_y')=g('node_y');
|
ff55d8fc6c620b24e4329f50b2e3419c339327a2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1571/CH7/EX7.5/Chapter7_Example5.sce | 69b3af2ba76bc4043995cd521a4c11f11c5f7530 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 225 | sce | Chapter7_Example5.sce | clc
clear
//INPUT
tc=5.26;//critical temperature of the helium in K
//CALCULATIONS
ti=27*tc/4;//inversion temperature of the helium in K
//OUTPUT
mprintf('the inversion temperature of the helium is %3.2f K',ti)
|
096534a0076a88fc141032bb6c1b8d3b59d229f8 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3472/CH11/EX11.4/Example11_4.sce | 8c25ec5408997d8f926d57d73dbbcf5d42835fa6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 990 | sce | Example11_4.sce | // A Texbook on POWER SYSTEM ENGINEERING
// A.Chakrabarti, M.L.Soni, P.V.Gupta, U.S.Bhatnagar
// DHANPAT RAI & Co.
// SECOND EDITION
// PART II : TRANSMISSION AND DISTRIBUTION
// CHAPTER 4: OVERHEAD LINE INSULATORS
// EXAMPLE : 4.4 :
// Page number 184-185
clear ; clc ; close ; // Clear the work space and console
// Given data
V_3 = 17.5 // Voltage across line unit(kV)
c = 1.0/8 // Shunt capacitance = 1/8 of insulator capacitance
n = 3.0 // Number of insulators
// Calculations
K = c // String constant
V_1 = V_3/(1+3*K+K**2) // Voltage across top unit(kV)
V_2 = (1+K)*V_1 // Voltage across middle unit(kV)
V = V_1+V_2+V_3 // Voltage between line & earth(kV)
eff = V*100/(n*V_3) // String efficiency(%)
// Results
disp("PART II - EXAMPLE : 4.4 : SOLUTION :-")
printf("\nLine to neutral voltage, V = %.2f kV", V)
printf("\nString efficiency = %.2f percent", eff)
|
ffc7175145d594201987758717f0062cc96f2a3a | 449d555969bfd7befe906877abab098c6e63a0e8 | /3822/CH3/EX3.4/Ex3_4.sce | eb66f500d31667a14048585c255d7aab99926cb8 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 695 | sce | Ex3_4.sce |
//Optoelectronics and Fiber Optics Communication by C.R. Sarkar and D.C. Sarkar
//Example 3.4
//OS = Windows 7
//Scilab version 5.5.2
clc;
clear;
//given
a=4*10^-6;//radius in m
n1=1.5;//core refractive index
lamda=1.55*10^-6;//operating wavelength in m
delta=0.003;//relative refractive index difference between core and cladding
c=(2*delta)^0.5;//constant value
lamdac=(c*2*%pi*a*n1)/2.405;//cut off wavelength for mono mode
Rcs=(20*lamda)/((delta)^1.5)*((2.748-((0.996)*(lamda/lamdac)))^-3);//critical radius of curvature
mprintf("\n Critical radius of curvature is= %.2fmm",Rcs*1e3);//multiplication by 1e3 to convert unit to mm//the answer given in textbook is wrong
|
15627cc6244ab26ea7609637eeb27d4b57ec5592 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3792/CH6/EX6.5/Ex6_5.sce | 104694086ec0aeb5b593e347b387a9ddfa62f0f6 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 963 | sce | Ex6_5.sce | // SAMPLE PROBLEM 6/5
clc;funcprot(0);
// Given data
r=6/12;// ft
mu_s=0.15;// The coefficients of static friction
mu_k=0.12;// The coefficients of kinetic friction
theta=20;// degree
g=32.2;// The acceleration due to gravity in ft/sec^2
x=10;// ft
// Calculation
// SigmaF_x=m*abar_x----> mg*sind(theta)-F=m*abar
// SigmaF_x=m*abar_y----> N-mg*cosd(theta)=0
// SigmaM_G=Ibar*alpha---> F*r=m*r^2*alpha
abar=(g/2)*sind(theta);// ft/sec^2
// SigmaM_G=Ibar*alpha+m*abar*d----->mgr*sin(theta)=mr^2*(abar/r)+ m*abar*r
// From the above equations,we solve using the coefficients of mg
F=sind(theta)-(sind(theta))/2;// N
N=cosd(theta);// N
F_max=mu_s*N;// N
F=mu_k*N;// N
// SigmaF_x=m*abar_x
abar=(sind(theta)-F)*g;// ft/sec^2
alpha=(F*g)/r;// rad/sec^2
t=sqrt((2*x)/abar);// sec
printf("\nThe angular acceleration of the hoop,alpha=%1.2f ft/sec^2 \nThe time t for the hoop to move a distance of 10 ft down the incline,t=%1.3f sec",alpha,t);
|
1d337eae8dc4f0f75ae223ca762910b68dbdcb9d | 449d555969bfd7befe906877abab098c6e63a0e8 | /710/CH6/EX6.10/6_10.sci | 0855214d13be659fc68967438350fdb4895af519 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 620 | sci | 6_10.sci | clc();
clear;
//To determine the wavelength of light incident on a quartz plate
delta=50; //phase difference
mewE=1.544; //refractive index of extraordinary waves
mew0=1.553; //refractive index of ordinary waves
t=8; //thickness in nm
lambda=((2*180)/delta)*(mew0-mewE)*t*10^-6*10^9 //mew0>mewE
printf("The wavelength of light incident is %f nm",lambda); |
1bbbca9f10b76d76c4531deb82dc7222d2d7800a | 449d555969bfd7befe906877abab098c6e63a0e8 | /692/CH2/EX2.3/P2_3.sce | 2bde6f5ad9f7081de9a8e19965aa92c9137963fb | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 333 | sce | P2_3.sce | //EXAMPLE 2.3, Basic ops on unequal length sequence
clear;
clc;
c=[3.2 41 36 -9.5 0];
disp(c,'c = ');
g=[-21 1.5 3];
disp(g,'g = ');
a=length(g);
b=length(c);
i=0;
while(i<b-a)
g(b-i)=0;
i=i+1;
end
w4=g.*c;
disp(w4,'The product of two sequences is =');
w5=c+g;
disp(w5,'The addition of two sequences is =');
|
3d436250eb3460255407a9303df4cd386c24bcab | 7e1b0b7ceda8e9c25d67d330a7bb5e562a01f27a | /ProbInverses/CCRegLineaire/CCquestionCetD.sce | acc67f3fddf354989cc4c92581f2a06f53ade008 | [] | no_license | sebherv/master2 | 59b8232e62bef140636bfad8c986bbd10e7d7beb | b8cd8bcde1ae3ae7a5bca58183804faa21456dd8 | refs/heads/master | 2021-09-13T19:33:50.766722 | 2018-02-09T15:09:24 | 2018-02-09T15:09:24 | 103,376,025 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 906 | sce | CCquestionCetD.sce | clear;
getd();
// Get data from file
disp("Loading ballistic data file...");
DATA=fscanfMat('BallisticsDataFile.txt');
d=DATA(:,2);
t=DATA(:,1);
// Create G from the time data
disp("Creating matrix G...");
n=size(t)(1);
G=ones(n,1);
G=[G t -0.5*t^2];
// Compute model
disp("Computing model...");
m=inv(G'*G)*G'*d;
// Compute Model covariance matrix
disp("Computing Model covariance matrix...");
Cm = inv(G'*G);
// Chi Squared for different nu's at p = 95%
ChiSqNu1 = 3.96;
ChiSqNu2 = 5.99;
ChiSqNu3 = 7.81;
disp("Computing Confidence Interval for Chi Squared for 1 degre of liberty, at p=95%")
deltaM_Nu1 = sqrt(ChiSqNu1 * diag(Cm));
disp(deltaM_Nu1, "deltaM_Nu1 =","Question c: delta M for nu = 1;");
disp("Computing Confidence Interval for Chi Squared for 2 degre of liberty, at p=95%")
deltaM_Nu2 = sqrt(ChiSqNu2 * diag(Cm));
disp(deltaM_Nu2, "deltaM_Nu2 =","Question c: delta M for nu = 2;");
|
3b7329cbd04de8446e20a1ad8f5500256ad3baab | 668ca4e9ddcb0e4af73b341adf7dc544e552980d | /笔记/XML.tst | 47d381472c7cbe58d305723dbc917f4f11c030f0 | [] | no_license | ysily8817/biji | 6d5c70e681d9753597557a3204d8b6f69a5b2d7b | 15ff1b882a6e107caea02401bc384a38ceb1c4d6 | refs/heads/master | 2022-06-25T07:41:45.485965 | 2019-09-30T04:14:12 | 2019-09-30T04:14:12 | 199,145,828 | 0 | 0 | null | 2022-06-21T01:36:05 | 2019-07-27T09:44:03 | Scilab | UTF-8 | Scilab | false | false | 547 | tst | XML.tst | 一、XML:可扩展的标记语言
二、XML的作用
1、可以用来保存数据
2、可以用来做配置文件
3、数据传输载体
三、XML文档声明
1、简单声明,version:解析这个xml的时候,使用什么版本的解析器解析
<?xml version="1.0"?>
2、encoding:解析xml中的文字的时候,使用什么编码来翻译
<?xml version="1.0" encoding="UTF-8"?>
3、standlone:no-该文档会依赖于其他文档,yes-表示是一个独立文档
<?xml version="1.0" encoding="UTF-8" standlone="no"?> |
bc8a80c70d03c72f4be2f44850f2c61dcd513a7f | 449d555969bfd7befe906877abab098c6e63a0e8 | /3544/CH2/EX2.25/Ex2_25.sce | 676729f597946069fa1c4fa864bb6081248e8ef7 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 1,049 | sce | Ex2_25.sce | //Encryption process in Playfair cipher
// Move scilab to current file directory
[u,t,n] = file()
n = strcat(n)
file_name = basename(n)+fileext(n)
file_name = strcat(file_name)
ind=strindex(n,file_name)
path = part(n,1:ind-1)
chdir(path)
exec("Chapter_2.sci",-1)
//Playfair cipher key
key = "PLAYFAIR EXAMPLE"
disp("Original plaintext:")
pt = "MY NAME IS ATUL."
disp(pt)
//Using functions from dependency file to reformat the input
pt = playfair_pt(pt) // substituting J to I and handling duplicates
pt_digram = digram_array(pt) // converting to digrams
disp("Plaintext message broken down into pair of elements:")
print_matrix(pt_digram,0)
disp("")
a = ascii('A')
key_matrix = playfair_matrix(key);
// mat contains ascii values of characters of playfair matrix
//Use "disp(mat)" to verify this
disp("Playfair Cipher Key matrix: ")
print_matrix(key_matrix,1)
//disp(pt_matrix)
ct_mat = encrypt_playfair(pt_digram,key_matrix)
disp("Playfair ciphertext:")
print_matrix(ct_mat,0)
|
5b51fbb39723c9f00810312bd8389bcfcfd42cc7 | 42fdf741bf64ea2e63d1546bb08356286f994505 | /test_20160829_nFETpFET_Id_char/pFET_IdVd.sce | b50706317f467485d0ea86a641987aed85babc97 | [] | no_license | skim819/RASP_Workspace_sihwan | 7e3cd403dc3965b8306ec203007490e3ea911e3b | 0799e146586595577c8efa05c647b8cb92b962f4 | refs/heads/master | 2020-12-24T05:22:25.775823 | 2017-04-01T22:15:18 | 2017-04-01T22:15:18 | 41,511,563 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,945 | sce | pFET_IdVd.sce | unix_g('sudo chmod 777 /dev/prologix');
h=openserial("/dev/prologix", "9600,n,8,1"); //please make sure all the tty values are correct before starting the program.
writeserial(h,"++addr 15"+ascii(10));
unix_w("sleep 1");
writeserial(h,"++auto 1"+ascii(10));
unix_w("sleep 1");
writeserial(h,"SYST:ZCH 0"+ascii(10));
pFET_dCTRL=[(0:0.1:2.3)'; (2.305:0.005:2.45)'; (2.46:0.01:2.5)';];
//pFET_dCTRL=[0.0;1;2.4;2.41;2.42;2.43;2.44;2.45;2.5];
size_pFET_dCTRL=size(pFET_dCTRL);
for i_pFET_d=1:size_pFET_dCTRL(1,1)
unix_g('sudo dwfcmd connect target=analogout channel=0 enable=1 function=dc offset="+string(pFET_dCTRL(i_pFET_d,1))+"V run=0 start finish');
writeserial(h,"READ?"+ascii(10)); xpause(3000000); temp_a=readserial(h); temp_b=part(temp_a,1:14); current(1,1)=msscanf(temp_b,"%lg");
while current ==[]
unix_g('sudo chmod 777 /dev/prologix'); h=openserial("/dev/prologix", "9600,n,8,1"); writeserial(h,"++addr 15"+ascii(10)); unix_w("sleep 1"); writeserial(h,"++auto 1"+ascii(10)); unix_w("sleep 1"); writeserial(h,"SYST:ZCH 0"+ascii(10));
writeserial(h,"READ?"+ascii(10)); xpause(3000000); temp_a=readserial(h); temp_b=part(temp_a,1:14); current(1,1)=msscanf(temp_b,"%lg");
end
unix_g('sudo dwfcmd connect target=analogout channel=0 enable=1 function=dc offset="+string(pFET_dCTRL(i_pFET_d,1))+"V run=0 start watch=2s analogin record channel=1 enable=1 range=2V offset=0 frequency=1k run=0.01s start save=null_data.csv');
pFET_dCTRL(i_pFET_d,2)=abs(current);
disp('S: 0V V D:'+string(pFET_dCTRL(i_pFET_d,1))+'V Current:'+string(current));
end
csvWrite(pFET_dCTRL,'data_pFET_IdVd.csv');
disp("done");
pFET_IdVd=csvRead('data_pFET_IdVd.csv');
scf(6);clf(6);
plot2d("nl", pFET_IdVd(:,1), pFET_IdVd(:,2));p = get("hdl"); p.children.mark_style = 9; p.children.thickness = 3; p.children.line_mode="off";p.children.mark_foreground=1;
a=gca();a.data_bounds=[0 1e-11; 2.5 1e-4];
xtitle("","Vd(V)","Id(A)");
|
6ec0cb19edab23bb6660c26a3f80f431b47013f5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1529/CH6/EX6.18/6_18.sce | 52e008ddfa9367790d6e8f6e59a29f7eb99817de | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 304 | sce | 6_18.sce | //Chapter 6, Problem 18
clc;
Q=10*10^-3; //Charge
W=1.2; //Energy stored
V=(2*W)/Q; //Calculating voltage
C=Q/V; //Calculating capacitance
disp("(a)");
printf("Voltage = %f V\n\n",V);
disp("(b)");
printf("Capacitance = %f uF",C*10^6);
|
5502b50779ab2697b66ee6c0738059bbbafa736b | 449d555969bfd7befe906877abab098c6e63a0e8 | /2510/CH14/EX14.4/Ex14_4.sce | 22b0d7621055a4e3bbf3c9dc3dd7341c5a786b9d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 273 | sce | Ex14_4.sce | //Variable declaration:
Ts = 100.0 //Steam temperature at 1 atm (°C)
Tl = 25.0 //Fluid temperature (°C)
//Calculation:
DTlm = Ts - Tl //Log mean temperature difference (°C)
//Result:
printf("The LMTD is : %f °C.",DTlm)
|
9fcf8b17c89ffcb36382fa07054dd70cc3c4d46c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1673/CH7/EX7.15/7_15.sce | 4cd4ffae8b7b537c1c5d736c3cfc5ada8343130e | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 537 | sce | 7_15.sce | //eigenvalues and eigenvectors
//example 7.15
//page 285
clc;clear;close
A=[5 0 1;0 -2 0;1 0 5];
x=poly(0,'x');
for i=1:3
A(i,i)=A(i,i)-x;
end
d=determ(A);
X=roots(d);
printf(' the eigen values are \n\n')
disp(X);
X1=[0;1;0]
X2=[1/sqrt(2);0;-1/sqrt(2)];
X3=[1/sqrt(2);0;1/sqrt(2)];
//after computation the eigen vectors
printf('the eigen vectors for value %0.2g is',X(3));
disp(X1);
printf('the eigen vectors for value %0.2g is',X(2));
disp(X2);
printf('the eigen vectors for value %0.2g is',X(1));
disp(X3);
|
c3df6ec7395d43c2edb5ed0077f6a524f38e4f42 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3116/CH15/EX15.2/Ex15_2.sce | 6d5926dfa737f2b1c44b228bb0b6a02e993438f3 | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 421 | sce | Ex15_2.sce |
clc
printf(" Example 15.2\n")
E_gf=69 // Elasticity of glass fibre in GPa
mf_gf=0.4 //Volume percentage of glass fibre
E_pr=3.4 // Elasticity of polyester resin in GPa
mf_pr=0.6 //Vol percentage of polyester resin
E_ct=E_pr*E_gf/((E_pr*mf_gf)+(E_gf*mf_pr)) // Calculation of modulus of elasticity in GPa
printf("\n In transverse direction, modulus of elasticity is %.1f GPa.\n",ceil(E_ct*10)/10)
|
12f4df239f962cb73d0fb63ca0b6d16127cd7e69 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1646/CH1/EX1.17/Ch01Ex17.sce | eb8357765900181e6da16b00276ad108fd3a2a5a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 704 | sce | Ch01Ex17.sce | // Scilab Code Ex1.17: Page:35 (2011)
clc;clear;
c = 3e+008; // Speed of light in vacuum, unit
m0 = 9.1e-031; // Rest mass of the electron, kg
E_k = 0.1*1e+006*1.6e-019; // Kinetic energy of the electron, J
v = sqrt(2*E_k/m0); // Classical speed of the electron, m/s
printf("\nThe classical speed of the electron = %5.3e m/s", v);
// As E_k = (m-m0)*c^2 = (1/sqrt(1-v^2/c^2)-1)*m0*c^2, solving for v
v = c*sqrt(1-(m0*c^2/(E_k+m0*c^2))^2); // Relativistic speed of the electron, m/s
printf("\nThe relativistic speed of the electron = %5.3e m/s", v);
// Result
// The classical speed of the electron = 1.875e+008 m/s
// The relativistic speed of the electron = 1.644e+008 m/s |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.