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
c0bc3de77f005bfeee1438e41a902185bef9b3c4
a27117f570df5615cbad07adf0e508ac092b0f9d
/prob2.sce
981611161cbe8aa22e8665b5b91ab5b44afd97b6
[]
no_license
SammithSB/Scilab-Assignment
e8243b5092c0689f52c034818b349327bcfd3f33
99345a4f72a33990147318d963ff81b966c7944d
refs/heads/main
2023-04-08T11:44:56.996159
2021-04-23T12:16:33
2021-04-23T12:16:33
360,826,533
0
0
null
null
null
null
UTF-8
Scilab
false
false
496
sce
prob2.sce
//Find the triangular factors L and U for the matrix A = [1,2,4;0.5,6,3;0.2,-2,9] clc;clear; A=[1,2,4;0.5,6,3;0.2,-2,9]; U=A; disp(A,'The given matrix is A=') m = det(U(1,1)); n = det(U(2,1)); a=n/m; U(2,:) = U(2,:) - U(1,:)/(m/n); n = det(U(3,1)); b= n/m; U(3,:) = U(3,:) - U(1,:)/(m/n); m = det(U(2,2)); n = det(U(3,2)); c = n/m; U(3,:) = U(3,:) - U(2,:)/(m/n); disp(U,'The upper triangular matrix is U =') L=[1,0,0;a,1,0;b,c,1]; disp(L,'The lower triangular matrix is L =')
47ed90ba28c313ebea2102da17829206d0c3b544
449d555969bfd7befe906877abab098c6e63a0e8
/443/DEPENDENCIES/8_2_data.sci
4ef1226b874215332e582b62cc86704d19d9c942
[]
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
288
sci
8_2_data.sci
//Bore of the engine(in cm) D=10; //Length of stroke for square engine(in cm) L=10; //Number of cylinders k=4; //Volumetric effciency nv=0.75; //Speed(in rev/s) N=40; //Density of air Pa=1.15; //Coefficient of air flow Cd=0.75; //Area of orifice(in m^2) A2=0.25*%pi*0.03^2;
d1904e19af471128ffddd0e0341200ea9d3b3ceb
449d555969bfd7befe906877abab098c6e63a0e8
/3828/CH13/EX13.1/Ex13_1.sce
897bdfbaf15f3a3428a3090984d78dab0504fa41
[]
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
289
sce
Ex13_1.sce
//Chapter 13 : Thin Film Preparation Techniques and their Applications clear; //Variable declaration delV1=2*10**-3 //milivolts to volts delI1=4*10**-6 //microAmpere to Ampere //Calculations Rs=delV1/delI1 //Result mprintf("Series Resistance = %d V/m",Rs)
01d088c6829d4cd71031be3a95934dffb1a53ea5
a3821dccf6d2cf3720781d6ed6b66c49e03cdab4
/Source/WebContent/TypeScript/Api/Enum.tst
eee038cc75f782a338350b794f4603f9fa41bbd4
[]
no_license
backlof/Imglib
9cfb1047b766f9e05f69f3b32eea1c4e463187f0
f7d16e0be0e286dde7cb62a6576f73015cbba397
refs/heads/master
2021-05-07T06:58:05.503869
2018-02-07T12:48:29
2018-02-07T12:48:29
111,833,115
0
0
null
null
null
null
UTF-8
Scilab
false
false
340
tst
Enum.tst
${ using Typewriter.Extensions.Types; Template(Settings settings) { settings.IncludeProject("Host"); settings.OutputFilenameFactory = (file) => { return file.Name.Replace(".cs", ".ts"); }; } }namespace Api {$Enums(x => x.Namespace == "Imglib.Host.Controller.Model")[ export enum $Name {$Values[ $Name = $Value][,] } ]}
7dd7f96701d7e90c3e3aea874b91757be6d2ae73
449d555969bfd7befe906877abab098c6e63a0e8
/2333/CH3/EX3.25/25.sce
0436bc31f38feff4e140f00f1f5a9aa4cdfffafa
[]
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
424
sce
25.sce
clc // Given that lambda = 5893 // mean wavelength in angstrom n = 2 // order N = 5000 // Grating lines per cm theta = 2.5 // Separation in second // Sample Problem 25 on page no. 166 printf("\n # PROBLEM 25 # \n") d_theta = %pi/180*theta/60 // Angle in radian d_lambda = d_theta*sqrt((1/(n*N)^2)-(lambda*1e-8)^2) // Difference in wavelengths printf("Difference in wavelengths is %f angstrom.",d_lambda*1e8)
07fe9872c8f14a70134bb9fd39788cc3a56a1679
449d555969bfd7befe906877abab098c6e63a0e8
/704/CH3/EX3.27/ex3_27.sce
27b86e778e2247e2b3c65a296e8d7aeaa9f31bec
[]
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,365
sce
ex3_27.sce
//Caption:In a single phase transformer Calculate (a)The efficiency at full load, unity power factor. (b)The efficiency at full load, 0.8 lagging power factor. (c)The efficiency at full load, 0.8 leading power factor. //Exam:3.27 clc; clear; close; P_f1=1;//power factor unity P_f2=0.8;//power factor 0.8 lagging or leading KVA=25;//Rating of the transformer(in KVA) O_p1=KVA*P_f1;//Output at unity power factor(in KW) P_c=400;//copper losses(in Watt) P_C=P_c/1000;//copper losses(in KW) P_i=320;//iron losses(in Watt) P_I=P_i/1000;//iron losses(in KW) P_T=P_I+P_C;//total losses(in KW) I_p1=O_p1+P_T;//Input (in KW) E_f1=(O_p1/I_p1)*100;//Efficiency of the transformer at full load and unity power factor(in %) disp(E_f1,'Efficiency of the transformer at full load and unity power factor(in %)='); O_p2=KVA*P_f2;//output at 0.8 lagging power factor(in KW) I_p2=O_p2+P_T;//input incase of 0.8 power factor(in KW) E_f2=(O_p2/I_p2)*100;//Efficiency of the transformer at full load and 0.8 lagging power factor(in %) disp(E_f2,'Efficiency of the transformer at full load and 0.8 lagging power factor(in %)='); E_f3=E_f2;//At 0.8 leading power factor. since there is no change in input and output, so efficiency is unchanged disp(E_f3,'At 0.8 leading power factor. since there is no change in input and output, so efficiency is unchanged(in %)=');
5275e346803dc42e06356a5f6368c4a92bdc2acb
b39dfe4655bc09a15e7cf35b887e89ef12f4c8e5
/Atividade 5/PME3402_Grupo13_Atividade5.sce
31b28284e647712ead48159a3e55af8cfc7c86d8
[]
no_license
vitoramr/PME3402-Laboratorio-de-Medicao-e-Controle-Discreto
6a57131edff44859fb5c2c1c5b0dea0cc37735da
8228b3ae442a3bb64208c924afc0daf418abe3c2
refs/heads/master
2023-01-09T23:08:48.007029
2020-11-19T22:43:27
2020-11-19T22:43:27
288,795,340
1
0
null
null
null
null
UTF-8
Scilab
false
false
19,020
sce
PME3402_Grupo13_Atividade5.sce
/* ============================================================================= Escola Politécnica da USP PME3402 - Laboratório de Medição e Controle Discreto -------------------------------------------------------------- ATIVIDADE 5 - CONTROLE DE MOTOR POR PID DISCRETO -------------------------------------------------------------- GRUPO 13 Membros: Tiago Vieira de Campos Krause Vinicius Rosario Dyonisio Vítor Albuquerque Maranhao Ribeiro Vitória Garcia Bittar -------------------------------------------------------------- Professores responsáveis: Edilson Hiroshi Tamai Flávio Trigo ============================================================================= Esse programa foi desenvolvido no Scilab 6.1 INSTRUÇÕES PARA RODAR O PROGRAMA Antes de rodar o programa, siga os seguintes passos 1) Certifique-se de que o Scilab está aberto na pasta "/Atividade 5/" em que o programa se encontra 2) Certifique-se de que os dados do sensor Ultrassônico estão na pasta "/Atividade 5/Processing_save_serial" dentro da pasta do programa 3) Rode o programa */ //LIMPEZA DE MEMÓRIA clear; clc; // Limpeza de variáveis e do console xdel(winsid()); // Fecha as janelas abertas // ============================================================================= // CARREGAMENTO DOS DADOS // ============================================================================= // Lendo arquivos data_folder = 'Processing_save_serial' file_names = [ 'Leitura_Sensor_10_14_15_35_4.csv', // T = 2, Sinal varia de 0 a 5V ( velocidade = (255/2)*sin(w*t) + (255/2) ) 'Leitura_Sensor_10_14_15_39_44.csv', // T = 2, Sinal varia de 0 a 5V ( velocidade = (255/2)*sin(w*t) + (255/2) ) 'Leitura_Sensor_10_14_15_49_25.csv', // T = 1, Sinal da velocidade = 105 + 50*sin(w*t) 'Leitura_Sensor_10_14_15_52_23.csv', // T = 0.5 , Sinal varia de 0 a 5V ( velocidade = (255/2)*sin(w*t) + (255/2) ) ]; //Ordem de chamada: csvRead(filename, separator, decimal, conversion, substitute, regexpcomments, range, header) function [t,d,u] = data_read(data_folder,filename, plot_signal) // Obtendo os caminhos de cada arquivo do experimento base_path = pwd(); // Diretório atual onde o programa está s = filesep(); // Separador de arquivos para o OS atual ( '\' para Windows e '/' para Linux) data_directory = base_path + s + data_folder; sensor = csvRead(data_directory + s + filename, ',','.','double', [], [], [], 1 ); t = sensor(:,1) / 1000; // Sinal está em ms d = sensor(:,2); // Sinal do sensor em cm u = sensor(:,3)*5/255; // Sinal tem a tensão entre 0 --> 0V e 255 --> 5V // Plotagem dos gráficos individuais if plot_signal then cores = [ 'blue4', 'deepskyblue3', 'aquamarine3', 'springgreen4', 'gold3', 'firebrick1', 'magenta3', ] scf(); subplot(2,1,1) fig = gca(); plot2d(t,d, style = color(cores(1)) ); title('Distância lida pelo ultrassom (cm)'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(2,1,2) plot2d(t,u, style = color(cores(1)) ); title('Tensão enviada ao motor'); ylabel("Tensão (V)"); xlabel("tempo(s)"); end endfunction plot_na_funcao = %F; // %T para True ou %F para False [t1,d1,u1] = data_read(data_folder, file_names(1), plot_na_funcao); [t2,d2,u2] = data_read(data_folder, file_names(2), plot_na_funcao); [t3,d3,u3] = data_read(data_folder, file_names(3), plot_na_funcao); [t4,d4,u4] = data_read(data_folder, file_names(4), plot_na_funcao); // Analisando a frequência de amostragem do sinal do sensor fa_t1 = 1.0 ./ ( t1(2:$,1) - t1(1:$-1,1) ) // Diferença entre um instante e outro fa_t2 = 1.0 ./ ( t2(2:$,1) - t2(1:$-1,1) ) // Diferença entre um instante e outro fa_t3 = 1.0 ./ ( t3(2:$,1) - t3(1:$-1,1) ) // Diferença entre um instante e outro fa_t4 = 1.0 ./ ( t4(2:$,1) - t4(1:$-1,1) ) // Diferença entre um instante e outro // Frequência de amostragem // Como a frequência de amostragem tem grande variação, assume-se fa como a média // dos valores dos vetores (fa_t). // Foi testado, também, calcular a frequ~encia de amostragem como a média do // vetor de frequências sem contar os valores estourados de f, mas houve muito // pouca diferença em relação ao valor usado. fa1 = mean(fa_t1); fa2 = mean(fa_t2); fa3 = mean(fa_t3); fa4 = mean(fa_t4); // Para lidar com os outliers, remove-se medições anômalas do sensor (Trimming Outliers) max_dist = 70; // Valor máximo para contabilizar a distância // Se a distância for maior do que esse valor, exclui-se a distância t1_trim = t1(d1<max_dist) d1_trim = d1(d1<max_dist) t2_trim = t2(d2<max_dist) d2_trim = d2(d2<max_dist) t3_trim = t3(d3<max_dist) d3_trim = d3(d3<max_dist) t4_trim = t4(d4<max_dist) d4_trim = d4(d4<max_dist) // Análise espectral dos sinais function [f, psd] = spectral_treatment(signal_t,fs) /* Inputs: sinat_t --> um vetor unidimensional sinal_t (Nx1) que representa o valor de um sinal temporal fs --> um valor real que representa a frequência de amostragem do sinal em Hz Outputs: f --> vetor (N/2 x 1) de números reais com a escala de frequência do sinal em Hz psd --> vetor (N/2 x 1) de números reais com a densidade espectral de potência do sinal temporal */ N = length(signal_t); spectrum_f = fft(signal_t); spectrum_f = spectrum_f(1:N/2+1); // Como a fft é simétrica, pega-se metade do vetor psd = (1/(fs*N)) * ( abs(spectrum_f) ).^2 ; // PSD --> densidade espectral de potência psd(2:$-1) = 2*psd(2:$-1); f = (fs /N)*(0:N/2)' // Escala de frequências endfunction // Medição 1 [f1,psd_d1] = spectral_treatment(d1,fa1); [# ,psd_u1] = spectral_treatment(u1,fa1); [f1_trim, psd_d1_trim] = spectral_treatment(d1_trim ,fa1); // PSD do vetor "Cortado" // Medição 2 [f2,psd_d2] = spectral_treatment(d2,fa2); [# ,psd_u2] = spectral_treatment(u2,fa2); [f2_trim, psd_d2_trim] = spectral_treatment( d2_trim ,fa2); // PSD do vetor "Cortado" // Medição 3 [f3,psd_d3] = spectral_treatment(d3,fa3); [# ,psd_u3] = spectral_treatment(u3,fa3); [f3_trim, psd_d3_trim] = spectral_treatment( d3_trim ,fa3); // PSD do vetor "Cortado" // Medição 4 [f4,psd_d4] = spectral_treatment(d4,fa4); [# ,psd_u4] = spectral_treatment(u4,fa4); [f4_trim, psd_d4_trim] = spectral_treatment( d4_trim ,fa4); // PSD do vetor "Cortado" // ============================================================================= // ANÁLISE DOS RESULTADOS // ============================================================================= /* O funcionamento do sensor ULTRASSOM HC-SR04 consiste basicamente em enviar um sinal que, ao atingir um objeto, volta para o sensor e com base nesse tempo entre o envio e recebimento, é calculada a distância entre o sensor e o objeto. Ele pode medir distâncias entre 2 cm e 4 m, com precisão de 3mm. Seu ângulo de detecção é de aproximadamente 15 graus, segundo informações do datasheetdo sensor. Esse porcesso ocorre em 3 etapas: 1.É enviado um sinal com duração de 10 us (microssegundos) ao pino trigger, indicando que a medição terá início 2.Automaticamente, o módulo envia 8 pulsos de 40 KHz e aguarda o retorno do sinal pelo receptor 3.Caso haja um retorno de sinal (em nível HIGH), determinamos a distância entre o sensor e o obstáculo utilizando a seguinte equação:DISTANCIA=(PULSOEMNÍVELALTOXVELOCIDADEDOSOM(340M/S)/2 Dado o comprimento do tubo, a distância mínima e máxima que o sensor ultrassom consegue capturar não são um fator que prejudique o experimento. O erro de medição do ultrassom de 3mm diminui a precisão do dado obtido, porém tendo em vista que a o experimento esta na escala dos cm não é algo que prejudica a análise dos resultados. Sinal enviado ao motor para a medição 1: T = 2s, (f = 0.5Hz), Variando de 0V a 5V ( velocidade = (255/2)*sin(w*t) + (255/2) ) Sinal enviado ao motor para a medição 2: T = 2s, (f = 0.5Hz), Variando de 0V a 5V ( velocidade = (255/2)*sin(w*t) + (255/2) ) As medições 1 e 2 foram nas condições do vídeo 1 (oscilando e batendo no "chão") esse fenômeno é o esperado pois a a tensão a 0V, ou seja o motor é "desligado" a cada repetição fazendo com que a força do vento atuante na esfera seja nula e ela caia. Esse fenômeno é observável também no sinal captado pelo ultrassom com remoção de outliers, esse sinal acompanha o sinal de tensão enviada para o motor, como era de se esperar, apresentando um formato que de grosso modo se aproxima de uma senóide (porém apresenta ruídos). É interessante observar que quando a bola bate no "chão" o sinal captado pelo ultrassom não é nulo pois o o ultrassom capta o reflexo do sinal que atinge o topo da esfera, sendo então essa diferença do sinal medido pelo sensor ultrassom para o 0, quando a bola bate no fundo do tubo, correspondente a aproximadamente o diâmetro da esfera. O ultrassom capta alguns sinais equivalendo a uma grande distância (>2500 cm), isso claramente não ocorre no ensaio e pode ser causado por alguma falha de medição do equipamento, provavelmente causado por captar um sinal refletido que não corresponde ao sinal enviado pelo ultrassom levando a um tempo de calculado de viagem do sinal errôneo. Esse outliers aparecem também na frequência de amostragem do arduino que for isso é aproximadamente constante. Isso pode ter sido causado também por algum erro do arduino. Sinal enviado ao motor para a medição 3: T = 1s, (f = 1 Hz), Variando de 1.07V a 3.04V ( velocidade = 105 + 50*sin(w*t) ) A medição 3 foi nas condições do vídeo 2 (oscilando sem bater). Na medição 3, a diminuição das voltagens máxima e mínima e o aumento da frequência levou a uma sustentação da bola no ar, com alguma oscilação, isso é visível tanto no vídeo quanto no gráfico do sinal amostrado. É interessante observar quee há uma queda da média móvel da altura que a esfera se encontra ao longo do experimento e depois um aumento no final, em um caso ideal isso não ocorreria, a força do vento oscilante se equilibraria com a força peso da esfera e ela oscilaria em uma altura média fixa, porém por se tratar de um caso real, a complexidade e até caoticidade da dinâmica da esfera e da mecânica do fluido envolvendo o sitema ar-esfera-tubo leva a esse comportamento. Isso pode ser influenciado também pelo fato do motor/ventoinha ter alguma margem de erro de operação, gerando fluxos e cargas diferentes ao longo do processo para uma mesma tensão enviada. Sinal enviado ao motor para a medição 4: T = 0.5s,(f = 2 Hz), Variando de 0V a 5V ( velocidade = (255/2)*sin(w*t) + (255/2) ) Na medição 4, a alta frequência da tensão transmitida para o motor fez com que a esfera flutuasse no início, mas depois ficasse no fundo apresentando uma flutação de altura baixa em breves momento, isso provavelmente ocorreu pela baixo tempo de amostragem que depois do início não permitiu a geração de uma força do vente suficiente para superar a força peso da bola, apesar da voltagem inserida ter um pico relativamente alto "5V", como visto nas outras medições mais que suficiente para levantar a bola. Analisando os espectros de frequência dos sinais tanto da tensão enviada ao motor quanto do sinal captado pelo sensor ultrassom, observa-se que há um pico para o espectro da tensão enviada ao motor, 0.5 Hz para as midições 1 e 2, 1 Hz para a medição 3 e 2 Hz para a medição 4, para as medições 1 a 3 esse pico aparece também no espectro da frequência da distância saturada do sensor, correspondendo ao resultado esperado. Para a medição quatro esse pico não aparece na medição da distância da esfera, pois, como descrito no paragrafo anterior, não há um equilibrio entre a força do vento e o peso da esfera, portanto a distância medida não apresenta uma oscilação comportada e consequentemente não há um pico de densidade espectral para determinada frequência. [DADOS BRUTOS] - fa e d --> picos de fa batem com os de d [DADOS TRATADOS] - Remover os outliers é uma maneira rudimentar de tratar os dados - Resultados bons, mas podem ser melhor com um filtro */ // ============================================================================= // PLOTAGEM DOS GRÁFICOS // ============================================================================= cores = [ 'blue4', 'deepskyblue3', 'aquamarine3', 'springgreen4', 'gold3', 'firebrick1', 'magenta3', ] fig1= scf(1); subplot(4,1,1) plot2d(t1, d1, style = color(cores(1)) ); title('Distância captada pelo ultrassom na medição 1'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(4,1,2) plot2d(t1(2:$), fa_t1, style = color(cores(1)) ); title('Frequência de amostragem do Arduino para a medição 1'); ylabel("fs (Hz)"); xlabel("Intervalo de medidas (s)"); subplot(4,1,3) plot2d(t1_trim, d1_trim, style = color(cores(1)) ); // Plotando apenas entre 0 e max_dist title('Distância captada pelo ultrassom cortando outliers na medição 1'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(4,1,4) plot2d(t1,u1, style = color(cores(1)) ); title('Tensão enviada ao motor na medição 1'); ylabel("Tensão (V)"); xlabel("tempo(s)"); fig2= scf(2); subplot(4,1,1) plot2d(t2, d2, style = color(cores(3)) ); // Plotando apenas entre 0 e 60 title('Distância captada pelo ultrassom na medição 2'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(4,1,2) plot2d(t2(2:$), fa_t2, style = color(cores(3)) ); title('Frequência de amostragem do Arduino para a medição 2'); ylabel("fs (Hz)"); xlabel("Intervalo entre medidas (s)"); subplot(4,1,3) plot2d(t2_trim,d2_trim, style = color(cores(3)) ); title('Distância captada pelo ultrassom cortando outliers na medição 2'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(4,1,4) plot2d(t2,u2, style = color(cores(3)) ); title('Tensão enviada ao motor na medição 2 '); ylabel("Tensão (V)"); xlabel("tempo(s)"); fig3= scf(3); subplot(4,1,1) plot2d(t3, d3, style = color(cores(5)) ); // Plotando apenas entre 0 e 60 title('Distância captada pelo ultrassom na medição 3'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(4,1,2) plot2d(t3(2:$), fa_t3, style = color(cores(5)) ); title('Frequência de amostragem do Arduino para a medição 3'); ylabel("fs (Hz)"); xlabel("Intervalo entre medidas (s)"); subplot(4,1,3) plot2d(t3_trim,d3_trim, style = color(cores(5)) ); title('Distância captada pelo ultrassom cortando outliers na medição 3'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(4,1,4) plot2d(t3,u3, style = color(cores(5)) ); title('Tensão enviada ao motor na medição 3'); ylabel("Tensão (V)"); xlabel("tempo(s)"); fig4= scf(4); subplot(4,1,1) plot2d(t4, d4, style = color(cores(7)) ); title('Distância captada pelo ultrassom na medição 4'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(4,1,2) plot2d(t4(2:$), fa_t4, style = color(cores(7)) ); title('Frequência de amostragem do Arduino para a medição 4'); ylabel("fs (Hz)"); xlabel("Intervalo entre medidas (s)"); subplot(4,1,3) plot2d(t4_trim,d4_trim, style = color(cores(7)) ); title('Distância captada pelo ultrassom cortando outliers na medição 4'); ylabel("d (cm)"); xlabel("tempo(s)"); subplot(4,1,4) plot2d(t4,u4, style = color(cores(7)) ); title('Tensão enviada ao motor na medição 4'); ylabel("Tensão (V)"); xlabel("tempo(s)"); fig5 = scf(5); subplot(3,1,1) plot2d('nl',f1, psd_d1, style = color(cores(1)) ); title('Espectro de frequência da distância lida pelo Ultrassom na medição 1'); ylabel("PSD"); xlabel("f(Hz)"); subplot(3,1,2) plot2d('nl',f1_trim, psd_d1_trim, style = color(cores(1)) ); title('Espectro de frequência da distância saturada do sensor na medição 1'); ylabel("PSD"); xlabel("f(Hz)"); subplot(3,1,3) plot2d('nl',f1, psd_u1, style = color(cores(1)) ); title('Espectro de frequência da voltagem enviada ao motor na medição 1'); ylabel("PSD"); xlabel("f(Hz)"); fig6 = scf(6); subplot(3,1,1) plot2d('nl',f2, psd_d2, style = color(cores(3)) ); title('Espectro de frequência da distância bruta do sensor na medição 2'); ylabel("PSD"); xlabel("f(Hz)"); subplot(3,1,2) plot2d('nl',f2_trim, psd_d2_trim, style = color(cores(3)) ); title('Espectro de frequência da distância saturada do sensor na medição 2'); ylabel("PSD"); xlabel("f(Hz)"); subplot(3,1,3) plot2d('nl',f2, psd_u2, style = color(cores(3)) ); title('Espectro de frequência da voltagem enviada ao motor na medição 2'); ylabel("PSD"); xlabel("f(Hz)"); fig7 = scf(7); subplot(3,1,1) plot2d('nl',f3, psd_d3, style = color(cores(5)) ); title('Espectro de frequência da distância bruta do sensor na medição 3'); ylabel("PSD"); xlabel("f(Hz)"); subplot(3,1,2) plot2d('nl',f3_trim, psd_d3_trim, style = color(cores(5)) ); title('Espectro de frequência da distância saturada do sensor na medição 3'); ylabel("PSD"); xlabel("f(Hz)"); subplot(3,1,3) plot2d('nl',f3, psd_u3, style = color(cores(5)) ); title('Espectro de frequência da voltagem enviada ao motor na medição 3'); ylabel("PSD"); xlabel("f(Hz)"); fig8 = scf(8); subplot(3,1,1) plot2d('nl',f4, psd_d4, style = color(cores(7)) ); title('Espectro de frequência da distância bruta do sensor na medição 4'); ylabel("PSD"); xlabel("f(Hz)"); subplot(3,1,2) plot2d('nl',f4_trim, psd_d4_trim, style = color(cores(7)) ); title('Espectro de frequência da distância saturada do sensor na medição 4'); ylabel("PSD"); xlabel("f(Hz)"); subplot(3,1,3) plot2d('nl',f4, psd_u4, style = color(cores(7)) ); title('Espectro de frequência da voltagem enviada ao motor na medição 4'); ylabel("PSD"); xlabel("f(Hz)");
cf97f095a52cb1680c24b6a08c5ac3979dc1682d
449d555969bfd7befe906877abab098c6e63a0e8
/3864/CH7/EX7.1/Ex7_1.sce
98d6372dbd80a536c3dcef9f6f07899fea2ae760
[]
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
588
sce
Ex7_1.sce
clear // // //Initilization of Variables sigma1=30 //N/mm**2 //Stress in tension d=20 //mm //Diameter sigma2=90 //N/mm**2 //Max compressive stress sigma3=25 //N/mm**2 //Calculations //In TEnsion //Corresponding stress in shear P=sigma1*2**-1 //N/mm**2 //Tensile force F=%pi*4**-1*d**2*sigma1 //In Compression //Correspong shear stress P2=sigma2*2**-1 //N/mm**2 //Correspong compressive(axial) stress p=2*sigma3 //N/mm**2 //Corresponding Compressive force P3=p*%pi*4**-1*d**2 //N //Result printf("\n Failure Loads are: %0.2f N",F) printf("\n : %0.2f N",P3)
947a82df72af706edda6414f2d885bb4efec4f25
1a00eb132340e145c8a7d8fd0ef79a02b24605a2
/unloader.sce
2e1dd1cd0fada750d43bdd867f8bcdd0f58f641d
[]
no_license
manasdas17/Scilab-Arduino-Toolbox
e848d75dc810cb0700df34b1e5c606802631ada4
2a6c9d3f9f2e656e1f201cecccd4adfe737175e7
refs/heads/master
2018-12-28T15:51:35.378091
2015-08-06T07:22:15
2015-08-06T07:22:15
37,854,821
3
2
null
null
null
null
UTF-8
Scilab
false
false
355
sce
unloader.sce
// This file is released under the 3-clause BSD license. See COPYING-BSD. // Generated by builder.sce: Please, do not edit this file try getversion("scilab"); catch error("Scilab 5.4 or more is required."); end; fileQuit = get_absolute_file_path("unloader.sce") + "etc\" + "arduino.quit"; if isfile(fileQuit) then exec(fileQuit); end
f8539a9fc0cc7eac7ba6cb6e73b011be3b002ea0
449d555969bfd7befe906877abab098c6e63a0e8
/3871/CH5/EX5.20/Ex5_20.sce
c7d7f8f75ca819bb1cb9076855ecfc8ad09728bc
[]
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
500
sce
Ex5_20.sce
//=========================================================================== //chapter 5 example 20 clc; clear all; //variable declaration L = 170; //length of the wire in mm dL = 0.2; //increase in length in mm L1 =100; //length of the second wire in mm //calculations S = sqrt((L*dL)/(2)); //Sag in mm S1 = sqrt((L1*S)/(2)); //Sag in mm M = S1/(dL); //magnification //result mprintf("magnification = %3.1f",M);
fe37292831e444bafb0301b96d80e7fe62fa9f00
16f807178d75bf8f92b14bf909e62d286193cc13
/edsonjParametersmodif.sce
cba98d5eebefcd6f32060abd321c352a3227c1ec
[]
no_license
renzo-source/LABORATORIO-03-Linealizaci-n-num-rica-del-sistema-MoDiCA-X
11440801c8552f7f613fca0b05be21a8b6ccbab4
d6a990da1a41b86f726620c28c1af1da5d50c0d7
refs/heads/master
2022-12-04T17:48:33.145635
2020-08-16T04:13:16
2020-08-16T04:13:16
279,112,222
0
0
null
null
null
null
UTF-8
Scilab
false
false
270
sce
edsonjParametersmodif.sce
//Parameters model of pendulum M=0.696 //Masa del carro (Kg) m=0.017 //masa del pendulo (Kg) l=0.3 //longitud de la barra (m) g=9.8 //aceleracion gravitacional (m/s2) b=0.001 //coeficiente de friccion (Ns/m) I=0.0011 //Inercia del pendulo (Kgm2)
a5ec4be8584c4c24bc4487262ffc0140ae61cd69
449d555969bfd7befe906877abab098c6e63a0e8
/842/CH4/EX4.4/Example4_4.sce
02619fc0fca9e3242af8f3f9c064b293bce9cfbc
[]
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
932
sce
Example4_4.sce
//clear// //Example 4.4 // Continuous Time Fourier Transform //and Frequency Response of a Square Waveform // x(t)= A, from -T1 to T1 clear; clc; close; // CTS Signal A =1; //Amplitude Dt = 0.005; T1 = 4; //Time in seconds t = -T1/2:Dt:T1/2; for i = 1:length(t) xt(i) = A; end // // Continuous-time Fourier Transform Wmax = 2*%pi*1; //Analog Frequency = 1Hz K = 4; k = 0:(K/1000):K; W = k*Wmax/K; xt = xt'; XW = xt* exp(-sqrt(-1)*t'*W) * Dt; XW_Mag = real(XW); W = [-mtlb_fliplr(W), W(2:1001)]; // Omega from -Wmax to Wmax XW_Mag = [mtlb_fliplr(XW_Mag), XW_Mag(2:1001)]; // subplot(2,1,1); a = gca(); a.data_bounds=[-4,0;4,2]; a.y_location ="origin"; plot(t,xt); xlabel('t in msec.'); title('Contiuous Time Signal x(t)') subplot(2,1,2); a = gca(); a.y_location ="origin"; plot(W,XW_Mag); xlabel('Frequency in Radians/Seconds'); title('Continuous-time Fourier Transform X(jW)')
9d32cd4ffdbdcdf885f886918f7efeac804cd8ca
449d555969bfd7befe906877abab098c6e63a0e8
/1217/CH3/EX3.2/Exa3_2.sce
63f42a520ce4291bb46b9ac987e7b5b71f92b607
[]
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
390
sce
Exa3_2.sce
//Exa 3.2 clc; clear; close; // given data AF=100;//unitless A=2*10^5;//unitless Ri=1;//in Mohm Ro=75;//in ohm //let R1 =1 ohm R1=1;//in ohm //formula : AF=1+RF/R1 RF=(AF-1)*R1;//in kohm B=1/AF;//unitless RiF=(1+A*B)*Ri*10^6;//in ohm RoF=Ro/(1+A*B);//in ohm disp(RF,"Value of RiF in kohm is : "); disp(RiF,"Value of RiF in ohm is : ") disp(RoF,"Value of RoF in ohm is : ")
09cdb42e696f4fab456b79b866916544532e45f2
449d555969bfd7befe906877abab098c6e63a0e8
/3772/CH1/EX1.8/Ex1_8.sce
e05a86be27f6c3445a203da563a812c34dc0b32a
[]
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
541
sce
Ex1_8.sce
// Problem 1.8,Page no.12 clc;clear; close; alpha=%pi/2 //degree //In case of semicircle //Semicircle-1 r_1=20 //cm //radius of semicircle y_1=4*r_1*(3*%pi)**-1 //cm //distance from the base a_1=(%pi*r_1**2)*2**-1 //cm**2 //area of semicircle //Semicircle-2 r_2=16 //cm //radius of semicircle y_2=4*r_2*(3*%pi)**-1 //cm //distance from the base a_2=(%pi*r_2**2)*2**-1 //cm**2 //area of semicircle //Calculations Y_bar=(a_1*y_1-a_2*y_2)*(a_1-a_2)**-1 //cm //centroid //Result printf("The centroid of the area is %.2f cm",Y_bar)
be9da2e0145b0c97a75489b4241e08a6aa0db5c3
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set4/s_Control_Systems_S._Ghosh_773.zip/Control_Systems_S._Ghosh_773/DEPENDENCIES/6_2.sce
e9388ccfeefc007b729201859bba8b95067dbaa9
[]
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
101
sce
6_2.sce
errcatch(-1,"stop");mode(2);function [y]=series(sys1,sys2) y=sys1*sys2 endfunction exit();
67a16b914e85834709bfec0bfc82645a3c0cbe64
449d555969bfd7befe906877abab098c6e63a0e8
/1394/CH8/EX8.3.1/Ex8_3_1.sce
e4bcca8fcd0c8743660d40d79d44f573845c25d3
[]
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
Ex8_3_1.sce
clc //initialization of variables l = 0.07 // flim thickness in cm v = 3 // water flow in cm/sec D = 1.8*10^-5 // diffusion coefficient in cm^2/sec crat = 0.1 // Ratio of c1 and c1(sat) //Calculations z = (((l^2)*v)/(1.38*D))*((log(1-crat))^2) //Column length //Results printf("the column length needed is %.1f cm",z)
9c2fbfe57d3340cb3d4c5e9583c46519647cd384
449d555969bfd7befe906877abab098c6e63a0e8
/1238/CH1/EX1.3/3.sce
f166ade9dac3f2c788df0eb3ec52c69ede4ad57d
[]
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,131
sce
3.sce
//binary to decimal conversion// //example 3// clc //clears the command window// clear // clears // p =1; // initialising // q =1; z =0; b =0; w =0; f =0; //bin= input ( Enter the binary no to be converted to its decimal equivalent : ) //accepting the binary input from user// bin =1100.11; d =modulo(bin ,1); //separating the decimal part and the integer part// d=d *10^10; a = floor (bin) ; //removing the decimal part// while (a >0) //Loop to take the binary bits of integer into a matrix // r = modulo (a ,10) ; b(1,q) = r ; a=a /10; a= floor ( a ) ; q=q +1; end for m =1: q -1 // multipliying the bits of integer position values and adding// c=m -1; f=f+b(1,m) *(2^ c); end while (d >0) // Loop to take the binary bits of decimal into a matrix// e = modulo (d ,2) w(1 ,p)=e d = d /10; d= floor (d) p=p +1; end for n =1: p -1 // multipliying the bits of decimal with their position values and adding// z=z+w(1 ,n)*(0.5) ^(11 -n); end z = z *10000; //rounding of to 4 decimal values// z= round (z); z = z /10000; x=f+z; disp (x) //result is displayed//
5705b39825273efb6c32587a7b55ca678aafe23d
449d555969bfd7befe906877abab098c6e63a0e8
/1092/CH9/EX9.8/Example9_8.sce
d84dc04d890996dabbf297ff4ecf5e1ca951a6fd
[]
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
3,711
sce
Example9_8.sce
// Electric Machinery and Transformers // Irving L kosow // Prentice Hall of India // 2nd editiom // Chapter 9: POLYPHASE INDUCTION (ASYNCHRONOUS) DYNAMOS // Example 9-8 clear; clc; close; // Clear the work space and console. // Given data (Exs.9-5 through 9-7) P = 8 ; // Number of poles in the SCIM f = 60 ; // Frequency in Hz R_r = 0.3 ; // Rotor resistance per phase in ohm X_lr = 1.08 ; // Locked rotor reactance in ohm S_r = 650 ; // Speed in rpm at which motor stalls E_lr = 112 ; // Induced voltage per phase disp("Example 9-8 : "); printf(" \n The new and the original conditions may be summarized in the following table\n"); printf(" \n _________________________________________________________"); printf(" \n Condition \t R_r \t\t X_lr \t\t T_starting "); printf(" \n \t ohm \t\t ohm \t "); printf(" \n _________________________________________________________"); printf(" \n Original : \t %.1f \t\t %.2f \t\t T_o = 2*T_n ",R_r,X_lr); printf(" \n New :\t(%.1f+R_x) \t %.2f \t\t T_n = 2*T_n ",R_r,X_lr); printf(" \n _________________________________________________________\n"); // Calculating // case a // Neglecting constant Kn_t ,since we are equating torque T_o and T_n T_o = ( R_r / ((R_r)^2 + (X_lr)^2) ); // Original torque // T_o = K_n_t*( 0.3 / ((0.3)^2 + (1.08)^2) ); // T_n = K_n_t*( 0.3 + R_x) / ( (0.3 + R_x)^2 + (1.08)^2 ); // T_n = T_o // Simplyifing yields // 0.3 + R_x = 0.24[(0.3+R_x)^2 + (1.08)^2] // Expanding and combining the terms yields // 0.24*(R_x)^2 - 0.856*R_x = 0 // This is a quadratic equation having two roots,which may be factored as // R_x*(0.24*R_x - 0.856) = 0,yielding // R_x = 0 and R_x = 0.856/0,24 = 3.57 R_x = poly(0,'R_x'); // Defining a polynomial with variable 'R_x' with root at 0 a = 0.24 ; // coefficient of x^2 b = -0.856 ; // coefficient of x c = 0 ; // constant // Roots of p R_x1 = ( -b + sqrt (b^2 -4*a*c ) ) /(2* a); R_x2=( -b - sqrt (b^2 -4*a*c ) ) /(2* a); // Consider R_x>0 value, R_x = R_x1; R_T = R_r + R_x ; // Total rotor resistance in ohm // case b Z_T = R_T + %i*X_lr ; // Total impedance in ohm Z_T_m = abs(Z_T);//Z_T_m = magnitude of Z_T in ohm Z_T_a = atan(imag(Z_T) /real(Z_T))*180/%pi;//Z_T_a=phase angle of Z_T in degrees cos_theta = R_T / Z_T_m ; // Rotor PF that will produce the same starting torque // case c Z_r = Z_T_m ; // Impedance in ohm I_r = E_lr / Z_r ; // Starting current in A // Display the results disp("Solution : "); printf(" \n a: T_o = %.2f * K_n_t ",T_o ); printf(" \n T_n = %.2f * K_n_t \n",T_o ); printf(" \n Simplyifing yields"); printf(" \n 0.3 + R_x = 0.24[(0.3+R_x)^2 + (1.08)^2]"); printf(" \n Expanding and combining the terms yields"); printf(" \n 0.24*(R_x)^2 - 0.856*R_x = 0"); printf(" \n This is a quadratic equation having two roots,which may be factored as"); printf(" \n R_x*(0.24*R_x - 0.856) = 0,yielding"); printf(" \n R_x = 0 ohm and R_x = 0.856/0.24 = 3.57 ohm\n\n This proves that "); printf(" \n Original torque is produced with an external resistance of either "); printf(" \n zero or 12 times the origianl rotor resistance.Therefore,\n"); printf(" \n R_T = R_r + R_x = %.2f ohm \n",R_T); printf(" \n b: Z_T in ohm = ");disp(Z_T); printf(" \n Z_T = %.2f <%.1f ohm ",Z_T_m,Z_T_a); printf(" \n cosӨ = R_T / Z_T = %.3f or \n cosӨ = cosd(%.1f) = %.3f\n",cos_theta,Z_T_a,cosd(Z_T_a)); printf(" \n c: I_r = E_lr / Z_r = %.f A \n\n This proves that,",I_r); printf(" \n Rotor current at starting is now only 28 percent of the original"); printf(" \n starting current in part(a) of Ex.9-7");
d0b089831c50955a3bf46453ee07facd982494d5
1485852dd59aafc286600126cf832a32e10f117f
/macros/getStructuringElement.sci
055e2bb9562f375d2ccca82e0fee0a8e94c7eae1
[]
no_license
rg77/Scilab-Image-Processing-And-Computer-Vision-Toolbox
dec9fbbce32cfd1eab3c45ccb29c89aaa1384758
8adb116da3a9c29a32e5e0727105aff571e5b374
refs/heads/master
2020-12-02T16:14:45.282650
2017-07-07T10:12:04
2017-07-07T10:12:04
96,524,257
0
0
null
2017-07-07T09:43:50
2017-07-07T09:43:50
null
UTF-8
Scilab
false
false
2,522
sci
getStructuringElement.sci
// Copyright (C) 2015 - IIT Bombay - FOSSEE // // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt // Author: Sukul Bagai // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in // function structuring_element = getStructuringElement(gettype, cols, rows, anchorX, anchorY) // This function returns a structuring element required for the morphological operations. // Calling Sequence // se = raw_getStructuringElement(gettype, cols, rows, anchorX, anchorY) // // Parameters // se: output structuring element matrix // shape: element shape that could be one of the following- // //MORPH_RECT - a rectangular structuring element //MORPH_ELLIPSE - an elliptic structuring element //MORPH_CROSS - a cross-shaped structuring element // //cols: Width of the structuring element //rows: Height of the structuring element //anchor: Anchor position within the element. The value (-1, -1) means that the anchor is at the center. //Only the shape of a cross-shaped element depends on the anchor position. In other cases the anchor just regulates //how much the result of the morphological operation is shifted. //anchor_x: x-coordinate of the anchor //anchor_y: y-coordinate of the anchor // // Description // The function constructs and returns the structuring element that can be further passed to // function that perform morphological operations like erode or dilate. // // Examples // src = imread("../images/color2.jpeg"); // se1=getStructuringElement('MORPH_RECT',5,7,3,4); //make a rectangular structuring element // out = dilate(src,se1,3,4,1); //perform dilate morphological operation // imshow(out); //view the output image // // Examples // src = imread("../images/color2.jpeg"); // se2=getStructuringElement('MORPH_ELLIPSE',10,15,2,2); //make an elliptical structuring element // out = dilate(src,se2,2,2,2); //perform dilate morphological operation // imshow(out); //view the output image // // Authors // Sukul Bagai [ lhs rhs ] = argn(0) if lhs > 1 then error(msprintf("Too many output argument")) end if rhs > 5 then error(msprintf("Too many input arguments")) elseif rhs < 5 then error(msprintf("input arguments missing")) end structuring_element = raw_getStructuringElement(gettype, cols, rows, anchorX, anchorY) endfunction
865580448581f82f86b453477c4f230320c454ba
449d555969bfd7befe906877abab098c6e63a0e8
/830/CH8/EX8.10/FIR_LPF_1.sce
a9c2bade08db7263e728fd3782c289891a7a2b97
[]
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
937
sce
FIR_LPF_1.sce
//Graphical// //Figure 8.9 and 8.10 //PROGRAM TO DESIGN AND OBTAIN THE FREQUENCY RESPONSE OF FIR FILTER //LOW PASS FILTER clear; clc; close; M = 61 //Filter length = 61 Wc = %pi/5; //Digital Cutoff frequency Tuo = (M-1)/2 //Center Value for n = 1:M if (n == Tuo+1) hd(n) = Wc/%pi; else hd(n) = sin(Wc*((n-1)-Tuo))/(((n-1)-Tuo)*%pi); end end //Rectangular Window for n = 1:M W(n) = 1; end //Windowing Fitler Coefficients h = hd.*W; disp('Filter Coefficients are') h; [hzm,fr]=frmag(h,256); hzm_dB = 20*log10(hzm)./max(hzm); subplot(2,1,1) plot(fr,hzm) xlabel('Normalized Digital Frequency W'); ylabel('Magnitude'); title('Frequency Response 0f FIR LPF using Rectangular window M=61') subplot(2,1,2) plot(fr,hzm_dB) xlabel('Normalized Digital Frequency W'); ylabel('Magnitude in dB'); title('Frequency Response 0f FIR LPF using Rectangular window M=61')
bffc287d6fa16bd4a5058f0f2970715b26879ed6
449d555969bfd7befe906877abab098c6e63a0e8
/1592/CH4/EX4.14/example_4_14.sce
8767c48c2841d9df6a531d8ce90985752f607ddb
[]
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
730
sce
example_4_14.sce
//Scilab Code for Example 4.14 of Signals and systems by //P.Ramakrishna Rao clear; clc; close; a=.5; A=1/(sqrt(2)*%pi); t=-10:0.1:10; x=A*exp(-a*t.*t); disp("Guassian pulse signal x(t)=(1/sqrt(2)*%pi)*exp(-a*t^2)"); disp("X(w)=integral(exp(-a*t^2)*exp(-%i*w*t)) w.r.t dt"); disp("d(X(w))/dw=-%i*w/(2*a)*integral(exp(-a*t^2)*exp(-%i*w*t))"); disp("d(X(w))/dw=-w*X(w)/2a"); disp("solving this we get X(w)=A*exp(-w^2/4a)") disp("A=sqrt(%pi/a)"); d=gca() plot(t,x); poly1=d.children.children; poly1.thickness=3; poly1.foreground=2; xtitle('x(t)','t') A=1; f=t; Xf=A*exp(-2*%pi^2*f^2); figure(1); d=gca() plot(f,Xf); poly1=d.children.children; poly1.thickness=3; poly1.foreground=2; xtitle('X(f)','f')
431933ac3374c609fee9cad0f6d67c20eb7a7456
449d555969bfd7befe906877abab098c6e63a0e8
/1553/CH25/EX25.21/25Ex21.sce
f0cdb3bbee68a47bf506fdb6ec661f228ebe0ec1
[]
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
173
sce
25Ex21.sce
//Ch25_Ex21 clc; clear; close; r=7; h=24; w=1.25; l=sqrt(h^2+r^2); area=%pi*r*l; lengthCanvas=area/w; mprintf("The length of canvas is %.0f meter",lengthCanvas);
1e0a2eac2662bd54f9bb4d63c645fc0d7dd2b4ba
1a8ee276de64397a0a64bc48cad795f585998670
/assignment1/gauss_jordan.sce
a35b7bec1859f0ee31ffb2aa252b2b7c8a50e249
[]
no_license
siddhantrao23/scilab
3217b1d0a5c18f1ffa6751cfbca95bd71a621db2
5974b784340b457f70fc21484c6ff252d3a5eda4
refs/heads/master
2020-12-30T08:20:14.057086
2020-04-04T11:25:19
2020-04-04T11:25:19
238,926,043
0
0
null
null
null
null
UTF-8
Scilab
false
false
527
sce
gauss_jordan.sce
rows = 3; cols = 3; A = zeros(rows, cols); disp("Enter the 3x3 matrix A"); for i = 1:rows for j = 1:cols A(i,j) = input("value for A:") end end n = length(A(1,:)); aug = [A, eye(n,n)]; for j = 1:n-1 for i = j+1:n aug(i, j:2*n) = aug(i, j:2*n) - aug(i, j) / aug(j, j) * aug(j, j:2*n); end end for j = n:-1:2 aug(1:j-1, :) = aug(1:j-1, :) - aug(1:j-1, j) / aug(j, j)*aug(j, :); end for j = 1:n aug(j, :) = aug(j, :) / aug(j, j); end B = aug(:, n+1:2*n); disp(B,'The inverse of B is');
9c98a779e36397093fe3d996850ccf57f143b246
449d555969bfd7befe906877abab098c6e63a0e8
/3594/CH12/EX12.2/Ex12_2.sce
be3c1ab170677cc4ff6c6efbbc66f35cb92999c3
[]
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
324
sce
Ex12_2.sce
clc //given ne=31 na=25 nb=90 nc=83 Ta=10 //lbft //Ne-Nf/(Nc-Nf)=-83/31 k=114/83//k=Nc/Nf As Ne = 0, on simplification we get Nc/Nf= 114/83 j=-90/25//j=Na/Nb //Nc=Nb, Thus Na/Nc=-90/25 //Na/Nf=(Na/Nc)*(Nc/Nf) ie Na/Nf=k*j //Tf*Nf=Ta*Na Tf=Ta*k*j printf("\nTorque exerted on driven shaft = %.1f lb.ft\n",Tf)
17e8ca46622085357866029de7d523375ed816e7
449d555969bfd7befe906877abab098c6e63a0e8
/1808/CH7/EX7.13/Chapter7_Exampl13.sce
79fc590b1d06f6dc99f13d6e3adedc0f1a889697
[]
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,087
sce
Chapter7_Exampl13.sce
clc clear //INPUT DATA t2=50;//dry bulb temperature in Degree c t1=30;//dry bulb temperature in Degree c t11=25;//wet bulb temperature in Degree c V=300;//volume in m^3 Ra1=287.3;//rate of flow p=760;//pressure in mm of Hg pva=23.74;//Saturation pressure in mm Hg cp=1.005;//specific pressure ps2=92.54;//Saturation pressure in mm Hg //CALCULATIONS va1=(Ra1*(273+t1))/((p-21.275)*133.5);//Amount of dry air in m^3/kg d.a. pv1=(pva-((p-pva)*(t1-t11)*1.8)/(2800-(1.3*(1.8*t1+32))));//Saturation pressure in mm Hg w1=0.622*(pv1/(p-pv1));//Specific humidity in kg w.v./kg d.a ma=V/va1;//mass flow rate in kg d.a. h1=cp*t1+w1*(2500+1.88*t1);//Enthalpy of air per kg of dry air in kJ/kg d.a. h2=cp*t2+w1*(2500+1.88*t2);//Enthalpy of air per kg of dry air in kJ/kg d.a. pv2=(w1*p/0.6379);//saturation pressure in mm Hg Qa=ma*(h2-h1);//Quantity of heat added in kJ x2=(pv2/ps2)*100;//Final RH in percentage //OUTPUT printf('(i)Quantity of heat added is %3.2f kJ \n (ii)Final RH is %3.2f percentage \n (iii)from chart Final WBT from the chart is 29 Degree C',Qa,x2)
5828b38d266560b060a03f312ea9aab9806b5b7c
449d555969bfd7befe906877abab098c6e63a0e8
/3472/CH17/EX17.2/Example17_2.sce
e440f910785cd24ac00edeb330d23712b4637acd
[]
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,288
sce
Example17_2.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 10: POWER SYSTEM STABILITY // EXAMPLE : 10.2 : // Page number 270 clear ; clc ; close ; // Clear the work space and console // Given data x_s = 0.85 // Reactance(p.u) x_T1 = 0.157 // Reactance(p.u) x_T2 = 0.157 // Reactance(p.u) x_l1 = 0.35 // Reactance(p.u) x_l2 = 0.35 // Reactance(p.u) E = 1.50 // Sending end voltage(p.u) V_L = 1.0 // Load voltage(p.u) P_0 = 1.0 // Stable power output(p.u) // Calculations x = x_s+x_T1+x_T2+(x_l1/2) // Total reactance(p.u) P_max = E*V_L/x // Maximum power limit(p.u) M = (P_max-P_0)/P_max*100 // Steady state stability margin(%) V_Lmin = P_0*x/E // Minimum value of V_L(p.u) E_min = P_0*x/V_L // Minimum value of E(p.u) // Results disp("PART II - EXAMPLE : 10.2 : SOLUTION :-") printf("\nMinimum value of |E|, |E_min| = %.3f p.u", E_min) printf("\nMinimum value of |V_L|, |V_Lmin| = %.3f p.u", V_Lmin) printf("\nMaximum power limit, P_0 = %.2f p.u", P_max) printf("\nSteady state stability margin, M = %.1f percent", M)
497423e66e54c01a4b62e4ac3616daaeef795626
449d555969bfd7befe906877abab098c6e63a0e8
/608/CH25/EX25.07/25_07.sce
a4c7906798dba02a1ca48b668c2b3357af4efe07
[]
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,308
sce
25_07.sce
//Problem 25.07: (a) For the network diagram of Figure 25.8, determine the value of impedance Z1 (b) If the supply frequency is 5 kHz, determine the value of the components comprising impedance Z1. //initializing the variables: RL = %i*6; // in ohm R2 = 8; // in ohm Z3 = 10; // in ohm rv = 50; // in volts thetav = 30; // in degrees ri = 31.4; // in amperes thetai = 52.48; // in degrees f = 5000; // in Hz //calculation: //impedance, Z2 Z2 = R2 + RL //voltage V = rv*cos(thetav*%pi/180) + %i*rv*sin(thetav*%pi/180) //current, I I = ri*cos(thetai*%pi/180) + %i*ri*sin(thetai*%pi/180) //Total circuit admittance, YT = I/V //admittance, Y3 Y3 = 1/Z3 //admittance, Y2 Y2 = 1/Z2 //admittance, Y1 Y1 = YT - Y2 - Y3 //impedance, Z1 Z1 = 1/Y1 printf("\n\n Result \n\n") printf("\n (a)the impedance Z1 is %.2f + (%.2f)i ohm",real(Z1), imag(Z1)) //resistance, R1 R1 = real(Z1) X1 = imag(Z1) if ((R1>0)&(X1<0)) then C1 = -1/(2*%pi*f*X1) printf("\n (b)The series circuit thus consists of a resistor of resistance %.2f ohm and a capacitor of capacitance %.2E Farad\n",R1,C1) elseif ((R1>0)&(X1>0)) then L1 = 2*%pi*f*X1 printf("\n (b)The series circuit thus consists of a resistor of resistance %.2f ohm and a inductor of insuctance %.2E Henry\n",R1,L1) end
6b50cfb2bce7540e1d80508f590d171e0e791a32
449d555969bfd7befe906877abab098c6e63a0e8
/2294/CH12/EX12.4/EX12_4.sce
d6916b9ecb6e1ccdf884e058815c452cbdbaef59
[]
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
870
sce
EX12_4.sce
//Example 12.4 //Probability to find the required sample size. disp('Let A be the event of choosing a sample size of 6 containing two red, one green , two blue and one white blue ball.'); funcprot(0) function c = combination ( n , r ) c = prod ( n : -1 : n-r+1 )/ prod (1:r) endfunction disp('The number of combination of choosing 6 balls from 14 balls is 14 C 6 ways') disp('The number of combination of choosing 2 red balls from 4 balls is 4 C 2 ways') disp('The number of combination of choosing 1 from 3 green balls is 3 C 1 ways') disp('The number of combination of choosing 2 from 5 green balls is 5 C 2 ways') disp('The number of combination of choosing 1 from 2 white balls is 2 C 1 ways') disp('P(A)={(4 C 2)*(3 C 1)*(5 C 2)*(2 C 1)}/(14 C 6)=') p=(combination(4,2)*combination(3,1)*combination(5,2)*combination(2,1))/combination(14,6); disp(p);
3aee2573e4bd66b5f8b15884065a1713840d7592
449d555969bfd7befe906877abab098c6e63a0e8
/3862/CH4/EX4.5/Ex4_5.sce
60a719ee03e5cb9e0d82d6f1d33808e9b6642a79
[]
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
329
sce
Ex4_5.sce
clear //variable declaration A1=150.0*12.0 //Area of 1 ,mm^2 A2=(200.0-12.0)*12.0 //Area of 2,mm^2 X1=75 X2=6 Y1=6 Y2=12+(200-12)/2 A=A1+A2 xc=(A1*X1+A2*X2)/A printf("\n xc= %0.2f ",xc) yc=(A1*Y1+A2*Y2)/A printf("\n yc= %0.2f mm",yc) printf("\nThus, the centroid is at x = 36.62 mm and y = 61.62 mm ")
d5b8926cf80b7155371700dc5cee212dc7aff8e6
449d555969bfd7befe906877abab098c6e63a0e8
/2267/CH3/EX3.3/Ex3_3.sce
f2d9ccad097fe4b67e407074e4cfb59905396acd
[]
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
423
sce
Ex3_3.sce
//Part A Chapter 3 Example 3 clc; clear; close; format('v',6); t_ice=0;//degree C E0=0.003*t_ice-5*10^-7*t_ice^2+0.5*10^-3;//V t_steam=100;//degree C E100=0.003*t_steam-5*10^-7*t_steam^2+0.5*10^-3;//V t=30;//degree C E30=0.003*t-5*10^-7*t^2+0.5*10^-3;//V t=((E30-E0)/(E100-E0))*(t_steam-t_ice);//degree C disp("Temperature shown by thermometer = "+string(t)+" degree C"); //Answer given in the book is wrong.
03216e1de638b480fe7a5bf44fbcf154efce3fe5
527c41bcbfe7e4743e0e8897b058eaaf206558c7
/Positive_Negative_test/Netezza-Base-MathematicalFunctions/FLGammaLn-Netezza-01.tst
01f583ab602b123ea5defd6761397f4ab321c80c
[]
no_license
kamleshm/intern_fuzzy
c2dd079bf08bede6bca79af898036d7a538ab4e2
aaef3c9dc9edf3759ef0b981597746d411d05d34
refs/heads/master
2021-01-23T06:25:46.162332
2017-07-12T07:12:25
2017-07-12T07:12:25
93,021,923
0
0
null
null
null
null
UTF-8
Scilab
false
false
2,214
tst
FLGammaLn-Netezza-01.tst
-- Fuzzy Logix, LLC: Functional Testing Script for DB Lytix functions on Netezza -- -- Copyright (c): 2014 Fuzzy Logix, LLC -- -- NOTICE: All information contained herein is, and remains the property of Fuzzy Logix, LLC. -- The intellectual and technical concepts contained herein are proprietary to Fuzzy Logix, LLC. -- and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade -- secret or copyright law. Dissemination of this information or reproduction of this material is -- strictly forbidden unless prior written permission is obtained from Fuzzy Logix, LLC. -- Functional Test Specifications: -- -- Test Category: Math Functions -- -- Test Unit Number: FLGammaLn-Netezza-01 -- -- Name(s): FLGammaLn -- -- Description: Scalar function which returns the natural logarithm of the gamma function -- -- Applications: -- -- Signature: FLGammaLn(x DOUBLE PRECISION) -- -- Parameters: See Documentation -- -- Return value: DOUBLE PRECISION -- -- Last Updated: 11-21-2014 -- -- Author: Surya Deepak Garimella -- -- BEGIN: TEST SCRIPT --.run file=../PulsarLogOn.sql --.set width 2500 -- BEGIN: POSITIVE TEST(s) ---- Positive Test 1: Manual Example --- Same Output, Good SELECT FLGammaLn(2.5) AS GammaLn; ---- Positive Test 2: 1 < Value < 2, should output negative value --- Return expected results, Good SELECT FLGammaLn(1.5) AS GammaLn; ---- Positive Test 3: Should Output 0 --- Return expected results SELECT FLGammaLn(2) AS GammaLn; SELECT FLGammaLn(1) AS GammaLn; ---- Positive Test 4: Value * 1e100, Compared with R --- Same results, Good SELECT FLGammaLn(2.5 * 1e100) AS GammaLn; ---- Positive Test 5: Value * 1e-100, Compared with R --- Same results, Good SELECT FLGammaLn(2.5 * 1e-100) AS GammaLn; -- END: POSITIVE TEST(s) -- BEGIN: NEGATIVE TEST(s) ---- Negative Test 1: Bound Check 0 --- Return expected error, Good SELECT FLGammaLn(0) AS GammaLn; ---- Negative Test 2: Bound Check < 0 --- Return expected error, Good SELECT FLGammaLn(-1.0) AS GammaLn; ---- Negative Test 3: Invalid Data Type --- Return expected error, Good SELECT FLGammaLn(NULL) AS GammaLn; -- END: NEGATIVE TEST(s) -- END: TEST SCRIPT
dd0a2899b6d4b31e27f2c0983d1e3a5cd56b87c1
449d555969bfd7befe906877abab098c6e63a0e8
/2090/CH4/EX4.13/Chapter4_Example13.sce
748c688c6f6ef050b4f8aa8f4491151b792c538a
[]
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,668
sce
Chapter4_Example13.sce
clc clear //Input data Tu=645;//The temperature at the end of compression process in K usu=310;//The internal energy at the end of compression process in kJ/kg air pu=(15.4*1.013);//The pressure at the end of the compression process in bar Vu=0.124;//The volume at the end of the compression process in m^3/kg air e=1;//Equivalence ratio f=0.065;//Burned gas fraction //Calculations ufu=-118.5-(2963*f);//Internal energy of formation in kJ/kg air ub=usu-ufu;//The internal energy for constant volume adiabatic combustion in kJ/kg air Vb=Vu;//The volume for constant volume adiabatic combustion in kJ/kg air Tb=2820;//The temperature for constant volume adiabatic combustion corresponding to ub,Vb on the burnt gas chart in K pb=6500;//The pressure for constant volume adiabatic combustion corresponding to ub,Vb on the burnt gas chart in kN/m^2 hfu=-129.9-(2958*f);//The enthalpy of formation in kJ/kg air hsu=440;//The enthalpy from chart corresponding to temp Tu in kJ/kg air hb=hsu+hfu;//The enthalpy for constant pressure adiabatic combustion in kJ/kg air pb1=1560;//The pressure for constant pressure adiabatic combustion in kN/m^2 ub1=-700;//Trail and error along the pb internal energy in kJ/kg air vb1=(118-ub1)/pb;//The volume in m^3/kg air Tb1=2420;//The temperature for constant pressure adiabatic combustion corresponding to ub,Vb on the burnt gas chart in K //Output printf('(a)For constant volume adiabatic combustion,\n The temperature is %3.0f K \n The pressure is %3.0f kN/m^2 \n (b)For constant pressure adiabatic combustion, \n The temperature is %3.0f K \n The pressure is %3.0f kN/m^2',Tb,pb,Tb1,pb1)
a7205b0eb2a0afa6c8fa559100db3d5d36046ae4
1bb72df9a084fe4f8c0ec39f778282eb52750801
/test/PG36.prev.tst
6cd562b3415a1845442cb806e8c66dce08eb65c6
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gfis/ramath
498adfc7a6d353d4775b33020fdf992628e3fbff
b09b48639ddd4709ffb1c729e33f6a4b9ef676b5
refs/heads/master
2023-08-17T00:10:37.092379
2023-08-04T07:48:00
2023-08-04T07:48:00
30,116,803
2
0
null
null
null
null
UTF-8
Scilab
false
false
1,269
tst
PG36.prev.tst
- 4*a - 3*a^2 - 2*a^3 - a^4 + w - 2; a + 3*a^2 + 2*a^3 + a^4 + x + 2; a^3 + y - 2; 3*a + 3*a^2 + 2*a^3 + z + 2; w^3 + x^3 + y^3 + z^3 isolated Signature: /z.01 isolated variable: z with Coefficient 1 remaining RelationSet: - 4*a - 3*a^2 - 2*a^3 - a^4 + w - 2; a + 3*a^2 + 2*a^3 + a^4 + x + 2; a^3 + y - 2; w^3 + x^3 + y^3 + z^3 substitute by Polynomial: 3*a + 3*a^2 + 2*a^3 + 2 isolated Signature: /y.01 isolated variable: y with Coefficient 1 remaining RelationSet: - 4*a - 3*a^2 - 2*a^3 - a^4 + w - 2; a + 3*a^2 + 2*a^3 + a^4 + x + 2; 36*a + 90*a^2 + 159*a^3 + 207*a^4 + 207*a^5 + 159*a^6 + 90*a^7 + 36*a^8 + 8*a^9 + w^3 + x^3 + y^3 + 8 substitute by Polynomial: a^3 - 2 isolated Signature: /x.01 isolated variable: x with Coefficient 1 remaining RelationSet: - 4*a - 3*a^2 - 2*a^3 - a^4 + w - 2; 36*a + 90*a^2 + 171*a^3 + 207*a^4 + 207*a^5 + 153*a^6 + 90*a^7 + 36*a^8 + 9*a^9 + w^3 + x^3 substitute by Polynomial: a + 3*a^2 + 2*a^3 + a^4 + 2 isolated Signature: /w.01 isolated variable: w with Coefficient 1 remaining RelationSet: 48*a + 132*a^2 + 232*a^3 + 306*a^4 + 324*a^5 + 279*a^6 + 198*a^7 + 117*a^8 + 56*a^9 + 21*a^10 + 6*a^11 + a^12 + w^3 + 8 substitute by Polynomial: - 4*a - 3*a^2 - 2*a^3 - a^4 - 2 simplified and grouped: + 1*(0)
1626d6ea1375ee9130dceaf002807b9282e37bcc
991911b2a5fe25b4515d60ea80978b8550f90178
/SCILab/Scripts/graficos_exemplo3d4.sce
f508dc1337c3e74d389642f8a4324a59afdbc543
[]
no_license
fongoses/comunicacao-dados-2013-2
48d2f0cd592ea50c8b1ec6f815c8de62f122c4de
2981e42c5be4550ccd8dd4d4ef93b4397a1ea0d3
refs/heads/master
2016-09-10T10:44:16.480842
2013-12-17T12:48:45
2013-12-17T12:48:45
32,294,010
0
0
null
null
null
null
UTF-8
Scilab
false
false
522
sce
graficos_exemplo3d4.sce
kp=xget("pixmap");xset("pixmap",1); xset("wwpc"); // clean pixmap t=%pi*(-5:5)/5; //first plot, to fix boundaries plot3d1(t,t,sin(t)'*cos(t),35,45," ",[1,2,4]); xset("wshow"); // show pixmap if driver()=='Pos' then st=4;else st=2;end; for i=35:st:80, // loop on theta angle xset("wwpc"); plot3d1(t,t,sin(t)'*cos(t),i,45," ",[1,0,4]) xset("wshow"); end for i=45:st:80, //loop on alpha angle xset("wwpc"); plot3d1(t,t,sin(t)'*cos(t),80,i," ",[1,0,4]) xset("wshow"); end xset("pixmap",kp);
ea1ce894dc16d8cb624c0792053f306f0e85ff53
449d555969bfd7befe906877abab098c6e63a0e8
/926/CH2/EX2.4/Chapter2_Example4.sce
db1bb49a96e99ad544093e843c099ccc7068d8af
[]
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,076
sce
Chapter2_Example4.sce
//Hougen O.A., Watson K.M., Ragatz R.A., 2004. Chemical process principles Part-1: Material and Energy Balances(II Edition). CBS Publishers & Distributors, New Delhi, pp 504 //Chapter-2, illustration 4, Page 36 //Title: Expressing weight percent into mole percent //============================================================================= clear clc //INPUT W = 100; //Weight of solution in grams(Basis of calculation) w1 = 40; //Weight of sodium carbonate present in solution in grams MW = [106,18.02]; //Molecular weight of sodium carbonate and water respectively in g/g-mole //CALCULATION n1 = w1/MW(1); //To find the no of moles of sodium carbonate in g mole n2 = (W-w1)/MW(2); //To find the no of moles of water in g mole N = n1+n2; //Calculation of total no of moles in g mole x1 = n1*100/N; //Mole % of sodium carbonate x2 = n2*100/N; //Mole % of water //OUTPUT mprintf('\n mole percent of Na2CO3 = %4.2f',x1); mprintf('\n mole percent of H2O = %3.1f',x2); //================================END OF PROGRAM===============================
da82303ede106801aee9a2f203c39fb368c690ae
449d555969bfd7befe906877abab098c6e63a0e8
/773/CH15/EX15.07/15_07.sci
60f2b9ac752b435faede537f7d6ddfd968c4646c
[]
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
sci
15_07.sci
//system// s=%s; sys=syslin('c',12/(s*(s+1)*(s+2))) nyquist(sys) show_margins(sys,'nyquist') gm=g_margin(sys) if (gm<=0) printf("system is unstable") else printf("system is stable");end;
b44777bca8211cf5d74a28fc212d07c9f7b330dc
449d555969bfd7befe906877abab098c6e63a0e8
/75/CH1/EX1.1/ex_1.sce
861aafa77b17e0692ebd6013453d4f0d6eda2d81
[]
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
584
sce
ex_1.sce
// PG (6) // Taylor series for e^(-x^2) upto first four terms deff('[y]=f(x)','y=exp(-x^2)') funcprot(0) deff('[y]=fp(x)','y=-2*x*exp(-x^2)') funcprot(0) deff('[y]=fpp(x)','y=(1-2*x^2)*(-2*exp(-2*x^2))') funcprot(0) deff('[y]=g(x)','y=4*x*exp(-x^2)*(3-2*x^2)') funcprot(0) deff('[y]=gp(x)','y=(32*x^4*exp(-x^2))+(-72*x^2*exp(-x^2))+12*exp(-x^2)') funcprot(0) x0=0; x=poly(0,"x"); T = f(x0) + (x-x0)*fp(x0)/factorial(1) + (x-x0)^2 * fpp(x0)/factorial(2) + (x-x0)^3 * g(x0)/factorial(3) + (x-x0)^4 * gp(x0)/factorial(4) // Similarily Taylor series for inv(tan(x))
475b273dd60f6a0b1701b057a1fc7c152ba1eacb
66106821c3fd692db68c20ab2934f0ce400c0890
/test/jintgen/unr_format_02.tst
3c9dd3f5cfb7e385127e4fd355d9608ca9185487
[]
no_license
aurelf/avrora
491023f63005b5b61e0a0d088b2f07e152f3a154
c270f2598c4a340981ac4a53e7bd6813e6384546
refs/heads/master
2021-01-19T05:39:01.927906
2008-01-27T22:03:56
2008-01-27T22:03:56
4,779,104
2
0
null
null
null
null
UTF-8
Scilab
false
false
255
tst
unr_format_02.tst
// @Harness: verifier // @Purpose: "Test for unresolved formats" // @Result: "UnresolvedFormat @ 7:19" architecture unr_format_02 { format F = { s[15:0] } addr-mode AM { encoding = F where { s = 1 } encoding = F2 where { s = 0 } } }
a7142747109c06c7c02abc66e510a76f372b0300
449d555969bfd7befe906877abab098c6e63a0e8
/980/CH11/EX11.4/11_4.sce
bb5ca41032c22753ea966996989803e57c5e6946
[]
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
11_4.sce
clc; clear; format('v',11); w=2*%pi*10^7; //from inspection of the given E field. f=w/(2*%pi); c=3*10^8; //c=velocity of the wave in air. lemda=c/f; k=2*%pi/lemda; disp(lemda,"The wavelength(in meter)="); disp(k,"The propagation constant,k(in rad/m)=");
338a6bbda7464b9e533dcc6cb1461445e614086d
449d555969bfd7befe906877abab098c6e63a0e8
/3685/CH14/EX14.12/Ex14_12.sce
556e59dc3741934ff3b966de2d9a89d05ad79b24
[]
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,129
sce
Ex14_12.sce
clear clc // Given that L = 60 // Cooling load in kW p = 1 // Pressure in bar t = 20 // Temperature in degree celsius v = 900 // Speed of aircraft in km/h p1 = 0.35 // Pressure in bar T1 = 255 // Temperature in K nd = .85 // Diffuser efficiency rp = 6 // Pressure ratio of compressor nc = .85 // Copressor efficiency E = 0.9 // Effectiveness of air cooler nt = 0.88 // Turbine efficiency p_ = 0.08 // Pressure drop in air cooler in bar p5 = 1.08 // Pressure in bar cp = 1.005 // Heat capacity of air at constant pressure in kJ/kgK gama = 1.4 // Ratio of heat capacities of air printf("\n Example 14.12\n") V = v*(5/18) T2_ = T1 + (V^2)/(2*cp*1000) T2 = T2_ p2_ = p1*((T2_/T1)^((gama/(gama-1)))) p2 = p1 + nd*(p2_-p1) p3 = rp*p2 T3_ = T2*((p3/p2)^((gama-1)/gama)) T3 = T2 + (T3_-T2)/nc P = cp*(T3-T2) p4 = p3 - p_ T4 = T3 - E*(T3-T2) T5_ = T4/((p4/p5)^(.286)) T5 = T4 - (T4-T5_)/nt RE = cp*(t+273 - T5) m = L/51.5 Pr = m*P COP = L/Pr printf("\n Mass flow rate of air flowing through the cooling system is %f kg/s",m) printf("\n COP is %f ",COP) //The answers vary due to round off error
84e38d7d9e854f8e6a5852b9d86f6425abadbafb
449d555969bfd7befe906877abab098c6e63a0e8
/608/CH44/EX44.02/44_02.sce
25f12181bc41dcce34c51fb2b14766db8b708ddb
[]
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
661
sce
44_02.sce
//Problem 44.02:A transmission line has an inductance of 4 mH/loop km and a capacitance of 0.004 μF/km. Determine, for a frequency of operation of 1 kHz, (a) the phase delay, (b) the wavelength on the line, and (c) the velocity of propagation (in metres per second) of the signal. //initializing the variables: L = 0.004; // in Henry/loop C = 0.004E-6; // in F/loop f = 1000; // in Hz //calculation: w = 2*%pi*f //phase delay b = w*(L*C)^0.5 //wavelength Y = 2*%pi/b //speed of transmission u = f*Y printf("\n\n Result \n\n") printf("\n phase delay is %.3f rad/km",b) printf("\n wavelength Y is %.1f km",Y) printf("\n speed of transmission %.2E km/sec",u)
ab0935c06bf26922bf6f871d7e3eb0aa23c04a83
04e4dfecf86c47abbad9ad721bcbc552300a8834
/Ramp_Test/start.sce
ab899a7867d913a8ec71df49b783b6936b0aa3ee
[]
no_license
rupakrokade/scilab_local_codes
702f741a5cadc6da56e428f7379971818238ff22
4de8383487def7f18a1f19906397ed4eaf42480e
refs/heads/master
2021-01-19T06:58:47.689324
2015-10-24T11:55:34
2015-10-24T11:55:34
26,806,574
0
0
null
null
null
null
UTF-8
Scilab
false
false
112
sce
start.sce
getd ../common_files/ exec ../common_files/loader.sce exec ser_init.sce exec ramp_test.sci xcos ramp_test.xcos
be6938982000b5a8901fb0c5f96e405ec59785bb
449d555969bfd7befe906877abab098c6e63a0e8
/3718/CH13/EX13.2/Ex13_2.sce
5e748de4b4abb550a73a32d450d05db0f878799a
[]
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
570
sce
Ex13_2.sce
//Chapter 13: Fuel and Combustions //Problem: 2 clc; //Declaration of Variables C = 90 // % O = 3.0 // % S = 0.5 // % N = 0.5 // % ash = 2.5 // % LCV = 8490.5 // kcal / kg // Solution mprintf("HCV = LCV + 9 * H / 100 * 587\n") mprintf(" HCV = 1/100 * (8080 * C + 34500 * (H - O / 8) + 2240 * N)\n") H = (8490.5 - 7754.8) / (345 - 52.8) H = 4.575 mprintf(" The percentage of H is %.3f percent\n", H) HCV = LCV + 52.8 * H mprintf(" Higher calorific value of coal %.1f kcal / kg",HCV)
17cbb7e56f550fe78956ade6b2d3234dbb9f09cf
449d555969bfd7befe906877abab098c6e63a0e8
/1808/CH5/EX5.26/Chapter5_Exampl26.sce
d0fc60ebb1f3ea5b497f297319c2851946535671
[]
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
746
sce
Chapter5_Exampl26.sce
clc clear //INPUT DATA k=0.05;//clearance p1=0.98;//initial pressure in bar pd=6.4;//delivery pressure in bar n=1.32;//index of compression and expansion p0=1;//initial pressure t1=305;//temperature in K v0=17;//volume in m^3 t0=288;//teperature in K vs=0.02;//volume per stroke in m^3 //CLACULATIONS nv=1+k-k*((pd/p1)^(1/n));//volumetric efficiency in percentage va=p0*t1*v0/(p1*t0);//volume of air handled at suction condition N=va/(vs*nv*2);//speed in rpm ip=(n/(n-1))*p1*10^2*(va/60)*((pd/p1)^((n-1)/n)-1);//Indicated power in single stage double acting cylinder in kW //OUTPUT printf('(i)Speed of the compressor is %3.1f rpm \n (ii)Indicated power in single stage double acting cylinder is %3.2f kW',N,ip)
6efcf9a1989eedb8cb72ac8af69a1da682b76d01
a62e0da056102916ac0fe63d8475e3c4114f86b1
/set6/s_Electrical_Measurements_Measuring_Instruments_K._Shinghal_2318.zip/Electrical_Measurements_Measuring_Instruments_K._Shinghal_2318/CH4/EX4.6/ex_4_6.sce
65a5b2909f9e6f945c91e00259c287c82e087cc9
[]
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
152
sce
ex_4_6.sce
errcatch(-1,"stop");mode(2);//Example 4.6: Resistance ; ; vr=5;//V r=10;//k-ohm x=vr*r*10^3;// R=x;// disp(R*10^-3,"resistance is ,(k-ohm)=") exit();
c2d701671190d482cd46b4033ff2080a395a949b
3a0f15f7dcecb91239592e081ea54e118343d278
/assets/scene/spawner.sce
c24304719ec81a582116aeb0fa96badfae99d4c1
[]
no_license
JBrown88/dod
547d53d451f97205d65a272b4a9961d6ff571339
703a1a0e89291abae4999334aa0101bd9df78d01
refs/heads/master
2023-02-18T22:41:26.649143
2021-01-06T14:14:30
2021-01-06T14:14:30
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
1,717
sce
spawner.sce
{ "Scene": { "ptr_wrapper": { "id": 2147483649, "data": { "value0": 1, "value1": 13, "value2": { "Tag": "Box Spawner", "Id": { "uuid": "ecd01f1d-7f74-45b1-9911-4d3f10de6553" } }, "value3": 1, "value4": 13, "value5": { "translate": { "x": -0.003074042499065399, "y": 0.001348450779914856, "z": 0.0 }, "scale": { "x": 1.0, "y": 1.0, "z": 1.0 }, "rotate": 0.0 }, "value6": 0, "value7": 0, "value8": 0, "value9": 1, "value10": 13, "value11": { "instance": { "polymorphic_id": 2147483649, "polymorphic_name": "rl::Spawner", "ptr_wrapper": { "id": 2147483650, "data": { "SpawnPerSecond": 5.0 } } }, "script_name": "rl::Spawner", "valid": false }, "value12": 0, "value13": 0, "value14": 0, "value15": 0, "value16": 0 } } } }
386a2bc8822820c29082ca0e9cf0531e8ff4fb05
bd9ba5abb6de1e9d9485b5e98b2b68868aab21db
/Graph/plotting X [value 0-10] & y[sin(x)] with 'o' lines.sce
5b63afaa4281427eebaa23e5146bf7aa85ab2e35
[]
no_license
ShubhamRattra/Scilab_programs
c61b6538a064afe82c99507c1064cd55bbd870fa
de2bf6ab0de0b1a19c4903bb13819edc39f93d0e
refs/heads/master
2023-03-04T17:53:58.414180
2021-02-11T08:08:11
2021-02-11T08:08:11
296,920,175
2
2
null
2021-01-11T15:53:39
2020-09-19T17:37:42
Scilab
UTF-8
Scilab
false
false
47
sce
plotting X [value 0-10] & y[sin(x)] with 'o' lines.sce
x = 0 : 0.1 : 10; y = sin(x); plot(x,y,'o');
3c7ad0926e157c5b07c6423332d50404d74fd71d
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/modulate/modulate2.sce
4ba06affeb1affea2324fa62bb5bcc0afc60ec56
[]
no_license
deecube/fosseetesting
ce66f691121021fa2f3474497397cded9d57658c
e353f1c03b0c0ef43abf44873e5e477b6adb6c7e
refs/heads/master
2021-01-20T11:34:43.535019
2016-09-27T05:12:48
2016-09-27T05:12:48
59,456,386
0
0
null
null
null
null
UTF-8
Scilab
false
false
240
sce
modulate2.sce
//i/p arg x is a matrix x=[1 2 3; 4 5 7;8 9 8]; fc=100; fs=500; y = modulate(x,fc,fs,'am'); disp(y); ////output // 1. 2. 3. // 1.236068 1.545085 2.163119 // - 6.472136 - 7.2811529 - 6.472136 //
3a006a390f6ba4a7b4620eb45f17d70a1766ef79
449d555969bfd7befe906877abab098c6e63a0e8
/2024/CH12/EX12.7/12_7.sce
fc3755f0482d51497ad9e9d5a67709c9f0a295ce
[]
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
435
sce
12_7.sce
clc //Initialization of variables cp=0.25 t2=3460 //R t1=946.2 //R etat=0.45 Q=-489 t3=520 //R etat2=0.384 //calculations Qa=cp*(t2-t1) w=etat*Qa eps=-w/Q I=w+Q Qa2= cp*(t2-t3) W2=etat2*Qa2 eps2=-W2/Q I2=W2+Q //results printf("In case 1, Effectiveness of cycle = %d percent",eps*100) printf("\n in case 1, loss in available energy = %d Btu/lbm",I) printf("\n in case 2, loss in available energy = %d Btu/lbm",I2)
79eacd2748f705a9c317589555bae400b4fb6123
449d555969bfd7befe906877abab098c6e63a0e8
/833/CH13/EX13.1/Ex13_1.txt
5d588c97ab79d53fbab51577c21e47543c7de589
[]
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
208
txt
Ex13_1.txt
//Caption:Find the frequency of voltage generated //Exa:13.1 clc; clear; close; p=16//Number of poles n=375//Speed of alternator(in r.p.m) f=(p*n)/120 disp(f,'Frequency of voltage generated(in c/s)=')
a40e94570d92c2c279cbc532dc85d28bbed80131
d7633cb5f07c988a044ff9b890b9a281020fd097
/m3da01/prenom-nom.sci
6becf723771583b74fea6f81b7bb8f95177134db
[]
no_license
Supabyte/M3DA
92296615d8501dfad309cd7341480a5589f3fe35
3c80475d78ee2d9c4cae8ca7424e56346b58beec
refs/heads/master
2020-06-22T18:18:46.062697
2013-11-23T13:05:13
2013-11-23T13:05:13
197,769,562
1
0
null
null
null
null
UTF-8
Scilab
false
false
1,852
sci
prenom-nom.sci
// ----------------------------------------------------------------------- /// \brief Calcule un terme de contrainte a partir d'une homographie. /// /// \param H: matrice 3*3 définissant l'homographie. /// \param i: premiere colonne. /// \param j: deuxieme colonne. /// \return vecteur definissant le terme de contrainte. // ----------------------------------------------------------------------- function v = ZhangConstraintTerm(H, i, j) // A modifier! v = rand(1, 6); disp(v); endfunction // ----------------------------------------------------------------------- /// \brief Calcule deux equations de contrainte a partir d'une homographie /// /// \param H: matrice 3*3 définissant l'homographie. /// \return matrice 2*6 definissant les deux contraintes. // ----------------------------------------------------------------------- function v = ZhangConstraints(H) v = [ZhangConstraintTerm(H, 1, 2); ... ZhangConstraintTerm(H, 1, 1) - ZhangConstraintTerm(H, 2, 2)]; endfunction // ----------------------------------------------------------------------- /// \brief Calcule la matrice des parametres intrinseques. /// /// \param b: vecteur resultant de l'optimisation de Zhang. /// \return matrice 3*3 des parametres intrinseques. // ----------------------------------------------------------------------- function A = IntrinsicMatrix(b) // A modifier! A = rand(3, 3); endfunction // ----------------------------------------------------------------------- /// \brief Calcule la matrice des parametres extrinseques. /// /// \param iA: inverse de la matrice intrinseque. /// \param H: matrice 3*3 definissant l'homographie. /// \return matrice 3*4 des parametres extrinseques. // ----------------------------------------------------------------------- function E = ExtrinsicMatrix(iA, H) // A modifier! E = rand(3, 4); endfunction
25a9c77065a20e04a4c4a7fcfedc6ef9a4f7cb6e
449d555969bfd7befe906877abab098c6e63a0e8
/497/CH6/EX6.5/Chap6_Ex5.sce
aea88e31cecfa88ad81ee109f0d87858f8f130e2
[]
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,492
sce
Chap6_Ex5.sce
//Kunii D., Levenspiel O., 1991. Fluidization Engineering(II Edition). Butterworth-Heinemann, MA, pp 491 //Chapter-6, Example 5, Page 161 //Title: Reactor Scale-up for Geldart B Catalyst //========================================================================================================== clear clc //INPUT dtb=20;//ID of bench-scale reactor dtp=1;//ID of pilot reactor dpbar=200;//Average particle size in micrometer ephsilonmf=0.50;//Void fraction at minimum fluidization condition ephsilonmb=0.50;//Void fraction uo=30;//Superficial gas velocity in cm/s Lmb=2;//Length of fixed bed in m umf=3;//Velocity at minimum fluidization condition in cm/s umb=3;//Velocity at in cm/s g=9.80;//Acceleration due to gravity in m/s^2 pi=3.142857; //CALCULATION //In the small bench unit c=1; ubb=c*((uo-umf)/100)+0.35*(g*(dtb/100))^0.5;//Velocity using Eqn.(5.22) zsb=60*(dtb)^0.175;//Height using Eqn.(5.24) //In the large pilot unit ubp=c*((uo-umf)/100)+0.35*(g*dtp)^0.5;//Velocity using Eqn.(5.22) zsp=60*(dtp*100)^0.175;//Height using Eqn.(5.24) //OUTPUT printf('\nCondition at which bubbles transform into slugs'); mprintf('\nFor tha small bench unit\n\t\tVelocity=%fm/s\n\t\tHeight above distributor plate=%fm',ubb,zsb/100); mprintf('\nFor tha large pilot unit\n\t\tVelocity=%fm/s\n\t\tHeight above distributor plate=%fm',ubp,zsp/100); //====================================END OF PROGRAM ======================================================
0cbce7a13ebaac426d03faf69699d6cd219ce123
8d84f0f9896b6d830524723e9edec1c30f50cc7b
/Unit 3/projections by least square.sce
1a98e6af090a03ce6dbdf857ef40dd57631ab7c7
[]
no_license
saveri1205/Linear-Algebra
29a40be2c04213cec652cee72ce14411ab0eeb9a
0d2b0b23bbb9f693f4c1b4e34a1b434378ab3e18
refs/heads/master
2021-01-01T13:23:18.102349
2020-06-03T10:50:23
2020-06-03T10:50:23
239,297,246
0
0
null
null
null
null
UTF-8
Scilab
false
false
211
sce
projections by least square.sce
clear; close; clc; A=[1 0;0 1;1 1]; disp(A,'A='); B=[1;1;0]; disp(B,'B='); x=(A'*A)\(A'*B); disp(x,'x=');; C=x(1,1); D=x(2,1); disp(C,'C='); disp(D,'D='); disp('The line of best fit is B=C+Dt');
21e800329145edc13b0b73d869a5114d89ccc276
449d555969bfd7befe906877abab098c6e63a0e8
/1397/CH7/EX7.5/7_5.sce
be30d0533395d280bb17404eb1d0df275e856664
[]
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
364
sce
7_5.sce
//clc(); clear; //To determine the wavelength Eg=1.43*1.602*10^-19; //band gap energy in J T=300; //temperature in K h=6.626*10^-34; c=3*10^8; lambda=(h*c)/Eg; disp(lambda); lambda=lambda*10^6; //converting into micrometre printf("the GaAs photodetector will cease to operate above in micrometre is"); disp(lambda);
25b9591b689ee08fd21eabf9c9065afe29be40cc
6bbc9f4f7e12ef440acd3fe25a51b4f048cde42d
/Image Restoration/Harmonic-Mean-Filter.sce
6955b864abbff9d34b1244dd15b9b33047c0a84b
[]
no_license
krisbimantara/Image-Processing-SCILAB
9dee568676b4f2943c54074d8c88c84cb33b3bb2
bf8e8905efcdd6e3e0096f7a87cce8212fe0f14c
refs/heads/main
2023-03-27T04:55:37.463238
2021-03-29T13:30:26
2021-03-29T13:30:26
null
0
0
null
null
null
null
UTF-8
Scilab
false
false
844
sce
Harmonic-Mean-Filter.sce
clc;clear; a=imread('gtw.jpg'); d=double(mtlb_double(a)); me=d(:,:,1); hi=d(:,:,2); bi=d(:,:,3); bme=me; bhi=hi; bbi=bi; m=(1/9)*ones(3,3); [r1,c1]=size(mtlb_double(a)); for i=2:r1-1 for j=2:c1-1 a1me=1/me(i-1,j-1)+1/me(i-1,j)+1/me(i-1,j+1)+1/me(i,j-1)+1/me(i,j)+1/me(i,j+1)+1/me(i+1,j-1)+1/me(i+1,j)+1/me(i+1,j+1); a1hi=1/hi(i-1,j-1)+1/hi(i-1,j)+1/hi(i-1,j+1)+1/hi(i,j-1)+1/hi(i,j)+1/hi(i,j+1)+1/hi(i+1,j-1)+1/hi(i+1,j)+1/hi(i+1,j+1); a1bi=1/bi(i-1,j-1)+1/bi(i-1,j)+1/bi(i-1,j+1)+1/bi(i,j-1)+1/bi(i,j)+1/bi(i,j+1)+1/bi(i+1,j-1)+1/bi(i+1,j)+1/bi(i+1,j+1); bme(i,j)=9/a1me; bhi(i,j)=9/a1hi; bbi(i,j)=9/a1bi; end end imgrgb=cat(3,bme,bhi,bbi); figure(); subplot(121);imshow(a); title('Original Image','fontsize',8); subplot(122);imshow(uint8(imgrgb)); title('Filtered Image','fontsize',8);
6662e7789b6d17a2041cde19bb2f6b050062b1f7
c83170941847182ab67f9004c167e708f90e9132
/FOSSEE-Computer-Vision-master/macros/findChessboardCorners.sci
6b1d1189f469f8ccff6207f507910abf40a9b8ca
[]
no_license
kevgeo/FOSSEE-CV
eb7f7f5490848c045c6638771a0ae27b2d3c6f44
d155a57114e87ac8c88061fa7bb1005a4ba298ed
refs/heads/master
2021-01-09T05:40:42.637501
2017-02-03T07:58:18
2017-02-03T07:58:18
80,808,860
1
0
null
null
null
null
UTF-8
Scilab
false
false
207
sci
findChessboardCorners.sci
function [found, coordinates] = findChessboardCorners(image1,pts_row,pts_col,flags) img1 = mattolist(image1); [found coordinates] = opencv_findChessboardCorners(img1,pts_row,pts_col,flags); endfunction
78b223284207e39cc81af4b51f24f19402523222
683d2599aa2be1a5f74b928d545b20e7ea656cd1
/microdaq/macros/scan_mdaq_blocks.sci
8da7ca17fc9477b337ac924c97314042ad0cbd9e
[ "BSD-3-Clause" ]
permissive
pj1974/Scilab
5c7fb67d5cae5ac0cdf78e3dd66b97ba50f9fc95
cd54f1bd8502d6914ad6ff5271ca0e6e3d323935
refs/heads/master
2020-12-25T17:12:56.934984
2015-10-06T17:16:11
2015-10-06T17:16:11
41,862,822
0
0
null
2015-09-03T14:00:56
2015-09-03T14:00:56
null
UTF-8
Scilab
false
false
2,162
sci
scan_mdaq_blocks.sci
function obj=scan_mdaq_blocks(scs_m) global %microdaq; obj = []; mdaq_sim_blocks = ["mdaq_adc_sim","mdaq_dac_sim","mdaq_dio_config_sim",.. "mdaq_dio_get_sim","mdaq_dio_set_sim","mdaq_encoder_sim",.. "mdaq_func_key_sim","mdaq_led_sim","mdaq_pru_reg_get_sim",.. "mdaq_pru_reg_set_sim","mdaq_pwm_sim"]; for i=1:(size(scs_m.objs)-1) if typeof(scs_m.objs(i))=="Block" then if scs_m.objs(i).model.sim=="super"|scs_m.objs(i).model.sim=="csuper" then // if we have superblock make a recurrence call scs_m.objs(i).model.rpar = scan_mdaq_blocks(scs_m.objs(i).model.rpar); else // check if we have MicroDAQ block if so change type from 5 to 4 if(grep(scs_m.objs(i).model.sim(1), 'mdaq_') == 1) then if(grep(scs_m.objs(i).model.sim(1), '_sim') == 1) then if scs_m.objs(i).model.sim(2) == 5 then scs_m.objs(i).model.sim(2) = 4; if find(mdaq_sim_blocks == scs_m.objs(i).model.sim(1)) ~= [] then %microdaq.private.has_mdaq_block = %T; end end end end // in case of mdaq_signal_sim block save Signal ID param if scs_m.objs(i).model.sim(1) == "mdaq_signal_sim" %microdaq.private.mdaq_signal_id = [%microdaq.private.mdaq_signal_id, scs_m.objs(i).model.ipar(1)]; end if scs_m.objs(i).model.sim(1) == "mdaq_mem_write_sim" scs_m.objs(i).model.ipar(5) = %microdaq.private.mem_write_idx; %microdaq.private.mem_write_idx = %microdaq.private.mem_write_idx + 1; end if scs_m.objs(i).model.sim(1) == "mdaq_mem_read_sim" scs_m.objs(i).model.ipar(5) = %microdaq.private.mem_read_idx; %microdaq.private.mem_read_idx = %microdaq.private.mem_read_idx + 1; end end end end obj = scs_m; endfunction
f244961a3190666bf5e3c0952771c2f76ffe8ff0
449d555969bfd7befe906877abab098c6e63a0e8
/3682/CH7/EX7.6/Ex7_6.sce
47da97769e60ac4d55ebef39d22c8f2ccd341555
[]
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
530
sce
Ex7_6.sce
// Exa 7.6 clc; clear; // Given data // A notch filter fo=50; // cutoff frequency for notch filter(Hz) //Solution printf('As Given fo=50 Hz. Let C=0.1 μF.'); C=0.1*10^-6; // Farads // since fo=1/(2*%pi*R*C); // Therefore R - R=1/(2*%pi*fo*C); printf(' \n For R/2, take two resistors of 31.8 k Ohms in parallel and for 2C,\n take two 0.1 mocroFarads capacitors in parallel to make the twin-T notch filter\n as shown in Fig. 7.15(a) on page no. 279 where resistors R1 and R2 are for adjustment of gain.\n ')
d8f5cc0a6a5f78d80e9c8d93761c978d2a5e7e1b
b67defe3c1cae63dd1a79578f840d069568034e6
/scilab/chi2conj.sci
2ba6232d38524368f910a72408bf79e778bbb86c
[]
no_license
wmacevoy/luck
bf5d93ce00e8136634d715057a97706d3aa804b3
47e5c8eb1782a1b4f3f5b9e7583290d9a842532e
refs/heads/master
2023-05-03T14:46:51.353817
2023-04-25T03:13:44
2023-04-25T03:13:44
33,452,250
0
0
null
null
null
null
UTF-8
Scilab
false
false
489
sci
chi2conj.sci
exec("chi2probln.sci",-1); exec("chi2cdf.sci",-1); exec("nonzero.sci",-1); function y=chi2conj(x,k) [df,nsamps]=size(x); lnp=chi2probln(x,k); y0=exp((1/(k/2-1))*(lnp+(k/2)*log(2)+gammaln(k/2))); y0=max(y0,max(0,2*sqrt(k-2)-sqrt(x)) .^ 2); y=y0; iterate=%T; i=0; cutoff=sqrt(%eps); while (iterate) z=y; df=chi2probln(z,k)-lnp; dln=2*z ./ nonzero(z-k+2,cutoff); y = z + dln .* df; i=i+1; iterate = (i<1000) & or(abs(df)>cutoff); end endfunction
8351299549e23fcd8b8418ee9308e040b45f31ce
449d555969bfd7befe906877abab098c6e63a0e8
/542/CH1/EX1.4/Example_1_4.sci
6ad45e48482228d6dc64863481ca70ecdf6c7c85
[]
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
969
sci
Example_1_4.sci
//minimum size of the particle in the mixture of quartz and galena(mm) clear all; clc; printf("\n Example 1.4"); //maximum size of the particle(mm) d_max=0.065; //minimum size of the particle(mm) d_min=0.015; //density of quartz(kg/m^3) p_quartz=2650; //density of galena (kg/m^3) p_galena=7500; //minimum density of the particle which will give this seperation //When stoke's law is applied the required density is as given below function[d]=stoke_required_density() p=poly([0],'p'); d=roots((p-7500)-(p-2650)*(d_max/d_min)^2); funcprot(0); endfunction d=stoke_required_density(); printf("\n required density is = %d kg/m^3",d); //When Newton's law is applied then the required density is as given below function[e]=newton_required_density() r=poly([0],'r'); e=roots((r-7500)-(r-2650)*(d_max/d_min)); funcprot(0); endfunction e=newton_required_density(); printf("\nrequired density is by newton law =%d kg/m^3",e);
3acb8142b467b2680fbeaa94e880f84c7c5ffc94
449d555969bfd7befe906877abab098c6e63a0e8
/1583/CH4/EX4.2/FSNT_Ex_4_2.sce
d93b18e037a3f2e71c940a7bf0432931763173b2
[]
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
291
sce
FSNT_Ex_4_2.sce
clc //Chapter 4:Frequency selective networks and transformers //example 4.2 //given //Forty decibles corresponds to a voltage ratio of 100:1 therefore since A(jwo)=1 Ajwo=0.01 n=5//no. of harmonics Q=n/(Ajwo*(n^2-1))//quality point mprintf('the minimum circuit Q is =Qmin = %f ',Q)
1898442c63b8f5ab2a19d31d4c1beccdb851b4cc
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.4/Unix-Windows/scilab-2.4/macros/m2sci/sci_meshgrid.sci
50a189110de72d4a42be68bb0f52afcd9e2f2b64
[ "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
777
sci
sci_meshgrid.sci
function [stk,txt,top]=sci_meshgrid() // Copyright INRIA txt=[] if rhs==2 then X=stk(top-1)(1) Y=stk(top)(1) txt='// translation of meshgrid('+makeargs([X,Y])+')' if ~isname(X) then X=gettempvar(1) txt=[txt; X+'='+stk(top-1)(1)] end txt=[txt; X+'='+X+'(:)'''] if ~isname(Y) then Y=gettempvar(2) txt=[txt; Y+'='+stk(top)(1)] end txt=[txt; Y+'='+Y+'(:)'] txt=[txt; X+'='+X+'(ones('+Y+'(:)),:)' Y+'='+Y+'(:,ones('+X+'(1,:)))'] stk=list(list(X,'0','?','?','1'),list(Y,'0','?','?','1')) else X=stk(top-2)(1) Y=stk(top-1)(1) Z=stk(top)(1) txt='// translation of meshgrid('+makeargs([X,Y,Z])+')' X='mtlb_meshgrid('+makeargs([X,Y,Z])+')' stk=list(list(X,'-1','?','?','1'),list(X,'-1','?','?','1')) end
40198bdf85230d0994d812acd3472551b6a7e79e
449d555969bfd7befe906877abab098c6e63a0e8
/3137/CH17/EX17.41/Ex17_41.sce
bb104a5c29b632efb5c68b82fb8b7c020ffa48ca
[]
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
305
sce
Ex17_41.sce
//Initilization of variables Wc=100 //lb r= 1 //ft F=80 //lb k=50 //lb/ft s=6 //in g=32.2 //ft/s^2 //Calculations //Work done on the system U=-0.5*k*(1)+F*(s/12) //ft-lb //Initial KE is zero Vo=sqrt(U/(0.5*(Wc/g+0.5*(Wc/g)*r))) //ft/s //Result clc printf('The initial speed is %f ft/s',Vo)
4c97a4fbd7ecbd4d9e766063ff08eac0b423f7df
449d555969bfd7befe906877abab098c6e63a0e8
/32/CH1/EX1.03/1_03.sce
f764b8cd8529687f6db54fe7f462433476839e03
[]
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
1_03.sce
//pathname=get_absolute_file_path('1.03.sce') //filename=pathname+filesep()+'1.03-data.sci' //exec(filename) //Difference in mercury column(in m): h=30*10^-2 //Atmospheric Pressure(in kPa): pa=101 //Acceleration due to gravity(in m/s^2): g=9.78 //Guage pressure(in kPa): gp=13550*g*h*10^-3 //Actual pressure: ap=gp+pa printf("\n\n RESULT \n\n") printf("\n\n Actual pressure of air= %f kPa",ap)
af9e875b7fffdcec82d4fef8ddc1f7205478073e
449d555969bfd7befe906877abab098c6e63a0e8
/3733/CH17/EX17.17/Ex17_17.sce
03b80ad6db8ff9f14a1ace9a382b14fc1e78f2d7
[]
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,200
sce
Ex17_17.sce
// Example 17_17 clc;funcprot(0); //Given data m_s=250;// tons/hr T_s=40;// °C T_wi=30;//°C T_wo=36;//°C U_o=2.5;//kW/m^2°C P_t=0.078;// bar v=1.8;// m/s d_i=23;// mm d_o=25;// mm rho_w=1000;// kg/m^3 moisture=12;// Percentage x_2=(100-12)/100;// Dryness fraction p_t=0.078;// bar C_pw=4.2;// kJ/kg.°C R=287;// J/kg°C v=1.8;// m/s //Calculation //From steam tables,at 40°C\ p_sat=0.074;//bar h_fg2=2407;// kJ/kg v_g2=19.54;// m^3/kg //gradh=H_2-h_3 gradh=x_2*h_fg2;// kJ/kg m_s=(250*1000)/3600;// kg/sec m_w=(m_s*gradh)/(C_pw*(T_wo-T_wi));// kg/sec p_air=p_t-p_sat;// bar v_s2=x_2*v_g2;// m^3/kg m_a=(m_s*v_s2*p_air*10^5)/(R*(T_s+273));// kg/sec Theta_i=(T_s-T_wi);// °C Theta_o=(T_s-T_wo);// °C LMTD=(Theta_i-Theta_o)/(log(Theta_i/Theta_o));//Logrithemic mean temperature difference in °C A_s=(m_s*gradh)/(U_o*LMTD);// m^2 n=(m_w)/((%pi/4)*(d_i/1000)^2*rho_w*v);// Number of tubes L=A_s/(%pi*(d_o/1000)*n);// Length in m printf('\nQuantity of water circulation=%0.0f kg/sec \nAir leakage in the condenser=%0.2f kg/sec \nThe length of each tube,L=%0.1f m \nNumber of condenser tubes,n=%0.0f',m_w,m_a,L,n); // The answer vary due to round off error
bdcc97107014bb2dfa6148f5ec545645df43f447
449d555969bfd7befe906877abab098c6e63a0e8
/3472/CH17/EX17.11/Example17_11.sce
e563ac66979ce1099defc3bdb03ed571e03bc9e0
[]
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
905
sce
Example17_11.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 10: POWER SYSTEM STABILITY // EXAMPLE : 10.11 : // Page number 303 clear ; clc ; close ; // Clear the work space and console // Given data f = 50.0 // Frequency(Hz) G = 100.0 // Rating of generator(MVA) H = 5.0 // Inertia constant(MJ/MVA) P_a = 20.0 // Acceleration power(MVA) // Calculations GH = G*H // Energy stored in rotor at synchronous speed(MJ) M = GH/(180*f) // Angular momentum acceleration = P_a/M // Acceleration(°/sec^2) // Results disp("PART II - EXAMPLE : 10.11 : SOLUTION :-") printf("\nKinetic energy stored in the rotor at synchronous speed, GH = %.f MJ", GH) printf("\nAcceleration = %.f°/sec^2", acceleration)
feffb36b4a823325ef3ccc7d124006c27e1a1a6c
449d555969bfd7befe906877abab098c6e63a0e8
/1172/CH9/EX9.2.2/Example9_2b.sce
e3f01e30200e884a18cf0a94829ded1769e42ef1
[]
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
665
sce
Example9_2b.sce
clc // given that m_capella = 0.05 // magnitude of brightness of capella at 14 parsecs m_sun = 4.8 // absolute magnitude of brightness of sun d = 14 // distance of capella in parsecs D = 10 // distance of capella considerd for observation // sample problem 2b page No. 333 printf("\n # Problem 2a # \n") printf("Standard formula used \n\t M = m - 2.5log(L/L_0) ") M_capella = m_capella - 5*log10(d/D) // calculation of absolute magnitude of brightness at distance of 10 parsecs del_m = m_sun - M_capella // difference between absolute magnitude of sun and capella ratio = 10^(del_m/2.5) printf ("\n Capella is %f times brighter than sun.", ratio )
c1f4be4040f262e660c676b50211ad3e642cc0d7
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.4.1/Unix-Windows/scilab-2.4.1/macros/util/test2p.sci
c63206df12416ef32d1d68b75d783e0f86500f5d
[ "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
384
sci
test2p.sci
function [y]=test2p(n) //! // Copyright INRIA [o,i]=argn(0); if i < 1 then error(58); end; if type(n) <>1 then error(53,1); end; if size(n) <> [1 1] then error(89,1); end; // if n < 1 then y=1; else p=log(n)/log(2); rp=1 - p + int(p); if rp < 1e-7 then p=int(p)+1; else p=int(p); end; r=n-2**p; if r <= 1e-7 then y=0; else y=1; end; end;
4473ea3550e439559859e9f2205c738bfee6f120
b387571bdd041f3b3d606bee94a06f97e87cab34
/Calculo Numerico/Scilab/iteração não-linear/falsa posicao.sce
42779df5072593f5b759c85b131df01235e214af
[]
no_license
GuilhermeGueds/Faculdade
6704a9ce91f7cc7874e3fbaefa28555076fab7d7
6f84829ea031f80eb04ea2acf78af834d25cd4f9
refs/heads/master
2020-03-13T17:52:39.274865
2018-08-31T17:00:27
2018-08-31T17:00:27
131,225,712
0
1
null
null
null
null
UTF-8
Scilab
false
false
961
sce
falsa posicao.sce
clc clear disp("falsa posição") disp("") function [s] = f(x) s = (2*cos(x)-(%e^x)/2) endfunction a=-1; b=2; x = 0; e = 0.01; k =1; x = ((a*f(b))-(b*f(a)))/(f(b)-f(a)) printf(' interaçoes: %d\n', k); printf(' a: %f\n', a); printf(' b: %f\n', b); printf(' x: %f\n', x); disp("--------------------------------------------") while abs(b-a) >e & abs(f(x))>e x = ((a*f(b))-(b*f(a)))/(f(b)-f(a)) if f(x) == 0; break; else if (f(a)* f(x)) > 0 a = x; else b = x; end end x = ((a*f(b))-(b*f(a)))/(f(b)-f(a)) k = k + 1; printf(' interaçoes: %d\n', k); printf(' a: %f\n', a); printf(' b: %f\n', b); printf(' x: %f\n', x); disp("--------------------------------------------") end printf('resultado x: %f\n', x); printf('interaçoes: %d\n', k); printf('resultado x: %f\n', x); printf('resultado (b-a): %f\n', (b-a)); printf('resultado f(x): %f\n', abs(f(x)));
455504841b449b260c742a2277b016c66de7c48e
449d555969bfd7befe906877abab098c6e63a0e8
/3131/CH2/EX2.11/2_11.sce
9ad6ecb83759c80e21cf08e88cd0a7b604b888e2
[]
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
554
sce
2_11.sce
clear all; clc; disp("Ex 2_11") a1=60 a=a1*%pi/180 b1=45 b=b1*%pi/180 c1=120 c=c1*%pi/180 f1=300 f2=700 f1_x=f1*cos(b) f1_y=f1*cos(a) f1_z=f1*cos(c) printf('\n\nF1 = (%.1fi+%.0fj%.0fk) N',f1_x,f1_y,f1_z) FR=800 f2_x=0-f1_x f2_y=800-f1_y f2_z=0-f1_z printf('\n\nF_2x = %.1f N',f2_x) printf('\n\nF_2y = %.0f N',f2_y) printf('\n\nF_2z = %.0f N',f2_z) p1=acos(f2_x/f2) p=p1*180/%pi q1=acos(f2_y/f2) q=q1*180/%pi r1=acos(f2_z/f2) r=r1*180/%pi printf('\n\n alpha2 = %.0f degrees',p) printf('\n\n beta2 = %.1f degrees',q) printf('\n\n gamma2 = %.1f degrees',r)
f75e6b4554c1d13bf9cab9de796827902c4132aa
f542bc49c4d04b47d19c88e7c89d5db60922e34e
/PresentationFiles_Subjects/CONT/YU32PFM/ATWM1_Working_Memory_MEG_YU32PFM_Session1/ATWM1_Working_Memory_MEG_Salient_Cued_Run1.sce
81764b3ab35da7804174c102d7f07884f149ea38
[]
no_license
atwm1/Presentation
65c674180f731f050aad33beefffb9ba0caa6688
9732a004ca091b184b670c56c55f538ff6600c08
refs/heads/master
2020-04-15T14:04:41.900640
2020-02-14T16:10:11
2020-02-14T16:10:11
56,771,016
0
1
null
null
null
null
UTF-8
Scilab
false
false
49,381
sce
ATWM1_Working_Memory_MEG_Salient_Cued_Run1.sce
# ATWM1 MEG Experiment scenario = "ATWM1_Working_Memory_MEG_salient_cued_run1"; #scenario_type = fMRI; # Fuer Scanner #scenario_type = fMRI_emulation; # Zum Testen scenario_type = trials; # for MEG #scan_period = 2000; # TR #pulses_per_scan = 1; #pulse_code = 1; pulse_width=6; default_monitor_sounds = false; active_buttons = 2; response_matching = simple_matching; button_codes = 10, 20; default_font_size = 36; default_font = "Arial"; default_background_color = 0 ,0 ,0 ; write_codes=true; # for MEG only begin; #Picture definitions box { height = 382; width = 382; color = 0, 0, 0;} frame1; box { height = 369; width = 369; color = 255, 255, 255;} frame2; box { height = 30; width = 4; color = 0, 0, 0;} fix1; box { height = 4; width = 30; color = 0, 0, 0;} fix2; box { height = 30; width = 4; color = 255, 0, 0;} fix3; box { height = 4; width = 30; color = 255, 0, 0;} fix4; box { height = 369; width = 369; color = 42, 42, 42;} background; TEMPLATE "StimuliDeclaration.tem" {}; trial { sound sound_incorrect; time = 0; duration = 1; } wrong; trial { sound sound_correct; time = 0; duration = 1; } right; trial { sound sound_no_response; time = 0; duration = 1; } miss; # Start of experiment (MEG only) - sync with CTF software trial { picture { box frame1; x=0; y=0; box frame2; x=0; y=0; box background; x=0; y=0; bitmap fixation_cross_black; x=0; y=0; } expStart; time = 0; duration = 1000; code = "ExpStart"; port_code = 80; }; # baselinePre (at the beginning of the session) trial { picture { box frame1; x=0; y=0; box frame2; x=0; y=0; box background; x=0; y=0; bitmap fixation_cross_black; x=0; y=0; }default; time = 0; duration = 10000; #mri_pulse = 1; code = "BaselinePre"; port_code = 91; }; TEMPLATE "ATWM1_Working_Memory_MEG.tem" { trigger_encoding trigger_retrieval cue_time preparation_time encoding_time single_stimulus_presentation_time delay_time retrieval_time intertrial_interval alerting_cross stim_enc1 stim_enc2 stim_enc3 stim_enc4 stim_enc_alt1 stim_enc_alt2 stim_enc_alt3 stim_enc_alt4 trial_code stim_retr1 stim_retr2 stim_retr3 stim_retr4 stim_cue1 stim_cue2 stim_cue3 stim_cue4 fixationcross_cued retr_code the_target_button posX1 posY1 posX2 posY2 posX3 posY3 posX4 posY4; 41 62 292 292 399 125 2092 2992 2242 fixation_cross gabor_099 gabor_157 gabor_141 gabor_126 gabor_099 gabor_157_alt gabor_141 gabor_126_alt "1_1_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2100_3000_2250_gabor_patch_orientation_099_157_141_126_target_position_2_4_retrieval_position_2" gabor_circ gabor_157_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_1_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_157_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1742 2992 2242 fixation_cross gabor_172 gabor_012 gabor_032 gabor_050 gabor_172 gabor_012_alt gabor_032 gabor_050_alt "1_2_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1750_3000_2250_gabor_patch_orientation_172_012_032_050_target_position_2_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_050_framed blank blank blank blank fixation_cross_target_position_2_4 "1_2_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_050_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2042 2992 2592 fixation_cross gabor_148 gabor_127 gabor_016 gabor_038 gabor_148_alt gabor_127 gabor_016 gabor_038_alt "1_3_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2050_3000_2600_gabor_patch_orientation_148_127_016_038_target_position_1_4_retrieval_position_1" gabor_148_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_3_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_148_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2192 2992 2042 fixation_cross gabor_006 gabor_074 gabor_089 gabor_146 gabor_006 gabor_074_alt gabor_089_alt gabor_146 "1_4_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2200_3000_2050_gabor_patch_orientation_006_074_089_146_target_position_2_3_retrieval_position_3" gabor_circ gabor_circ gabor_089_framed gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_4_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_089_retrieval_position_3" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 64 292 292 399 125 1842 2992 1942 fixation_cross gabor_091 gabor_138 gabor_007 gabor_072 gabor_091_alt gabor_138_alt gabor_007 gabor_072 "1_5_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_300_300_399_1850_3000_1950_gabor_patch_orientation_091_138_007_072_target_position_1_2_retrieval_position_3" gabor_circ gabor_circ gabor_007_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_5_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_007_retrieval_position_3" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2092 2992 2192 fixation_cross gabor_087 gabor_103 gabor_057 gabor_127 gabor_087_alt gabor_103 gabor_057 gabor_127_alt "1_6_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2100_3000_2200_gabor_patch_orientation_087_103_057_127_target_position_1_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_176_framed blank blank blank blank fixation_cross_target_position_1_4 "1_6_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_176_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2042 2992 2292 fixation_cross gabor_059 gabor_091 gabor_031 gabor_164 gabor_059 gabor_091_alt gabor_031_alt gabor_164 "1_7_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2050_3000_2300_gabor_patch_orientation_059_091_031_164_target_position_2_3_retrieval_position_2" gabor_circ gabor_141_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_7_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_141_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2042 2992 2592 fixation_cross gabor_144 gabor_057 gabor_016 gabor_167 gabor_144 gabor_057_alt gabor_016_alt gabor_167 "1_8_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2050_3000_2600_gabor_patch_orientation_144_057_016_167_target_position_2_3_retrieval_position_2" gabor_circ gabor_057_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_8_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_057_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2242 2992 2142 fixation_cross gabor_171 gabor_017 gabor_087 gabor_142 gabor_171 gabor_017_alt gabor_087 gabor_142_alt "1_9_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2250_3000_2150_gabor_patch_orientation_171_017_087_142_target_position_2_4_retrieval_position_2" gabor_circ gabor_017_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_9_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_017_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2192 2992 1892 fixation_cross gabor_070 gabor_140 gabor_051 gabor_008 gabor_070_alt gabor_140 gabor_051_alt gabor_008 "1_10_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2200_3000_1900_gabor_patch_orientation_070_140_051_008_target_position_1_3_retrieval_position_1" gabor_119_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_10_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_119_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 63 292 292 399 125 2092 2992 2142 fixation_cross gabor_035 gabor_017 gabor_061 gabor_143 gabor_035_alt gabor_017_alt gabor_061 gabor_143 "1_11_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_300_300_399_2100_3000_2150_gabor_patch_orientation_035_017_061_143_target_position_1_2_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_097_framed blank blank blank blank fixation_cross_target_position_1_2 "1_11_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_retrieval_patch_orientation_097_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2192 2992 2492 fixation_cross gabor_074 gabor_111 gabor_090 gabor_130 gabor_074_alt gabor_111_alt gabor_090 gabor_130 "1_12_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2200_3000_2500_gabor_patch_orientation_074_111_090_130_target_position_1_2_retrieval_position_2" gabor_circ gabor_111_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_12_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_111_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1992 2992 1992 fixation_cross gabor_177 gabor_037 gabor_155 gabor_111 gabor_177_alt gabor_037_alt gabor_155 gabor_111 "1_13_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2000_3000_2000_gabor_patch_orientation_177_037_155_111_target_position_1_2_retrieval_position_2" gabor_circ gabor_037_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_13_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_037_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2242 2992 1942 fixation_cross gabor_061 gabor_039 gabor_084 gabor_102 gabor_061 gabor_039 gabor_084_alt gabor_102_alt "1_14_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2250_3000_1950_gabor_patch_orientation_061_039_084_102_target_position_3_4_retrieval_position_3" gabor_circ gabor_circ gabor_084_framed gabor_circ blank blank blank blank fixation_cross_target_position_3_4 "1_14_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_084_retrieval_position_3" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1842 2992 2492 fixation_cross gabor_110 gabor_125 gabor_090 gabor_002 gabor_110 gabor_125_alt gabor_090 gabor_002_alt "1_15_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1850_3000_2500_gabor_patch_orientation_110_125_090_002_target_position_2_4_retrieval_position_2" gabor_circ gabor_175_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_15_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_175_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 63 292 292 399 125 1792 2992 2442 fixation_cross gabor_012 gabor_094 gabor_033 gabor_168 gabor_012 gabor_094_alt gabor_033 gabor_168_alt "1_16_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_300_300_399_1800_3000_2450_gabor_patch_orientation_012_094_033_168_target_position_2_4_retrieval_position_3" gabor_circ gabor_circ gabor_078_framed gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_16_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_retrieval_patch_orientation_078_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2042 2992 1992 fixation_cross gabor_095 gabor_012 gabor_076 gabor_146 gabor_095 gabor_012_alt gabor_076 gabor_146_alt "1_17_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2050_3000_2000_gabor_patch_orientation_095_012_076_146_target_position_2_4_retrieval_position_2" gabor_circ gabor_059_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_17_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_059_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1842 2992 2342 fixation_cross gabor_162 gabor_008 gabor_147 gabor_036 gabor_162 gabor_008_alt gabor_147 gabor_036_alt "1_18_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1850_3000_2350_gabor_patch_orientation_162_008_147_036_target_position_2_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_036_framed blank blank blank blank fixation_cross_target_position_2_4 "1_18_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_036_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1742 2992 2042 fixation_cross gabor_008 gabor_024 gabor_161 gabor_129 gabor_008 gabor_024 gabor_161_alt gabor_129_alt "1_19_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1750_3000_2050_gabor_patch_orientation_008_024_161_129_target_position_3_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_084_framed blank blank blank blank fixation_cross_target_position_3_4 "1_19_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_084_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 63 292 292 399 125 1992 2992 2142 fixation_cross gabor_146 gabor_001 gabor_016 gabor_032 gabor_146 gabor_001_alt gabor_016 gabor_032_alt "1_20_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_300_300_399_2000_3000_2150_gabor_patch_orientation_146_001_016_032_target_position_2_4_retrieval_position_3" gabor_circ gabor_circ gabor_062_framed gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_20_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_retrieval_patch_orientation_062_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2142 2992 2542 fixation_cross gabor_171 gabor_065 gabor_127 gabor_106 gabor_171 gabor_065_alt gabor_127 gabor_106_alt "1_21_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2150_3000_2550_gabor_patch_orientation_171_065_127_106_target_position_2_4_retrieval_position_2" gabor_circ gabor_065_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_21_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_065_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1742 2992 2392 fixation_cross gabor_023 gabor_091 gabor_149 gabor_133 gabor_023_alt gabor_091 gabor_149 gabor_133_alt "1_22_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1750_3000_2400_gabor_patch_orientation_023_091_149_133_target_position_1_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_133_framed blank blank blank blank fixation_cross_target_position_1_4 "1_22_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_133_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2042 2992 2342 fixation_cross gabor_091 gabor_013 gabor_163 gabor_047 gabor_091_alt gabor_013 gabor_163_alt gabor_047 "1_23_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2050_3000_2350_gabor_patch_orientation_091_013_163_047_target_position_1_3_retrieval_position_1" gabor_091_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_23_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_091_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1942 2992 2492 fixation_cross gabor_041 gabor_170 gabor_148 gabor_104 gabor_041 gabor_170 gabor_148_alt gabor_104_alt "1_24_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1950_3000_2500_gabor_patch_orientation_041_170_148_104_target_position_3_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_059_framed blank blank blank blank fixation_cross_target_position_3_4 "1_24_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_059_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1942 2992 2092 fixation_cross gabor_136 gabor_108 gabor_084 gabor_069 gabor_136_alt gabor_108 gabor_084_alt gabor_069 "1_25_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1950_3000_2100_gabor_patch_orientation_136_108_084_069_target_position_1_3_retrieval_position_1" gabor_001_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_25_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_001_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 64 292 292 399 125 1892 2992 1892 fixation_cross gabor_049 gabor_164 gabor_122 gabor_032 gabor_049_alt gabor_164 gabor_122_alt gabor_032 "1_26_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_300_300_399_1900_3000_1900_gabor_patch_orientation_049_164_122_032_target_position_1_3_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_032_framed blank blank blank blank fixation_cross_target_position_1_3 "1_26_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_032_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1942 2992 2192 fixation_cross gabor_021 gabor_044 gabor_086 gabor_106 gabor_021 gabor_044_alt gabor_086 gabor_106_alt "1_27_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1950_3000_2200_gabor_patch_orientation_021_044_086_106_target_position_2_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_061_framed blank blank blank blank fixation_cross_target_position_2_4 "1_27_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_061_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2142 2992 2542 fixation_cross gabor_021 gabor_132 gabor_092 gabor_045 gabor_021 gabor_132_alt gabor_092 gabor_045_alt "1_28_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2150_3000_2550_gabor_patch_orientation_021_132_092_045_target_position_2_4_retrieval_position_2" gabor_circ gabor_132_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_28_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_132_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2242 2992 2342 fixation_cross gabor_010 gabor_084 gabor_173 gabor_146 gabor_010_alt gabor_084_alt gabor_173 gabor_146 "1_29_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2250_3000_2350_gabor_patch_orientation_010_084_173_146_target_position_1_2_retrieval_position_2" gabor_circ gabor_036_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_29_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_036_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2142 2992 2542 fixation_cross gabor_014 gabor_042 gabor_087 gabor_176 gabor_014 gabor_042_alt gabor_087_alt gabor_176 "1_30_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2150_3000_2550_gabor_patch_orientation_014_042_087_176_target_position_2_3_retrieval_position_3" gabor_circ gabor_circ gabor_132_framed gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_30_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_132_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1792 2992 2392 fixation_cross gabor_180 gabor_004 gabor_057 gabor_112 gabor_180_alt gabor_004 gabor_057 gabor_112_alt "1_31_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1800_3000_2400_gabor_patch_orientation_180_004_057_112_target_position_1_4_retrieval_position_1" gabor_180_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_31_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_180_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 63 292 292 399 125 1842 2992 2392 fixation_cross gabor_105 gabor_017 gabor_048 gabor_083 gabor_105 gabor_017_alt gabor_048_alt gabor_083 "1_32_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_300_300_399_1850_3000_2400_gabor_patch_orientation_105_017_048_083_target_position_2_3_retrieval_position_1" gabor_154_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_32_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_retrieval_patch_orientation_154_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1842 2992 2042 fixation_cross gabor_085 gabor_002 gabor_034 gabor_057 gabor_085_alt gabor_002_alt gabor_034 gabor_057 "1_33_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1850_3000_2050_gabor_patch_orientation_085_002_034_057_target_position_1_2_retrieval_position_2" gabor_circ gabor_002_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_33_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_002_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2192 2992 1992 fixation_cross gabor_102 gabor_167 gabor_032 gabor_015 gabor_102_alt gabor_167 gabor_032_alt gabor_015 "1_34_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2200_3000_2000_gabor_patch_orientation_102_167_032_015_target_position_1_3_retrieval_position_1" gabor_102_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_34_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_102_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1892 2992 2192 fixation_cross gabor_043 gabor_069 gabor_008 gabor_096 gabor_043 gabor_069_alt gabor_008 gabor_096_alt "1_35_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1900_3000_2200_gabor_patch_orientation_043_069_008_096_target_position_2_4_retrieval_position_2" gabor_circ gabor_069_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_35_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_069_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2242 2992 2192 fixation_cross gabor_140 gabor_035 gabor_082 gabor_002 gabor_140_alt gabor_035 gabor_082 gabor_002_alt "1_36_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2250_3000_2200_gabor_patch_orientation_140_035_082_002_target_position_1_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_002_framed blank blank blank blank fixation_cross_target_position_1_4 "1_36_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_002_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 64 292 292 399 125 1892 2992 2292 fixation_cross gabor_099 gabor_031 gabor_159 gabor_114 gabor_099 gabor_031 gabor_159_alt gabor_114_alt "1_37_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_300_300_399_1900_3000_2300_gabor_patch_orientation_099_031_159_114_target_position_3_4_retrieval_position_1" gabor_099_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_3_4 "1_37_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_099_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1992 2992 2492 fixation_cross gabor_180 gabor_145 gabor_127 gabor_102 gabor_180_alt gabor_145 gabor_127 gabor_102_alt "1_38_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2000_3000_2500_gabor_patch_orientation_180_145_127_102_target_position_1_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_056_framed blank blank blank blank fixation_cross_target_position_1_4 "1_38_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_056_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2142 2992 2092 fixation_cross gabor_126 gabor_042 gabor_164 gabor_100 gabor_126_alt gabor_042_alt gabor_164 gabor_100 "1_39_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2150_3000_2100_gabor_patch_orientation_126_042_164_100_target_position_1_2_retrieval_position_2" gabor_circ gabor_180_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_39_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_180_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 63 292 292 399 125 1842 2992 2042 fixation_cross gabor_087 gabor_020 gabor_175 gabor_159 gabor_087 gabor_020 gabor_175_alt gabor_159_alt "1_40_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_300_300_399_1850_3000_2050_gabor_patch_orientation_087_020_175_159_target_position_3_4_retrieval_position_2" gabor_circ gabor_069_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_3_4 "1_40_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_retrieval_patch_orientation_069_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1842 2992 1942 fixation_cross gabor_107 gabor_066 gabor_127 gabor_150 gabor_107_alt gabor_066_alt gabor_127 gabor_150 "1_41_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1850_3000_1950_gabor_patch_orientation_107_066_127_150_target_position_1_2_retrieval_position_2" gabor_circ gabor_020_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_41_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_020_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1742 2992 2442 fixation_cross gabor_175 gabor_150 gabor_011 gabor_041 gabor_175_alt gabor_150 gabor_011_alt gabor_041 "1_42_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1750_3000_2450_gabor_patch_orientation_175_150_011_041_target_position_1_3_retrieval_position_3" gabor_circ gabor_circ gabor_061_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_42_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_061_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1792 2992 2242 fixation_cross gabor_086 gabor_145 gabor_005 gabor_022 gabor_086 gabor_145_alt gabor_005 gabor_022_alt "1_43_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1800_3000_2250_gabor_patch_orientation_086_145_005_022_target_position_2_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_068_framed blank blank blank blank fixation_cross_target_position_2_4 "1_43_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_068_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2192 2992 2542 fixation_cross gabor_051 gabor_174 gabor_006 gabor_024 gabor_051 gabor_174 gabor_006_alt gabor_024_alt "1_44_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2200_3000_2550_gabor_patch_orientation_051_174_006_024_target_position_3_4_retrieval_position_3" gabor_circ gabor_circ gabor_141_framed gabor_circ blank blank blank blank fixation_cross_target_position_3_4 "1_44_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_141_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2092 2992 2292 fixation_cross gabor_092 gabor_174 gabor_050 gabor_111 gabor_092_alt gabor_174 gabor_050 gabor_111_alt "1_45_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2100_3000_2300_gabor_patch_orientation_092_174_050_111_target_position_1_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_111_framed blank blank blank blank fixation_cross_target_position_1_4 "1_45_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_111_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1792 2992 2442 fixation_cross gabor_129 gabor_083 gabor_061 gabor_042 gabor_129_alt gabor_083 gabor_061_alt gabor_042 "1_46_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1800_3000_2450_gabor_patch_orientation_129_083_061_042_target_position_1_3_retrieval_position_3" gabor_circ gabor_circ gabor_061_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_46_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_061_retrieval_position_3" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 64 292 292 399 125 2142 2992 2292 fixation_cross gabor_128 gabor_160 gabor_017 gabor_038 gabor_128 gabor_160_alt gabor_017_alt gabor_038 "1_47_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_300_300_399_2150_3000_2300_gabor_patch_orientation_128_160_017_038_target_position_2_3_retrieval_position_1" gabor_128_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_47_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_128_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1892 2992 1892 fixation_cross gabor_142 gabor_086 gabor_017 gabor_126 gabor_142 gabor_086_alt gabor_017_alt gabor_126 "1_48_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1900_3000_1900_gabor_patch_orientation_142_086_017_126_target_position_2_3_retrieval_position_2" gabor_circ gabor_086_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_48_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_086_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2142 2992 2342 fixation_cross gabor_072 gabor_159 gabor_022 gabor_132 gabor_072_alt gabor_159_alt gabor_022 gabor_132 "1_49_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2150_3000_2350_gabor_patch_orientation_072_159_022_132_target_position_1_2_retrieval_position_2" gabor_circ gabor_159_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_49_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_159_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 2092 2992 2392 fixation_cross gabor_156 gabor_125 gabor_039 gabor_095 gabor_156_alt gabor_125_alt gabor_039 gabor_095 "1_50_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_2100_3000_2400_gabor_patch_orientation_156_125_039_095_target_position_1_2_retrieval_position_1" gabor_156_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_50_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_156_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2242 2992 2592 fixation_cross gabor_172 gabor_121 gabor_142 gabor_103 gabor_172_alt gabor_121 gabor_142 gabor_103_alt "1_51_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2250_3000_2600_gabor_patch_orientation_172_121_142_103_target_position_1_4_retrieval_position_1" gabor_032_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_51_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_032_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 64 292 292 399 125 2092 2992 1992 fixation_cross gabor_008 gabor_128 gabor_061 gabor_079 gabor_008 gabor_128_alt gabor_061_alt gabor_079 "1_52_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_300_300_399_2100_3000_2000_gabor_patch_orientation_008_128_061_079_target_position_2_3_retrieval_position_1" gabor_008_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_52_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_008_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1742 2992 2292 fixation_cross gabor_090 gabor_002 gabor_158 gabor_109 gabor_090_alt gabor_002 gabor_158_alt gabor_109 "1_53_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1750_3000_2300_gabor_patch_orientation_090_002_158_109_target_position_1_3_retrieval_position_3" gabor_circ gabor_circ gabor_023_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_53_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_023_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2192 2992 2192 fixation_cross gabor_168 gabor_109 gabor_022 gabor_129 gabor_168_alt gabor_109 gabor_022 gabor_129_alt "1_54_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2200_3000_2200_gabor_patch_orientation_168_109_022_129_target_position_1_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_084_framed blank blank blank blank fixation_cross_target_position_1_4 "1_54_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_084_retrieval_position_4" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1992 2992 2092 fixation_cross gabor_080 gabor_046 gabor_154 gabor_105 gabor_080 gabor_046 gabor_154_alt gabor_105_alt "1_55_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2000_3000_2100_gabor_patch_orientation_080_046_154_105_target_position_3_4_retrieval_position_3" gabor_circ gabor_circ gabor_017_framed gabor_circ blank blank blank blank fixation_cross_target_position_3_4 "1_55_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_017_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 63 292 292 399 125 1792 2992 2242 fixation_cross gabor_020 gabor_100 gabor_045 gabor_154 gabor_020 gabor_100_alt gabor_045_alt gabor_154 "1_56_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_300_300_399_1800_3000_2250_gabor_patch_orientation_020_100_045_154_target_position_2_3_retrieval_position_1" gabor_068_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_56_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_retrieval_patch_orientation_068_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1742 2992 2092 fixation_cross gabor_118 gabor_085 gabor_039 gabor_059 gabor_118 gabor_085 gabor_039_alt gabor_059_alt "1_57_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1750_3000_2100_gabor_patch_orientation_118_085_039_059_target_position_3_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_059_framed blank blank blank blank fixation_cross_target_position_3_4 "1_57_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_059_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1892 2992 1942 fixation_cross gabor_060 gabor_010 gabor_040 gabor_129 gabor_060_alt gabor_010 gabor_040_alt gabor_129 "1_58_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1900_3000_1950_gabor_patch_orientation_060_010_040_129_target_position_1_3_retrieval_position_3" gabor_circ gabor_circ gabor_176_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_58_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_176_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1792 2992 2592 fixation_cross gabor_090 gabor_044 gabor_170 gabor_109 gabor_090 gabor_044_alt gabor_170_alt gabor_109 "1_59_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1800_3000_2600_gabor_patch_orientation_090_044_170_109_target_position_2_3_retrieval_position_3" gabor_circ gabor_circ gabor_125_framed gabor_circ blank blank blank blank fixation_cross_target_position_2_3 "1_59_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_125_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1792 2992 2142 fixation_cross gabor_006 gabor_068 gabor_034 gabor_094 gabor_006 gabor_068_alt gabor_034 gabor_094_alt "1_60_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1800_3000_2150_gabor_patch_orientation_006_068_034_094_target_position_2_4_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_094_framed blank blank blank blank fixation_cross_target_position_2_4 "1_60_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_094_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2242 2992 2042 fixation_cross gabor_175 gabor_091 gabor_123 gabor_062 gabor_175_alt gabor_091_alt gabor_123 gabor_062 "1_61_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2250_3000_2050_gabor_patch_orientation_175_091_123_062_target_position_1_2_retrieval_position_1" gabor_035_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_61_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_035_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 64 292 292 399 125 1942 2992 2442 fixation_cross gabor_117 gabor_133 gabor_010 gabor_050 gabor_117_alt gabor_133 gabor_010 gabor_050_alt "1_62_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_300_300_399_1950_3000_2450_gabor_patch_orientation_117_133_010_050_target_position_1_4_retrieval_position_2" gabor_circ gabor_133_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_62_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_133_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1992 2992 1892 fixation_cross gabor_159 gabor_024 gabor_144 gabor_096 gabor_159_alt gabor_024 gabor_144_alt gabor_096 "1_63_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2000_3000_1900_gabor_patch_orientation_159_024_144_096_target_position_1_3_retrieval_position_3" gabor_circ gabor_circ gabor_006_framed gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_63_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_006_retrieval_position_3" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1942 2992 2242 fixation_cross gabor_011 gabor_096 gabor_126 gabor_158 gabor_011 gabor_096_alt gabor_126 gabor_158_alt "1_64_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1950_3000_2250_gabor_patch_orientation_011_096_126_158_target_position_2_4_retrieval_position_2" gabor_circ gabor_096_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_64_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_096_retrieval_position_2" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 63 292 292 399 125 1942 2992 2142 fixation_cross gabor_032 gabor_144 gabor_120 gabor_070 gabor_032_alt gabor_144 gabor_120_alt gabor_070 "1_65_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_300_300_399_1950_3000_2150_gabor_patch_orientation_032_144_120_070_target_position_1_3_retrieval_position_2" gabor_circ gabor_006_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_65_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_UncuedRetriev_retrieval_patch_orientation_006_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1892 2992 1992 fixation_cross gabor_042 gabor_120 gabor_077 gabor_100 gabor_042_alt gabor_120_alt gabor_077 gabor_100 "1_66_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_1900_3000_2000_gabor_patch_orientation_042_120_077_100_target_position_1_2_retrieval_position_2" gabor_circ gabor_166_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_2 "1_66_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_166_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 1992 2992 1942 fixation_cross gabor_142 gabor_108 gabor_079 gabor_032 gabor_142_alt gabor_108 gabor_079 gabor_032_alt "1_67_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2000_3000_1950_gabor_patch_orientation_142_108_079_032_target_position_1_4_retrieval_position_1" gabor_002_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_4 "1_67_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_002_retrieval_position_1" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 62 292 292 399 125 1742 2992 1892 fixation_cross gabor_030 gabor_140 gabor_167 gabor_109 gabor_030_alt gabor_140 gabor_167_alt gabor_109 "1_68_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_300_300_399_1750_3000_1900_gabor_patch_orientation_030_140_167_109_target_position_1_3_retrieval_position_1" gabor_030_framed gabor_circ gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_1_3 "1_68_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_CuedRetrieval_retrieval_patch_orientation_030_retrieval_position_1" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 61 292 292 399 125 2042 2992 2092 fixation_cross gabor_179 gabor_138 gabor_001 gabor_052 gabor_179 gabor_138_alt gabor_001 gabor_052_alt "1_69_Encoding_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_300_300_399_2050_3000_2100_gabor_patch_orientation_179_138_001_052_target_position_2_4_retrieval_position_2" gabor_circ gabor_090_framed gabor_circ gabor_circ blank blank blank blank fixation_cross_target_position_2_4 "1_69_Retrieval_Working_Memory_MEG_P2_LR_Salient_DoChange_CuedRetrieval_retrieval_patch_orientation_090_retrieval_position_2" 2 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; 41 64 292 292 399 125 1892 2992 2342 fixation_cross gabor_171 gabor_132 gabor_149 gabor_060 gabor_171_alt gabor_132_alt gabor_149 gabor_060 "1_70_Encoding_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_300_300_399_1900_3000_2350_gabor_patch_orientation_171_132_149_060_target_position_1_2_retrieval_position_4" gabor_circ gabor_circ gabor_circ gabor_060_framed blank blank blank blank fixation_cross_target_position_1_2 "1_70_Retrieval_Working_Memory_MEG_P2_LR_Salient_NoChange_UncuedRetriev_retrieval_patch_orientation_060_retrieval_position_4" 1 58.69 58.69 -58.69 58.69 -58.69 -58.69 58.69 -58.69; }; # baselinePost (at the end of the session) trial { picture { box frame1; x=0; y=0; box frame2; x=0; y=0; box background; x=0; y=0; bitmap fixation_cross_black; x=0; y=0; }; time = 0; duration = 5000; code = "BaselinePost"; port_code = 92; };
aa3c8c535d614c1880d04625d79fc1dd93ab82cb
845c8ae1a329364b6568f3529318bf19080ab941
/hdl/Inc8.tst
a851a1e05defd4615883743434f8680edd593881
[ "Apache-2.0" ]
permissive
DChristianson/FPGA_lpu
133a843e4b1df4f225aee01438930d7c42659d08
86f6cdc9b0aecfbdccd6ed23b73a5026776db18f
refs/heads/main
2023-02-26T04:53:41.561411
2021-02-04T23:52:08
2021-02-04T23:52:08
336,049,181
0
0
null
null
null
null
UTF-8
Scilab
false
false
296
tst
Inc8.tst
load Inc8.hdl, output-file Inc8.out, compare-to Inc8.cmp, output-list in%B1.8.1 out%B1.8.1; set in %B00000000, // in = 0 eval, output; set in %B11111111, // in = -1 eval, output; set in %B00000101, // in = 5 eval, output; set in %B11111011, // in = -5 eval, output;
39966fbf8c7b8c07bc8f07c3a8251b44f0e69a99
8217f7986187902617ad1bf89cb789618a90dd0a
/browsable_source/2.2/Unix/scilab-2.2/macros/percent/%rlr.sci
8da0008ab3fbb63d949bd499dede9a06558d2f34
[ "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-public-domain", "MIT" ]
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
523
sci
%rlr.sci
//<s1>=%rlr(s1,s2) // %rlr(s1,s2) calcule la division a gauche de la matrice de fractions //rationnelles s1 et de la matrice de fractions rationnelles s2 (s1\s2) //! [s1,s2]=sysconv(s1,s2) [n,m]=size(s1(2)) if n<>m then error(43),end if m*n=1 then s1=%rmr(tlist('r',s1(3),s1(2),s1(4)),s2) else // reduction de s1 sous la forme D1**(-1)* N1 (D1 diagonale) p=s1(2) s1=s1(3) for l=1:n [pp,fact]=lcm(s1(l,:)) p(l,:)=p(l,:).*fact s2(l,:)=s2(l,:)*pp end s1=invr(p)*s2, end //end
d86c412edc3044455e188bf62e95c264e0b570b1
449d555969bfd7befe906877abab098c6e63a0e8
/1301/CH15/EX15.5/ex15_5.sce
d5cfcf6f3094cd4d13b21dfed5c306943b10224a
[]
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
429
sce
ex15_5.sce
clc; r=5; //resistance in ohm p=1000; //power in Watt va=100; //potential diff in Volt for a vb=100000; //potential diff in volt for b ia=p/va; //calculating current ib=p/vb; //calculating current ha=ia*ia*r; //heat in Watt hb=ib*ib*r; //heat in Watt disp(ha,"Heat produced by a in Watt = "); //diplaying result disp(hb,"Heat produced by b in Watt = "); //diplaying result
6234a094524ac413277654e332793846a7cfb8a0
449d555969bfd7befe906877abab098c6e63a0e8
/1370/CH5/EX5.3/exp5_3.sce
cbffc5d9385394cb393ebbef80f242604ad31d7c
[]
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
299
sce
exp5_3.sce
//Example 5.3. frequency of induced emf in the rotor clc disp("The given values are,") disp("P = 4, f = 50 Hz, N = 1470 r.p.m") ns=(120*50)/4 format(5) disp(ns,"N_s(in r.p.m) = 120f/P =") s=(1500-1470)/1500 disp(s,"s = N_s-N / N_s =") f=0.02*50 disp(f,"Therefore, f_r(in Hz) = s*f =")
f1ae6881c04942577a2176f70e19255c08f91f2d
449d555969bfd7befe906877abab098c6e63a0e8
/73/CH7/EX7.16/Example7_16.sci
96d49ce90fb855315adeedfafc1267315dd4fb49
[]
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
694
sci
Example7_16.sci
//Chapter 7_Operational Amplifier Characteristics //Caption : Largest Amplitude //Example7.16: An amplifier has a 10 kHz sinewave input signal. Find the largest amplitude that the output of the amplifier can be,without distortion owing to slew rate limiting. Given slew rate=0.5V/u sec. //Solution: clear; clc; Fmax=10*10^3;//frequency of sinewave input signal in Hz SlewRate=0.5*10^6;//given in question in V/sec Vm=SlewRate/(2*%pi*Fmax);//Since Fmax=slew rate/(2*%pi*Vm) disp('V(peak)',Vm,'largest amplitude that the output of the amplifier can be without distortion owing to slew rate limitation is:') //Note: // calculated amplitude is 7.9577 V, which can be approximated to 8 V
338d0a4217d17d3a7ff238f1e92355790bc783d7
449d555969bfd7befe906877abab098c6e63a0e8
/2705/CH1/EX1.9/Ex1_9.sce
a5cc15bad3144a22eb5f68aa0b96515efbef09ea
[]
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
553
sce
Ex1_9.sce
clear; clc; disp('Example 1.9'); // Given values m_dot = 20.4; // mass flowrate of petrol, [kg/h] c = 43; // calorific value of petrol, [MJ/kg] n = .2; // Thermal efficiency of engine // solution m_dot = 20.4/3600; // [kg/s] c = 43*10^6; // [J/kg] // power output P_out = n*m_dot*c; // [W] mprintf('\n The power output of the engine is = %f kJ\n',P_out*10^-3); // power rejected P_rej = m_dot*c*(1-n); // [W] P_rej = P_rej*60*10^-6; // [MJ/min] mprintf('\n The energy rejected by the engine is = %f MJ/min \n',P_rej); //End
50d26f3b1944b44805f5cdc0a7ee3565eb9e9812
449d555969bfd7befe906877abab098c6e63a0e8
/3769/CH17/EX17.25/Ex17_25.sce
c4c06ea729acd8549394af4c6ae3bfb416a92ada
[]
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
142
sce
Ex17_25.sce
clear //Given f=18 //cm u=1.5 //Calculation R=(u-1)*f //Result printf("\n Radius of the curvature is %0.3f cm", R)
79e21a79cde96aa95ce50a2bccb5606ab77793b4
449d555969bfd7befe906877abab098c6e63a0e8
/1484/CH7/EX7.15/7_15.sce
c2d1636fc631f2c18c51c7152adff8603c631d62
[]
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
280
sce
7_15.sce
clc //initialisation of variables i= 1/6400 b= 40 //ft d= 5 //ft C= 140 h= 6 //ft g= 32.2 //ft/sec^2 //CALCULATIONS A= b*d P= b+2*d m= A/P v= C*sqrt(m*i) V= v*(d/h) Q= v*b*d x= h-(Q/(3.09*(b/2)))^(2/3)-(V^2/(2*g)) //RESULTS printf ('height of pump= %.2f ft',x)
ad88ddf8f03bc803f5c2a02ff302d80cc805d9f9
1573c4954e822b3538692bce853eb35e55f1bb3b
/DSP Functions/allpasslp2mb/test_9.sce
42acb96d4b9a462e7bc9806139d89d661c0b622e
[]
no_license
shreniknambiar/FOSSEE-DSP-Toolbox
1f498499c1bb18b626b77ff037905e51eee9b601
aec8e1cea8d49e75686743bb5b7d814d3ca38801
refs/heads/master
2020-12-10T03:28:37.484363
2017-06-27T17:47:15
2017-06-27T17:47:15
95,582,974
1
0
null
null
null
null
UTF-8
Scilab
false
false
269
sce
test_9.sce
// Test # 9 : Invalid flag test exec('./allpasslp2mb.sci',-1); [n,d]=allpasslp2mb(0.4,[0.3,0.4],'j'); //!--error 10000 //Invalid option,input should be either pass or stop //at line 68 of function allpasslp2mb called by : //[n,d]=allpasslp2mb(0.4,[0.3,0.4],'j')
231baf3c9142c937435353748f6e4e04c3c8db2b
449d555969bfd7befe906877abab098c6e63a0e8
/1736/CH1/EX1.22/Ch01Ex22.sce
e49a91a1f4219679c312109a264be448c0be3580
[]
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,152
sce
Ch01Ex22.sce
// Scilab Code Ex 1.22 Page-33 (2006) clc; clear; r = 1.746e-010; // Atomic radius of lead atom, angstrom a = 4*r/sqrt(2); // Interatomic spacing, m h = 1; k = 0; l = 0; // Miller Indices for planes in a cubic crystal d_100 = a/(h^2+k^2+l^2)^(1/2); // The interplanar spacing for cubic crystals, m printf("\nThe interplanar spacing between consecutive (100) planes = %4.2f angstrom", d_100/1e-010); h = 1; k = 1; l = 0; // Miller Indices for planes in a cubic crystal d_110 = a/(h^2+k^2+l^2)^(1/2); // The interplanar spacing for cubic crystals, m printf("\nThe interplanar spacing between consecutive (110) planes = %5.3f angstrom", d_110/1e-010); h = 1; k = 1; l = 1; // Miller Indices for planes in a cubic crystal d_111 = a/(h^2+k^2+l^2)^(1/2); // The interplanar spacing for cubic crystals, m printf("\nThe interplanar spacing between consecutive (111) planes = %4.2f angstrom", d_111/1e-010); // Result // The interplanar spacing between consecutive (100) planes = 4.94 angstrom // The interplanar spacing between consecutive (110) planes = 3.492 angstrom // The interplanar spacing between consecutive (111) planes = 2.85 angstrom
b0f5aba048e151c885ffcf0fd5647838eaa76105
449d555969bfd7befe906877abab098c6e63a0e8
/3838/CH3/EX3.1.A/EX3_1_a.sce
fd1c6d887180777530b4b001b8ac006b56c31bf9
[]
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
57
sce
EX3_1_a.sce
//Example 3.1.A clc; Syms s t; A=3 laplace(A,t,s)
77e7097d1c135d44e010ed5df44a65af541c29c2
449d555969bfd7befe906877abab098c6e63a0e8
/3864/CH2/EX2.14/Ex2_14.sce
b654e813dec11731c31654540ab5bae29648d2e0
[]
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
781
sce
Ex2_14.sce
clear // // //Initilization of Variables //Portion AB L_AB=600 //mm //Length of AB A_AB=40*40 //mm**2 //Cross-section Area of AB //Portion BC L_BC=800 //mm //Length of BC A_BC=30*30 //mm //Length of BC //Portion CD L_CD=1000 //mm //Length of CD A_CD=20*20 //mm //Area of CD P1=80*10**3 //N //Load1 P2=60*10**3 //N //Load2 P3=40*10**3 //N //Load3 E=2*10**5 //Modulus of Elasticity //Calculations P4=P1-P2+P3 //Load4 //Now Force in AB F_AB=P1 //Force in BC F_BC=P1-P2 //Force in CD F_CD=P4 //Extension of AB dell_l_AB=F_AB*L_AB*(A_AB*E)**-1 //Extension of BC dell_l_BC=F_BC*L_BC*(A_BC*E)**-1 //Extension of CD dell_l_CD=F_CD*L_CD*(A_CD*E)**-1 //Total Extension dell_l=dell_l_AB+dell_l_BC+dell_l_CD //Result printf("\n The Total Extension in Bar is %0.2f mm",dell_l)
4e342774ac7ddbdd402be9fc021df39157e35013
d13b729c94c45001726db99bfd7e3c9c2de166af
/sci/snr.sci
6128ae9243fba69e9d32213485bc92d0daa9ca56
[]
no_license
uPD71054/squarewave
94dd1e5593c0494f561bc29767ae29fc77a4f960
b84608690c45115b6aef3254090b69b35130254f
refs/heads/master
2021-01-18T12:58:31.044014
2017-10-03T15:31:08
2017-10-03T15:31:08
100,371,426
0
0
null
null
null
null
UTF-8
Scilab
false
false
220
sci
snr.sci
function ret = snr(power, f, n) s = zeros(1, n); for i = 1:length(s); s(1, i) = power(1, f * i + 1); power(1,f * i + 1) = 0; end ret = 10 * log10(sum(s) / sum(power)); endfunction
2bc81581c8afdf5791e75d0385fbcfb24da4b9ad
95a91e0c642afba8090e47bd70e3efb36da36e43
/UP.eps/DATamakerTwoKindBrashes_mn.sce
e8a04e62bb59644a0c08871f4ee84a02e7aae161
[]
no_license
Varvara08/myrepo
f4f2d4e0da09b9eea225deab49d3dfd49d861266
588458d7d92407761cc9cd7cc3273e70aa9f84b0
refs/heads/master
2021-01-20T17:20:40.176769
2016-08-17T13:10:46
2016-08-18T10:38:17
63,784,698
0
0
null
null
null
null
UTF-8
Scilab
false
false
4,835
sce
DATamakerTwoKindBrashes_mn.sce
clear; lines(0); np=200; q=2; for w=2.08 s0 = '~/imc/StarBrush/Neutral/n'+ string(np) + '/q' + string(q) + 'den/chi0/mn' + string(w) + '/' ; nf=66;//number of the latest file //nf=10; i=1; N=np*(q+1);//mass DEN VITAL!!! for j=1:1:nf sig=0.01*j; // v=j; s = s0 + 'CSBrush_mn' + string(w) + '_' + string(j) + '.pro'; a=fscanfMat(s); [m,n]=size(a); zbp_av=0; //DEN zbpL_av=0; // Line zbp1L_av=0; // line mon=200 bp_norm=0; // norm DEN bpL_norm=0; // norm Line bp1L_norm=0; // norm Line mon=200 zbp2_av = 0; // quadrat =) DEN zbp2L_av = 0; // quadrat =) Line zbp12L_av = 0; // -/- mon =200 ze_av=0; zeL_av=0; ze2_av=0; ze2L_av=0; e_norm=0; eL_norm=0; phi_norm=0; phiL_norm=0; phi_av=0; phiL_av=0; phi2_av=0; phi2L_av=0; phi2=0; phiL2=0; z_av=0; zL_av=0; z2_av=0; zL2_av=0; H=0; HL=0; for k=1:m b(k,1)=a(k,1); //layer b(k,2)=a(k,7); // phi_tot b(k,3)=a(k,13)/sig; // nB0 (branching point) b(k,4)=a(k,15)/sig/q; // nB1 (end point) b(k,5)=a(k,8)*1E6/(w*np); // phiL_tot b(k,6)=0; //a(k,18)*1E6; // nB0L (simular branch. point; mon=100) b(k,7)=a(k,18)*1E6; //nB2L (end point) // b(k,8)=a(k,20)*1E6; //nB1 (mon=200) zbp_av=zbp_av+k*b(k,3); zbp2_av=zbp2_av+k*k*b(k,3); bp_norm=bp_norm+b(k,3); // zbpL_av=zbpL_av+k*b(k,6); // zbp2L_av=zbp2L_av+k*k*b(k,6); // bpL_norm=bpL_norm+b(k,6); // zbp1L_av=zbp1L_av+k*b(k,8); // zbp12L_av=zbp12L_av+k*k*b(k,8); // bp1L_norm=bp1L_norm+b(k,8); ze_av=ze_av+k*b(k,4); ze2_av=ze2_av+k*k*b(k,4); e_norm=e_norm+b(k,4); zeL_av=zeL_av+k*b(k,7); ze2L_av=ze2L_av+k*k*b(k,7); eL_norm=eL_norm+b(k,7); z_av=z_av+k*b(k,2); z2_av=z2_av+k*k*b(k,2); zL_av=zL_av+k*b(k,5); zL2_av=zL2_av+k*k*b(k,5); phi_norm=phi_norm+b(k,2); phiL_norm=phiL_norm+b(k,5) phi2=phi2+b(k,2)*b(k,2); phi_av=phi_av+phi2/phi_norm; phiL2=phiL2+b(k,5)*b(k,5); phiL_av=phiL_av+phiL2/phiL_norm; end zbp_av=zbp_av/bp_norm; zbp2_av=zbp2_av/bp_norm; //zbpL_av=zbpL_av/bpL_norm; //zbp2L_av=zbp2L_av/bpL_norm; //zbp1L_av=zbp1L_av/bp1L_norm; //zbp12L_av=zbp12L_av/bp1L_norm; ze_av=ze_av/e_norm; ze2_av=ze2_av/e_norm; zeL_av=zeL_av/eL_norm; ze2L_av=ze2L_av/eL_norm; z_av=z_av/phi_norm; z2_av=z2_av/phi_norm; zL_av=zL_av/phiL_norm; zL2_av=zL2_av/phiL_norm; phi_av=phi_av/phi_norm; H=sig*N/phi_av; res(i,1)=sig; //sigma //res(i,2)=layer; res(i,2)=zbp_av; // точка ветвления DEN //res(i,3)=zbp2_av; res(i,3)=sqrt(zbp2_av-zbp_av^2); // Дисперсия Т.В. res(i,4)=ze_av; // среднее положение концевой группы DEN //res(i,6)=ze2_av; res(i,5)=sqrt(ze2_av-ze_av^2); // дисперсия п.к.г res(i,6)=z_av; // phi DEN res(i,7)=sqrt(z2_av-z_av^2); // дисперсия phi DEN res(i,8)=zL_av; // phi LINE res(i,9)=sqrt(zL2_av-zL_av^2); // дисперсия phi LINE res(i,10)=zeL_av; // среднее положение концевой группы LINE res(i,11)=sqrt(ze2L_av-zeL_av^2); // дисперсия п.к.г line res(i,12)=zbpL_av; // точка n=100 in line res(i,13)=sqrt(zbp2L_av-zbpL_av^2); // дисперсия res(i,14)=H; // высота щётки res(i,15)=zbp1L_av; // точка n=200 in line res(i,16)=sqrt(zbp12L_av-zbp1L_av^2); // дисперсия res(i,17)=zeL_av/eL_norm; // норм // resul(i,1)=sig; //sigma // resul(i,2)=zbp_av; // точка ветвления DEN // resul(i,3)=z_av; // phi DEN // resul(i,4)=zeL_av; // среднее положение концевой группы LINE // resul(i,5)=sqrt(ze2L_av-zeL_av^2); // дисперсия п.к.г line // resul(i,6)=zbpL_av; // точка n=100 in line // resul(i,7)=sqrt(zbp2L_av-zbpL_av^2); // дисперсия i=i+1; // sout = s0 + 'CSBrush_mn' + string(w) + '_' + string(j) + '.dat'; u=file('open',sout,'unknown'); write(u, b, '(f12.6,32(e16.6))'); file('close',u); end //s0 = '/home/alexk/AlexK/IMC/StarBrush/Neutral/n'+ string(np) + '/q' + string(q) + 'den/chi0.5/m' + string(w) + '/'; sout = s0 + 'zav_q' + string(q) +'_mn'+ string(w) + '_np' + string(np) + '.dat'; u=file('open',sout,'unknown'); write(u, res, '(f12.6,32(e16.6))'); file('close',u); // s0 = '/home/alexk/AlexK/IMC/StarBrush/Neutral/n=' + string(np) + '/Result/ZLE/'+ 'q=' + string(q) + '/dat/'; // sout = s0 + 'result_q=' + string(q) +'_m='+ string(w) + '_n=' + string(np) + '.dat'; // u=file('open',sout,'unknown'); // write(u, resul, '(f12.6,32(e16.6))'); // file('close',u); end
3d935f28d5897f89404af765ed321bc3142dd24d
187a5fa1102c5c3868d4142013abecba26b3e3d6
/ProyectoFinal.sce
4c926ab7242bed524a4b25f6b282f5880f8fe127
[]
no_license
jvazquez96/MetodosNumeros
9e54917a2f7054f3ed9c7e3cb67b3409663af1b0
115768201850b687ea2189a28241c56e36a85019
refs/heads/master
2016-09-14T02:35:02.295724
2016-05-03T16:20:47
2016-05-03T16:20:57
57,068,123
0
0
null
null
null
null
UTF-8
Scilab
false
false
73,311
sce
ProyectoFinal.sce
clear /////////////////////////////////////////////////////////////////////////// // ProyectoFinal_1.sce // // Programa final para la clase de métodos numéricos. Este programa // provee una compilación de soluciones para todos los métodos vistos // en clase: // TODO FUNCIONA PROFE // // Autores: // Jorge Vazquez // Irvel Nduva // m/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // Funciones comunes // // Funciones utilizadas a lo largo de todo el programa // /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // LeeMatriz() // // Función que introduce los datos a una matriz de tamaño N*M // // Retorno: // dmatValores: Matriz con los datos del usuario /////////////////////////////////////////////////////////////////////////// function dmatValores = LeeMatriz() // Lee las dimensiones de la matriz iRow = input("Ingrese el número de renglones: ") iCol = input("Ingrese el número de columnas: ") // Para cada renglón for iT = 1 : iRow // Para cada columna for iJ = 1 : iCol sTexto = "Ingrese el elemento: (" + string(iT) + ", " dmatValores(iT, iJ) = input(sTexto + string(iJ) + "): ") end end // Imprime los valores leidos de la matriz disp('Matriz leída: '); ImprimeMatriz(dmatValores) endfunction /////////////////////////////////////////////////////////////////////////// // ImprimeMatriz() // // Imprime todas las celdas de una matriz recibida // // Parametros: // dmatValores: La matriz a ser impresa /////////////////////////////////////////////////////////////////////////// function ImprimeMatriz(dmatValores) // Para cada renglon for iT = 1 : size(dmatValores,1) sLinea = " " // Para cada columna for iJ = 1: size(dmatValores, 2) // Cuando es el último elemento, no imprime coma if(iJ <> size(dmatValores, 2)) sLinea = sLinea + string(dmatValores(iT, iJ)) + ", " else sLinea = sLinea + string(dmatValores(iT, iJ)) end end disp(sLinea) end endfunction /////////////////////////////////////////////////////////////////////////// // ImprimeIntegral() // // Imprime el resultado de una integración recibida // // Parámetros: // dA: El punto inicial desde donde se integra la función // dB: El punto final hasta donde se integra la función // sArgDeff2: La función que fue integrada // dRes: El resultado obtenido /////////////////////////////////////////////////////////////////////////// function ImprimeIntegral(dA, dB, sArgDeff2, dRes) sResultado = "El resultado de la integral desde " + string(dA) + " hasta " sResultado = sResultado + string(dB) + " para la función " + sArgDeff2 disp(sResultado + " es: ") disp(" " + string(dRes)) endfunction ///////////////////////////////////////////////////////////////////// // // LeeFuncion() // // Pide y declara una función ingresada por el usuario con el nombre // recibido en el parámentro sNombreFunción // Parametros: // sNombreFuncion: El nombre que tendrá la función ingresada // Retorno: // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // ///////////////////////////////////////////////////////////////////// function [sArgDeff1, sArgDeff2] = LeeFuncion(sNombreFuncion) // Lee la función a ser utilizada disp("Ingrese la función a ser utilizada:"); sFunc = input("--> ", "string") // Convierte cada letra ingresada en minúsculas convstr(sFunc,"l") // Serie de reglas para manejar funciones ingresadas en otros formatos, if(strstr(sFunc,"y=") == ""& strstr(sFunc,'y =') == "") then // En caso de que el usuario ingrese una función de la forma f(x)='.. if(strstr(sFunc,'f(x)=') <> "") then sFunc = part(sFunc, 6:length(sFunc)) elseif(strstr(sFunc,'f(x) =') <> "") then sFunc = part(sFunc, 7:length(sFunc)) end sFunc = "y="+ sFunc end // Establece los argumentos para declarar la funcion con deff sArgDeff1 = 'y=' + sNombreFuncion + '(x)' sArgDeff2 = sFunc endfunction ///////////////////////////////////////////////////////////////////// // // LeeFuncion2() // // Pide y declara una función ingresada por el usuario con el nombre // recibido en el parámentro sNombreFunción // Parametros: // sNombreFuncion: El nombre que tendrá la función ingresada // Retorno: // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // ///////////////////////////////////////////////////////////////////// function [sArgDeff1, sArgDeff2] = LeeFuncion2(sNombreFuncion) // Lee la función a ser utilizada disp("Ingrese la función a ser utilizada:"); sFunc = input("--> ", "string") // Convierte cada letra ingresada en minúsculas convstr(sFunc,"l") // Serie de reglas para manejar funciones ingresadas en otros formatos, if(strstr(sFunc,"y=") == ""& strstr(sFunc,'y =') == "") then // En caso de que el usuario ingrese una función de la forma f(x)='.. if(strstr(sFunc,'f(x,y)=') <> "") then sFunc = part(sFunc, 7:length(sFunc)) elseif(strstr(sFunc,'f(x,y) =') <> "") then sFunc = part(sFunc, 8:length(sFunc)) end sFunc = "[z]="+ sFunc end // Establece los argumentos para declarar la funcion con deff sArgDeff1 = 'z=' + sNombreFuncion + '(x,y)' sArgDeff2 = sFunc endfunction ///////////////////////////////////////////////////////////////////// // CalculaErrAbs // // Calcula el error absoluto porcentual dado un valor de la // aproximación actual y la aproximación anterior // // Parámetros: // dPrev el valor de la aproximación anterior // dAct el valor de la aproximación actual // Reegresa: // dAprox el valor de la nueva aproximación /////////////////////////////////////////////////////////////////////////// function [dAprox] = CalculaErrAbs(dPrev, dAct) dAprox = (abs(dAct - dPrev) / abs(dAct)) * 100 endfunction /////////////////////////////////////////////////////////////////////////// // DespliegaArreglo() // // Función que despliega los valores de las soluciones encontradas // para la matriz inicial // // Parametros: // darrX: El arreglo con las soluciones a las incógnitas /////////////////////////////////////////////////////////////////////////// function DespliegaArreglo(darrX) for i = 1: size(darrX, 1) disp(" " + string(darrX(i, 1))) end disp("") endfunction /////////////////////////////////////////////////////////////////////////// // DespliegaEcuacion() // // Función que despliega los valores de las soluciones encontradas // para la matriz // // Parametros: // darrX: El arreglo con las soluciones a las incógnitas // iTipo: Entero que determina el tipo de ecuación a mostrar /////////////////////////////////////////////////////////////////////////// function DespliegaEcuacion(darrX, iTipo) if iTipo == 1 then disp("y=" + string(darrX(1,1)) + "+" + string(darrX(2,1)) + "x") elseif iTipo == 2 then disp("y=" + string(exp(darrX(1,1))) + " e^ " + string(darrX(2,1))) else disp("y=" + string(exp(darrX(1,1))) + "^" + string(darrX(2,1))) end endfunction /////////////////////////////////////////////////////////////////////////// // Cramer() // // Función calcula la solución a un sistema de ecuaciones lineales // utilizando los determinantes por el método de Cramer. // // Parametros: // dmatValores: La matriz que contiene el sistema a resolver // /////////////////////////////////////////////////////////////////////////// function Cramer(dmatValores) disp(ascii(10)) sTitulo = "Solucion por el método de Cramer" disp("--------------- " + sTitulo + " ---------------") dmatCuadrada = GetSimmetricMat(dmatValores) dDetMat = det(dmatCuadrada) //Tamaño de los renglones iRenglones = size(dmatCuadrada,1) //Tamaño de las columnas iColumnas = size(dmatCuadrada,2) iAumentada = size(dmatValores,2) // Intercambia cada fila con la matriz aumentada y saca ese resultado for i = 1: iColumnas for j = 1: iRenglones dmatCuadrada(j, i) = dmatValores(j, iAumentada) end darrSol(i, 1) = det(dmatCuadrada) / dDetMat // Restaura el valor original de la columna for j = 1: iRenglones dmatCuadrada(j, i) = dmatValores(j, i) end end // Despliega los valores de las incógnitas disp('Las soluciones a las incógnitas son: '); DespliegaArreglo(darrSol) endfunction /////////////////////////////////////////////////////////////////////////// // GetSimmetricMat() // // Función que obtiene la matriz simetrica de una matriz // // Parametros: // dmatValores: La matriz asimetrica inicial // Retorno: // dmatSim: La matriz simétrica final /////////////////////////////////////////////////////////////////////////// function [dmatSim] = GetSimmetricMat(dmatValores) //Tamaño de las columnas iRenglones = size(dmatValores,1) for i = 1: iRenglones for j = 1: iRenglones dmatSim(i, j) = dmatValores(i, j) end end endfunction /////////////////////////////////////////////////////////////////////////// // Eliminacion Gaussiana // // Método para obtener la solución de un sistema de ecuaciones // por el metodo de eliminación gaussiana // // version 1.0 /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // EliminacionGaussiana() // // Función realiza la eliminación Gaussiana en una matriz ingresada. // Algoritmo de Eliminación Gaussiana: // 1. Para i desde 1 hasta renglones - 1 // 1.1 Para k desde i + 1 hasta renglones // 1.1.1 factor = - M(k, i) / matriz(i, i) // 1.1.2 Para j desde i hasta columnas // 1.1.2.1 M(k, j) = M(k, j) + factor * M(i, j) // // Parametros: // dmatValores: La matriz original a ser procesada // /////////////////////////////////////////////////////////////////////////// function EliminacionGaussiana(dmatValores, iTipo) disp(ascii(10)) sTitulo = "Solucion por medio de la Eliminación Gaussiana" disp("--------------- " + sTitulo + " ---------------") dFactor = 0 //Tamaño de los renglones iRenglones = size(dmatValores,1) //Tamaño de las columnas iColumnas = size(dmatValores,2) for i = 1: iRenglones - 1 for k = i + 1: iRenglones // Evitar divisiones entre cero if dmatValores(i,i) ~= 0 dFactor = dmatValores(k,i) / dmatValores(i,i) else dFactor = 0 end disp("Factor: "+ string(dFactor)) for j = i: iColumnas dmatValores(k,j) = dmatValores(k,j) - dFactor*dmatValores(i,j) end end end // Imprimir la matriz en el estado reducido disp("La matriz en estado reducido es: ") ImprimeMatriz(dmatValores) // Encontrar los valores de las incógnitas darrX = SustituyeHaciaAtras(dmatValores) disp(ascii(10)) // Despliega el arreglo de las soluciones encontradas disp('Las soluciones a las incógnitas son: '); DespliegaArreglo(darrX) endfunction /////////////////////////////////////////////////////////////////////////// // Eliminacion Gauss-Jordan // // Método para obtener la solución de un sistema de ecuaciones mediante // el método de Gauss-Jordan // // version 1.0 /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // EliminacionGaussJordan() // // Función realiza la eliminación Gauss-Jordan en una matriz recibida // utilizando el siguiente algoritmo: // 1. Para cada renglon i // 1.1 pivote = A(i,i) // 1.2 Para cada columna j // 1.2.1 A(i,j) = A(i,j) / pivote // 1.3 Para cada renglon k // 1.3.1 Si i <> k // 1.3.1.1 fact = - A(k,i) // 1.3.1.2 Para cada columna j // 1.3.1.2.1 A(k,j) = A(k,j) + fact * A(i,j) // 1.4 Desplegar matriz // // Parametros: // dmatValores: La matriz original a ser procesada // /////////////////////////////////////////////////////////////////////////// function EliminacionGaussJordan(dmatValores) disp(ascii(10)) sTitulo = "Solucion por medio de la Eliminación Gauss-Jordan" disp("--------------- " + sTitulo + " ---------------") dFactor = 0 //Tamaño de los renglones iRenglones = size(dmatValores,1) //Tamaño de las columnas iColumnas = size(dmatValores,2) for i = 1: iRenglones dPivote = dmatValores(i, i) // Si el renglon no empieza con cero if(dPivote <> 0) then // Dividir todo el renglon entre el primer elemento // Así convierte el primer elemento a un uno dPrimerElemento = dmatValores(i,i) for j = i: iColumnas dmatValores(i,j) = dmatValores(i,j) / dPrimerElemento end // Hace ceros arriba y abajo de ese uno for k = 1: iRenglones // Si el actual no es el renglon pivote if(k <> i) then // Calcula el factor del primer elemento con el pivote // Evitar divisiones entre cero if dmatValores(i,i) ~= 0 dFactor = dmatValores(k,i) / dmatValores(i,i) else dFactor = 0 end // Resta el factor * celda para hacer 0 el primer elemento for j = 1: iColumnas dMult = dFactor * dmatValores(i,j) dmatValores(k,j) = dmatValores(k,j) - dMult end end end end // Imprimir la matriz en el número de iteración actual disp('Iteración #' + string(i)); ImprimeMatriz(dmatValores) end // Imprime la matriz en el estado reducido disp('Matriz después de la eliminación Gauss-Jordan: '); ImprimeMatriz(dmatValores) disp(ascii(10)) // Encuentra los valores de las incógnitas ExtraeSoluciones(dmatValores) endfunction ///////////////////////////////////////////////////////////////////// // ExtraeSoluciones() // // Función extrae las soluciones de una matriz reducidad por Gauss-Jordan // y las coloca en un arreglo de soluciones // // Parametros: // dmatValores: La matriz ya procesada con el método de gauss-jordan ///////////////////////////////////////////////////////////////////// function ExtraeSoluciones(dmatValores) //Cantidad de renglones iRenglones= size(dmatValores,1) //Cantida de columnas iColumnas = size(dmatValores,2) // Copiar soluciones a arreglo auxiliar for i = 1 : iRenglones darrAux(i) = dmatValores(i, iColumnas) end // Despliega el arreglo de las soluciones encontradas disp('Las soluciones a las incógnitas son: '); DespliegaArreglo(darrAux) endfunction /////////////////////////////////////////////////////////////////////////// // Método Montante // // Método para obtener la solución de un sistema de ecuaciones // por el método montante // // version 1.0 /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // Montante() // // Función realiza la eliminación montante en una matriz recibida // utilizando el siguiente algoritmo: // 1. PivoteAnterior = 1 // 2. Para cada renglon i desde 1 hasta numero de renglones // 2.1 Para cada renglon k desde 1 hasta el numero de renglones // 2.1.1 Si k es diferente a la i // 2.1.1.1 Para cada columna j desde i + 1 hasta numero de columnas // 2.1.1.1.1 M(k,j) = (M(i,i)*M(k,j)-M(k,i)*M(i,j))/PivoteAnterior // 2.1.1.2 M(k,i) = 0 // 2.2 PivoteAnterior = M(i,i) // 2.3 Despliega M // 3. Para cada renglon i desde 1 hasta Renglones -1 // M(i, i) = PivoteAnterior // 4. Despliega M // 5. Para cada renglon i desde 1 hasta Renlones // X(i) = m(i,i) / pivoteAnterior // 6. Despliega X // 2.3.1 M(k,k) = M(i,i) // // Parametros: // dmatValores: La matriz original a ser procesada /////////////////////////////////////////////////////////////////////////// function Montante(dmatValores, iTipo) disp(ascii(10)) sTitulo = "Solucion por medio del método Montante" disp("--------------- " + sTitulo + " ---------------") //Inicializar el pivote anterior iPivoteAnterior = 1 //Numero de renglones iRenglones = size(dmatValores,1) //Numero de columnas iColumnas = size(dmatValores,2) for i = 1: iRenglones for k = 1: iRenglones if k ~= i then for j = i + 1: iColumnas dmatValores(k,j) = ( dmatValores(i,i) * dmatValores(k,j) - dmatValores(k,i) * dmatValores(i,j)) / iPivoteAnterior end //Hacer ceros en la columna i excepto en el pivote dmatValores(k,i) = 0 end end //Actualizar el pivote iPivoteAnterior = dmatValores(i,i) // Imprimir la matriz en el número de iteración actual disp('Iteración #' + string(i)); ImprimeMatriz(dmatValores) end //Igualar los pivotes anteriores con el ultimo pivote for i = 1: iRenglones-1 dmatValores(i,i) = iPivoteAnterior end // Imprime la matriz en el estado reducido disp('Matriz después de la eliminación por el método Montante: '); ImprimeMatriz(dmatValores) disp(ascii(10)) //Dividir cada valor de la ultima columna entre el pivote for i = 1: iRenglones // Evitar divisiones entre cero if iPivoteAnterior ~= 0 X(i) = dmatValores(i,iColumnas) / iPivoteAnterior else X(i) = 0 end end // Despliega las soluciones de los valores a las incógnitas disp('Las soluciones a las incógnitas son: '); if iTipo < 4 then DespliegaEcuacion(X,iTipo) else DespliegaArreglo(X) end endfunction /////////////////////////////////////////////////////////////////////////// // SustituyeHaciaAtras() // // Función calcula los valores de las incógnitas en la matriz. // el paso final de la eliminación Gaussiana. // Algoritmo de Sustitucion Hacia Atras // 1. X(n) = M(renglones, columnas) / M(renglones, columnas-1) // 2. Para i desde renglones-1 hasta 1 // 2.1 Suma = 0 // 2.2 Para j desde columnas-1 hasta i+1 // 2.2.1 Suma = Suma + M(i, j) * X(j) // 2.3 X(i) = (M(i, columnas) - Suma) / M(i,i) // // Parametros: // dmatValores: La matriz ya procesada con la eliminación de gauss /////////////////////////////////////////////////////////////////////////// function [darrX] = SustituyeHaciaAtras(dmatValores) //Cantidad de renglones iRen = size(dmatValores,1) //Cantida de columnas iCol = size(dmatValores,2) iSuma = 0 //Obtener la primera solución if dmatValores(iRen, iRen) ~= 0 darrX(iRen, 1) = dmatValores(iRen, iCol) / dmatValores(iRen, iRen) else // Evitar divisiones entre cero darrX(iRen, 1) = 0 end // Para cada renglon for i = iRen - 1: -1:1 iSuma = 0; // Para cada columna for j = iCol - 1:-1:i+1 iSuma = iSuma + dmatValores(i,j) * darrX(j); end if dmatValores(i,i) ~= 0 darrX(i) = (dmatValores(i, iCol) - iSuma) / dmatValores(i,i) else darrX(i) = 0 end end endfunction /////////////////////////////////////////////////////////////////////////// // Secante: Solución de una Raíz de Una Ecuación No Lineal // // Programa de Solución de una Raíz de Una Ecuación No Lineal // // version 1.0 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // CalculaSecante() // // Pide una ecuación no lineal y calcula la solución de su raíz // ///////////////////////////////////////////////////////////////////// function CalculaSecante() // Solicita la función a ser resuelta con el nombre de funcionSecante [sArgDeff1, sArgDeff2] = LeeFuncion("FuncionSecante") // Lee los datos iniciales [dXPrev, dXAct, dErrMeta, iMaxIter] = leeDatosSecante() // Calcula las iteraciones para calcular las raices IteraSecante(dXPrev, dXAct, dErrMeta, iMaxIter, sArgDeff1, sArgDeff2) endfunction ///////////////////////////////////////////////////////////////////// // IteraSecante() // // Realiza las iteraciones para calcular la solución a la ecuación // no lineal por medio del método de la secante. // Parametros: // dXPrev: El valor de X previo a la iteración actual // dXAct: El valor de X en la iteración actual // dErrAbsMeta: El error absoluto mínimo que se tiene como objetivo // iMaxIter: La cantidad máxima de iteraciones que se pueden realizar // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // ///////////////////////////////////////////////////////////////////// function IteraSecante(dXPrev, dXAct, dErrAbsMeta, iMaxIter, sArgDeff1,sArgDeff2) //Declara la función a ser resuelta deff(sArgDeff1, sArgDeff2) // Calcula la primera iteración y la despliega dXSig = IteraX(dXPrev, dXAct, sArgDeff1, sArgDeff2) // Obtiene el valor de la función evaluada con X = dXSig dEval = FuncionSecante(dXSig) // Inicializa el valor del error de aproximación con un valor muy grande dErrAbsAct = 999999999999999.9 iIterAct = 1 disp("Iteración #"+ string(iIterAct) + ":") disp("X: "+ string(dXSig)) // Mostrar todos los decimales en el proceso format(25); // Realiza las iteraciones y actualiza los valores de X hasta alcanzar un // límite while(((iIterAct < iMaxIter) & (dErrAbsAct > dErrAbsMeta) & (dEval ~= 0.0))) dXPrev = dXAct dXAct = dXSig dXSig = IteraX(dXPrev, dXAct) dEval = FuncionSecante(dXSig) iIterAct = iIterAct + 1 // Calcula el error absoluto porcentual actual dErrAbsAct = CalculaErrAbs(dXSig, dXAct) disp("Iteración #"+ string(iIterAct) + ":") disp("X: "+ string(dXSig)) disp("Error absoluto: "+ string(dErrAbsAct) + "%") end // Imprime la forma en la que se obtuvo la raiz dependiendo de cual // haya sido el límite alcanzado if iIterAct >= iMaxIter then disp("La raiz fue aproximada con el numero de iteraciones dado") elseif dErrAbsAct <= dErrAbsMeta then disp("La raiz fue aproximada con el error absoluto porcentual") elseif dEval == 0 then disp("La raiz encontrada fue exacta") end endfunction ///////////////////////////////////////////////////////////////////// // leeDatosSecante() // Regresa: // dA: El punto inicial desde donde se integra la función // dB: El punto final hasta donde se integra la función // iN: El número de divisiones a utilizar // ///////////////////////////////////////////////////////////////////// function [dXPrev, dXAct, dErrAbsMeta, iMaxIter] = leeDatosSecante() // Solicita el valor inicial para x previa y x actual, el error // absoluto en valor porcentual y el numero maximo de iteraciones dXPrev = input("Ingrese el valor de X previo: ") dXAct = input("Ingrese el valor de X actual: ") dErrAbsMeta = input("Ingrese el valor del error absoluto porcentual: ") dErrAbsMeta = dErrAbsMeta / 100 iMaxIter = input("Ingrese el valor máximo de iteraciones: ") endfunction ///////////////////////////////////////////////////////////////////// // IteraX // // Realiza una iteración utilizando el método de la Secante con los // valores recibidos de dXPrev y dXAct y regresa el valor de dXSig. // // Parametros: // dXPrev el valor de previo de x // dXAct el valor actual de x // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // Regresa: // dXSig el siguiente valor de x ///////////////////////////////////////////////////////////////////// function [dXSig] = IteraX(dXPrev, dXAct, sArgDeff1, sArgDeff2) //Declara la función a ser resuelta deff(sArgDeff1, sArgDeff2) // Obtiene los valores de la función evaluada en dX dYPrev = FuncionSecante(dXPrev) dYAct = FuncionSecante(dXAct) // Calcula el siguiente valor de x dXSig = dXAct - (dYAct * (dXPrev - dXAct)) / (dYPrev - dYAct) endfunction ///////////////////////////////////////////////////////////////////// // EvalueBiseccion // // Evalua el valor de X en la función definida para bisección // // Parametros: // dXPrev el valor de x a evaluas // Regresa: // dVal valor de x evaluado en la función ///////////////////////////////////////////////////////////////////// function [dVal] = EvaluaBiseccion(dX) //Declara la función a ser resuelta deff(sArgDeff1, sArgDeff2) // Calcula el valor de X Evalueado dVal = FuncionBiseccion(dX) endfunction ///////////////////////////////////////////////////////////////////// // IteraBiseccion() // // Realiza las iteraciones para calcular la solución a la ecuación // no lineal por medio del método de biseccion // Parametros: // dXPrev el valor de previo de x // dXAct el valor actual de x // dErroAbsMeta el error maximo permitid // iMaxIter Numero máximo de iteraciones // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // ///////////////////////////////////////////////////////////////////// function IteraBiseccion(dXPrev,dXAct,dErrAbsMeta,iMaxIter,sArgDeff1, sArgDeff2) dEval = EvaluaBiseccion(dXPrev) // Inicializa el valor del error de aproximación con un valor muy grande dErrAbsAct = 99.9 iIterAct = 1 disp("Iteración #"+ string(iIterAct) + ":") disp("X: "+ string((dXPrev + dXAct) / 2)) // Mostrar todos los decimales en el proceso format(25); // Realiza las iteraciones y actualiza los valores de X hasta alcanzar un // límite while(((iIterAct < iMaxIter) & (dErrAbsAct > dErrAbsMeta) & (dEval ~= 0.0))) // Se inicializa la variable con el valor promedio entre el promedio // de los datos dEval = EvaluaBiseccion((dXPrev + dXAct) / 2) // Se obtiene el valor de la X inicial evaluada en la función dXEval = EvaluaBiseccion(dXPrev) // Actualizar las X de acuerdo a su valor evaluado en la función if dEval > 0 then if dXEval > 0 then dXPrev = (dXPrev + dXAct) / 2 else disp("Enters") dXAct = (dXPrev + dXAct) / 2 end else if dXEval > 0 then dXAct = (dXPrev + dXAct) / 2 else dXPrev = (dXPrev + dXAct) / 2 end end iIterAct = iIterAct + 1 // Calcula el error absoluto porcentual actual dErrAbsAct = ((dXAct - dXPrev) / dXAct) * 100 disp("Iteración #"+ string(iIterAct) + ":") disp("X: "+ string((dXPrev + dXAct)/ 2)) disp("Error absoluto: "+ string(dErrAbsAct) + "%") end // Imprime la forma en la que se obtuvo la raiz dependiendo de cual // haya sido el límite alcanzado if iIterAct >= iMaxIter then disp("La raiz fue aproximada con el numero de iteraciones dado") elseif dErrAbsAct <= dErrAbsMeta then disp("La raiz fue aproximada con el error absoluto porcentual") elseif dEval == 0 then disp("La raiz encontrada fue exacta") end endfunction /////////////////////////////////////////////////////////////////////////// // Biseccion: Solución de una Raíz de Una Ecuación No Lineal // // Programa de Solución de una Raíz de Una Ecuación No Lineal // // version 1.0 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // CalculaBiseccion() // // Pide una ecuación no lineal y calcula la solución de su raíz // ///////////////////////////////////////////////////////////////////// function CalculaBiseccion() // Solicita la función a ser resuelta con el nombre de funcionBiseccion [sArgDeff1, sArgDeff2] = LeeFuncion("FuncionBiseccion") // Lee los datos iniciales [dXPrev, dXAct, dErrMeta, iMaxIter] = leeDatosSecante() // Calcula las iteraciones para calcular las raices IteraBiseccion(dXPrev, dXAct, dErrMeta, iMaxIter, sArgDeff1, sArgDeff2) endfunction ///////////////////////////////////////////////////////////////////// // SiguienteRegula(dXPrev,dXAct) // // Función que obtiene la siugiente X de acuerdo a la formula del metodo // // Parametros: // dXPrev el valor de x Inferior // dXAct el valor de x Superior // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // Regresa: // dVal la siguiente iteración de acuerdo a la función ///////////////////////////////////////////////////////////////////// function [dXSiguiente] = SiguienteRegula(dXPrev, dXAct) //Declara la función a ser resuelta deff(sArgDeff1, sArgDeff2) dPrimerValor = FuncionRegulaFalsi(dXPrev) dSegundoValor = FuncionRegulaFalsi(dXAct) dXSiguiente = (dXAct*dPrimerValor - dXPrev*dSegundoValor) / (dPrimerValor... - dSegundoValor) endfunction ///////////////////////////////////////////////////////////////////// // EvaluaRegula // // Evalua el valor de X en la función definida para regunla // // Parametros: // dXPrev el valor de x a evaluas // Regresa: // dVal valor de x evaluado en la función ///////////////////////////////////////////////////////////////////// function [dVal] = EvaluaRegula(dXValor) //Declara la función a ser resuelta deff(sArgDeff1, sArgDeff2) dVal = FuncionRegulaFalsi(dXValor) endfunction ///////////////////////////////////////////////////////////////////// // IteraRegula() // // Realiza las iteraciones para calcular la solución a la ecuación // no lineal por medio del método de regula falsi // Parametros: // dXPrev el valor de previo de x // dXAct el valor actual de x // dErroAbsMeta el error maximo permitid // iMaxIter Numero máximo de iteraciones // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // ///////////////////////////////////////////////////////////////////// function IteraRegula(dXPrev, dXAct, dErrAbsMeta, iMaxIter, sArgDeff1, sArgDeff2) // Inicializa el valor del error de aproximación con un valor muy grande dErrAbsAct = 99.9 iIterAct = 1 disp("Iteración #"+ string(iIterAct) + ":") disp("X: "+ string(SiguienteRegula(dXPrev,dXAct))) dEval = 99.0 // Mostrar todos los decimales en el proceso format(25); // Realiza las iteraciones y actualiza los valores de X hasta alcanzar un // límite while(((iIterAct < iMaxIter) & (dErrAbsAct > dErrAbsMeta) & (dEval ~= 0.0))) // Se inicializa la variable con el valor promedio entre el promedio de //los datos dSiguienteX = SiguienteRegula(dXPrev,dXAct) //Se guarda el valor previo dEval = EvaluaRegula(dSiguienteX) // Se obtiene el valor de la X inicial evaluada en la función dXEval = EvaluaRegula(dXPrev) // Actualizar las X de acuerdo a su valor evaluado en la función if dEval > 0 then if dXEval > 0 then dXPrev = dSiguienteX else dXAct = dSiguienteX end else if dXEval > 0 then dXAct = dSiguienteX else dXPrev = dSiguienteX end end iIterAct = iIterAct + 1 // Calcula el error absoluto porcentual actual dNewX = SiguienteRegula(dXPrev,dXAct) dErrAbsAct = ((dNewX - dSiguienteX) / dNewX) * 100 disp("dNewX: " + string(dNewX)) disp("dSiguienteX: " + string(dSiguienteX)) disp("Iteración #"+ string(iIterAct) + ":") disp("X: "+ string(SiguienteRegula(dXPrev,dXAct))) disp("Error absoluto: "+ string(dErrAbsAct) + "%") end // Imprime la forma en la que se obtuvo la raiz dependiendo de cual // haya sido el límite alcanzado if iIterAct >= iMaxIter then disp("La raiz fue aproximada con el numero de iteraciones dado") elseif dErrAbsAct <= dErrAbsMeta then disp("La raiz fue aproximada con el error absoluto porcentual") elseif dEval == 0 then disp("La raiz encontrada fue exacta") end endfunction /////////////////////////////////////////////////////////////////////////// // Regula Falsi: Solución de una Raíz de Una Ecuación No Lineal // // Programa de Solución de una Raíz de Una Ecuación No Lineal // // version 1.0 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // CalculaRegulaFalsi() // // Pide una ecuación no lineal y calcula la solución de su raíz // ///////////////////////////////////////////////////////////////////// function CalculaRegulaFalsi() // Solicita la función a ser resuelta con el nombre de FuncionRegulaFalsi [sArgDeff1, sArgDeff2] = LeeFuncion("FuncionRegulaFalsi") // Lee los datos iniciales [dXPrev, dXAct, dErrMeta, iMaxIter] = leeDatosSecante() // Calcula las iteraciones para calcular las raices IteraRegula(dXPrev, dXAct, dErrMeta, iMaxIter, sArgDeff1, sArgDeff2) endfunction ///////////////////////////////////////////////////////////////////// // iSiguiente // Función que se encarga de calcular la siguiente aproximación de acuerdo a // formula de la serie de Netwon-Raphson: // iInicio - f(iIncio)/f'(iInicio) // // // Parametros: // iInicio es el valor de donde empieza la serie // // Regresa: // iNuevo la siguiente aproximación ///////////////////////////////////////////////////////////////////// function iNuevo = iSiguiente(iInicio) //Inicializar nuevo con 1 iNuevo = 1 //Declara la función a ser resuelta deff(sArgDeff1, sArgDeff2) iNuevo = FuncionRaphson(iInicio) iNuevo = iNuevo / numderivative(FuncionRaphson,iInicio) iNuevo = iInicio - iNuevo endfunction ///////////////////////////////////////////////////////////////////// // iErrorAprox // Función que se encarga de calcular el error aproximado de acuerdo a la // formula: AproxNueva - AproxVieja / AproxNueva * 100 // // // Parametros: // iVieja es la aproximacion vieja // iNueva es la nueva aproximación // Regresa: // iE es el valor del error aproximado ///////////////////////////////////////////////////////////////////// function iE = iErrorAprox(iVieja,iNueva) //Inicializar el error en 0 iE = 0 //Calcular el error iE = abs(iNueva - iVieja) / abs(iNueva) * 100 endfunction ///////////////////////////////////////////////////////////////////// // Calcula // Función que se encarga de mostrar el resultado aproximado de // la raiz // // Parametros: // iInicio es el valor de X inicial // iError es el valor del error maximo // iTeraciones es el valor maximo a iterar ///////////////////////////////////////////////////////////////////// function IteraNewtonRaphson(iInicio, dErrAbsMeta, iMaxIter) //Inicializar variables dErrAbsAct = 9999999 iIterAct = 1; iViejo = 0; iNueva = 1; iRaiz = 1 deff(sArgDeff1, sArgDeff2) //Hacer el ciclo hasta que el error sea mayor o igual al error que pidio el // usuario o hasta que se haya llegado al limite de ciclos pedido por el // usuario o hasta encontrar la raiz de la función while dErrAbsAct > dErrAbsMeta & iIterAct <= iMaxIter & iRaiz ~= 0 if iIterAct == 1 then disp("Primera iteración: ") iNueva = iSiguiente(iInicio) disp(string(iNueva)) iIterAct = iIterAct + 1 iRaiz = FuncionRaphson(iNueva); end if iIterAct > 1 then disp("Iteración: " + string(iIterAct)) iViejo = iNueva disp("Valor previo: " + string(iViejo)) iNueva = iSiguiente(iViejo) disp("Valor nuevo: " + string(iNueva)) dErrAbsAct = iErrorAprox(iViejo,iNueva) disp("Error aproximado: " + string(dErrAbsAct*100) + "%") iRaiz = FuncionRaphson(iNueva); end iIterAct = iIterAct + 1 if iIterAct >= iMaxIter then disp("La raiz fue aproximada con el numero de iteraciones dado") elseif dErrAbsAct <= dErrAbsMeta then disp("La raiz fue aproximada con el error absoluto porcentual") elseif iRaiz == 0 then disp("La raiz encontrada fue exacta") end end endfunction ///////////////////////////////////////////////////////////////////// // leeDatosSecante() // Regresa: // dA: El punto inicial desde donde se integra la función // dB: El punto final hasta donde se integra la función // iN: El número de divisiones a utilizar // ///////////////////////////////////////////////////////////////////// function [dXInicio, dErrAbsMeta, iMaxIter] = LeeDatosRaphson() // Solicita el valor inicial para x previa y x actual, el error // absoluto en valor porcentual y el numero maximo de iteraciones dXInicio = input("Ingrese el valor de X previo: ") dErrAbsMeta = input("Ingrese el valor del error absoluto porcentual: ") dErrAbsMeta = dErrAbsMeta / 100 iMaxIter = input("Ingrese el valor máximo de iteraciones: ") endfunction ///////////////////////////////////////////////////////////////////// // CalculaNewtonRaphson() // // Pide una ecuación no lineal y calcula la solución de su raíz // ///////////////////////////////////////////////////////////////////// function CalculaNewtonRaphson() // Solicita la función a ser resuelta con el nombre de FuncionRaphson [sArgDeff1, sArgDeff2] = LeeFuncion("FuncionRaphson") // Lee los datos iniciales [dXInicio, dErrAbsMeta, iMaxIter] = LeeDatosRaphson() // Calcula las iteraciones para calcular las raices IteraNewtonRaphson(dXInicio,dErrAbsMeta,iMaxIter) endfunction ///////////////////////////////////////////////////////////////////// // leedatosRegresión() // // Función que lee datos para una matriz para regresiones // // Regresa: // dmatValores = Matriz con los datos introducidos por el usuario // ///////////////////////////////////////////////////////////////////// function [dmatValores] = leeDatosRegresion() //Cantida de datos iCantidad = input("¿Cuantos datos? ") for i = 1:iCantidad for j = 1: 2 sMensaje = "Introduzca el dato para la casilla " + string(i) + " " dmatValores(i,j) = input(sMensaje + string(j) + ": ") end end endfunction ///////////////////////////////////////////////////////////////////// // sumatoria(dMat,iTipo) // // Funcion que calcula la sumatoria depiendo de la que se requiere // de los datos de una matriz // // Parametros: // dmatValores = Matriz de donde se obtienen los datos // iTipo = Entero que determina la sumatoria a obtener // // Regresa: // dSum = Sumatoria de datos ///////////////////////////////////////////////////////////////////// function dSum = sumatoria(dmatValores,iTipo) //Tamaño de los renglones iRenglones = size(dmatValores,1) //Tamaño de las columnas iColumnas = size(dmatValores,2) dSum = 0 //Suma de los valores de x if iTipo == 1 then for i = 1: iRenglones dSum = dSum + dmatValores(i,1) end //Suma de los valores de x*x elseif iTipo == 2 then for i = 1: iRenglones dSum = dSum + (dmatValores(i,1)*dmatValores(i,1)) end //Suma de los valores de log(x) elseif iTipo == 3 then for i = 1: iRenglones dSum = dSum + log(dmatValores(i,1)) end //Suma de los valores de log(x)*log(x) elseif iTipo == 4 then for i = 1: iRenglones dSum = dSum + (log(dmatValores(i,1)) * log(dmatValores(i,1))) end //Suma de los valores de y elseif iTipo == 5 then for i = 1: iRenglones dSum = dSum + dmatValores(i,2) end elseif iTipo == 6 then for i = 1: iRenglones dSum = dSum + (dmatValores(i,2) * dmatValores(i,1)) end elseif iTipo == 7 then for i = 1: iRenglones dSum = dSum + log(dmatValores(i,2)) end elseif iTipo == 8 then for i = 1: iRenglones dSum = dSum + (log(dmatValores(i,2)) * dmatValores(i,1)) end else for i = 1: iRenglones dSum = dSum + (log(dmatValores(i,1)) * log(dmatValores(i,2))) end end endfunction ///////////////////////////////////////////////////////////////////// // llenaMatriz() // // Función que llena una matríz dependiendo del tipo de regresión // // Regresa: // dmatValores = Matriz con los valores correspondientes // ///////////////////////////////////////////////////////////////////// function dmatValores = llenaMatriz(dmatMatriz,iTipo) //Cantidad de datos iCantidad = size(dmatMatriz,1) if iTipo == 1 then dmatValores(1,1) = iCantidad dmatValores(1,2) = sumatoria(dmatMatriz,1) dmatValores(2,1) = sumatoria(dmatMatriz,1) dmatValores(2,2) = sumatoria(dmatMatriz,2) dmatValores(1,3) = sumatoria(dmatMatriz,5) dmatValores(2,3) = sumatoria(dmatMatriz,6) elseif iTipo == 2 then dmatValores(1,1) = iCantidad dmatValores(1,2) = sumatoria(dmatMatriz,1) dmatValores(2,1) = sumatoria(dmatMatriz,1) dmatValores(2,2) = sumatoria(dmatMatriz,2) dmatValores(1,3) = sumatoria(dmatMatriz,7) dmatValores(2,3) = sumatoria(dmatMatriz,8) else dmatValores(1,1) = iCantidad dmatValores(1,2) = sumatoria(dmatMatriz,3) dmatValores(2,1) = sumatoria(dmatMatriz,3) dmatValores(2,2) = sumatoria(dmatMatriz,4) dmatValores(1,3) = sumatoria(dmatMatriz,7) dmatValores(2,3) = sumatoria(dmatMatriz,9) end endfunction /////////////////////////////////////////////////////////////////////////// // Regresión Lineal: Aproximación de una función a ciertos puntos // // Programa de Solución de una función a ciertos puntos // // version 1.0 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // RegresiónLineal() // // Pide datos y se llena la matriz que se resuelve por el metodo de montante // ///////////////////////////////////////////////////////////////////// function RegresionLineal() // Leer los datos iniciales dMat = leeDatosRegresion() // Introducir datos en la matriz dCompleteMatrix = llenaMatriz(dMat,1) // Resolver la matriz por el metodo de montante Montante(dCompleteMatrix,1) endfunction /////////////////////////////////////////////////////////////////////////// // Regresión Exponencial: Aproximación de una función a ciertos puntos // // Programa de Solución de una función a ciertos puntos // // version 1.0 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // RegresiónExponencial() // // Pide datos y se llena la matriz que se resuelve por el metodo de montante // ///////////////////////////////////////////////////////////////////// function RegresionExponencial() // Leer los datos iniciales dMat = leeDatosRegresion() // Introducir datos en la matriz dCompleteMatrix = llenaMatriz(dMat,2) // Resolver la matriz por el metodo de montante Montante(dCompleteMatrix,2) endfunction /////////////////////////////////////////////////////////////////////////// // RegresiónPotencial() // Regresión Pontencial: Aproximación de una función a ciertos puntos // // Solución de una función a ciertos puntos // ///////////////////////////////////////////////////////////////////// function RegresionPotencial() // Leer los datos iniciales dMat = leeDatosRegresion() // Introducir datos en la matriz dCompleteMatrix = llenaMatriz(dMat,3) // Resolver la matriz por el metodo de montante Montante(dCompleteMatrix,3) endfunction ///////////////////////////////////////////////////////////////////// // InterLagrange() // Función que realiza una interpolación de Lagrange entre dos // puntos recibidos // // Parámetros: // dmatPuntos: Los pares de puntos que se interpolarán // dPred: El punto a predecir // ///////////////////////////////////////////////////////////////////// function InterLagrange(dmatPuntos, dPred) disp(ascii(10)) sTitulo = "Interpolación por medio de Lagrange" disp("--------------- " + sTitulo + " ---------------") iT = size(dmatPuntos, 1) // La tabla de diferencias dmatDiff = ones(iT, 1) dPredPunto = zeros(1, 1) // Construir la tabla de diferencias for i = 1:iT for j = 1:iT if i ~= j then dNumerador = dmatDiff(i,:) .* (dPred - dmatPuntos(j, 1)) dDenom = dmatPuntos(i,1)-dmatPuntos(j,1) // Evitar dividir entre cero if iOpciones ~= 0 dmatDiff(i, :) = dNumerador ./ dDenom else dmatDiff(i, :) = 0 end end end end // Calcular el valor del punto a predecir for i = 1:iT dPredPunto = dPredPunto + dmatPuntos(i,2) * dmatDiff(i,:) end // Imprime la predicción disp('La predicción para el punto ingresado es: '); ImprimeMatriz(dPredPunto) disp(ascii(10)) endfunction ///////////////////////////////////////////////////////////////////// // InterNewtonDiff() // Función que realiza una interpolación de diferencias difididas // de Newton entre dos puntos recibidos // // Parámetros: // dmatPuntos: Los pares de puntos que se interpolarán // dPred: El punto a predecir // ///////////////////////////////////////////////////////////////////// function InterNewtonDiff(dmatPuntos, dPred) disp(ascii(10)) sTitulo = "Interpolación por medio de Diferencias divididas de Newton" disp("---------- " + sTitulo + " ----------") iN = size(dmatPuntos, 1) dDiferencia = dmatPuntos(2,1) - dmatPuntos(1,1) dCoeficiente = (dPred - dmatPuntos(1,1)) / dDiferencia dSuma = dmatPuntos(1,2) for iT=1:iN - 1 for iJ=1:iN - iT dmatInterP(iT,iJ) = dmatPuntos(iJ+1, 2) - dmatPuntos(iJ, 2) end for iJ=1:iN - iT dmatPuntos(iJ, 2) = dmatInterP(iT,iJ) end end for iT = 2:iN dResMult = 1 for iJ = 1:iT - 1 dResMult = (dCoeficiente + 1 -iJ) * dResMult / iJ end dSuma = dSuma + dResMult * dmatInterP(iT-1,1) end // Imprime la predicción disp('La predicción para el punto ingresado es: '); disp(dSuma) disp(ascii(10)) endfunction ///////////////////////////////////////////////////////////////////// // leeDatosInterpolacion() // Funcion que lee los datos necesarios para evaluar una integral // de una función entre dos puntos. // Regresa: // dmatPuntos: Los puntos que se interpolarán // darrPred: Los puntos que serán predecidos con la función interpolada // ///////////////////////////////////////////////////////////////////// function [dmatPuntos, dPred] = leeDatosInterpolacion() // Lee los puntos de interpolación iN = input(' Ingrese la cantidad de puntos a interpolar: ') for iT = 1 : iN sTexto = "Ingrese el punto #" + string(iT) + " en X: " dmatPuntos(iT, 1) = input(sTexto) sTexto = "Ingrese el punto #" + string(iT) + " en Y: " dmatPuntos(iT, 2) = input(sTexto) end dPred = input(' Ingrese el punto a predecir: ') endfunction ///////////////////////////////////////////////////////////////////// // IntegraTrapecios() // Función que aproxima el resultado de una integral evaluada en // FuncionIntegración por el método de Trapecios // // Parámetros: // dA: El punto inicial desde donde se integra la función // dB: El punto final hasta donde se integra la función // iN: El número de divisiones a utilizar // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // ///////////////////////////////////////////////////////////////////// function IntegraTrapecios(dA, dB, iN, sArgDeff1, sArgDeff2) deff(sArgDeff1, sArgDeff2) iH = (dB - dA) / iN iFA = FuncionIntegracion(dA) iFB = FuncionIntegracion(dB) iSum = 0 // Obtiene el valor de la sumatoria for i = 1: iN - 1 iSum = iSum + FuncionIntegracion(i * iH) end // Calcula el resultado de acuerdo a la fórmula iSum = iSum * 2 dResultado = (iH / 2) * (iFA + iSum + iFB) // Imprime el resultado disp(ascii(10)) sTitulo = "Integración por el método Trapecios con " + string(iN) disp("---------- " + sTitulo + " cortes" + " ----------") ImprimeIntegral(dA, dB, sArgDeff2, dResultado) endfunction ///////////////////////////////////////////////////////////////////// // IntegraSimpson() // Función que aproxima el resultado de una integral evaluada en // FuncionIntegración por el método de Simpson 1/3 // Parámetros: // dA: El punto inicial desde donde se integra la función // dB: El punto final hasta donde se integra la función // iN: El número de divisiones a utilizar // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // ///////////////////////////////////////////////////////////////////// function IntegraSimpson(dA, dB, iN, sArgDeff1, sArgDeff2) deff(sArgDeff1, sArgDeff2) iH = (dB - dA) / iN // Obtiene el valor de la función evaluada en dA iFA = FuncionIntegracion(dA) // Obtiene el valor de la función evaluada en dB iFB = FuncionIntegracion(dB) iSum1 = 0 iSum2 = 0 // Obtiene el valor de la primera sumatoria if (iN > 1) for i = 1:2:(iN - 1) iSum1 = iSum1 + FuncionIntegracion(i * iH) end iSum1 = iSum1 * 4 end // Obtiene el valor de la segunda sumatoria if (iN > 2) for i = 2:2:(iN - 2) iSum2 = iSum2 + FuncionIntegracion(i * iH) end iSum2 = iSum2 * 2 end dResultado = (iH / 3) * (iFA + iSum1 + iSum2 + iFB) // Imprime el resultado disp(ascii(10)) sTitulo = "Integración por el método Simpson 1/3 con " + string(iN) disp("---------- " + sTitulo + " cortes" + " ----------") ImprimeIntegral(dA, dB, sArgDeff2, dResultado) endfunction ///////////////////////////////////////////////////////////////////// // leeDatosIntegracion() // Funcion que lee los datos necesarios para evaluar una integral // de una función entre dos puntos. // Regresa: // dA: El punto inicial desde donde se integra la función // dB: El punto final hasta donde se integra la función // iN: El número de divisiones a utilizar // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // ///////////////////////////////////////////////////////////////////// function [dA, dB, iN, sArgDeff1, sArgDeff2] = leeDatosIntegracion() // Lee los límites y el número de cortes dA = input(' Ingrese el límite inferior: ') dB = input(' Ingrese el límite superior: ') iN = input(' Ingrese el número de cortes: ') // Lee la función a ser integrada [sArgDeff1, sArgDeff2] = LeeFuncion("FuncionIntegracion") endfunction ///////////////////////////////////////////////////////////////////// // iDet(dmatValores,iX,iY) // // Función que saca el determinante de una matriz de un valor de la matriz // // Parametros: // dmatValores // iX: Coordenada X del valor de la matriz a evitar // iY: Coordenada Y del valor de la matriz a evitar ///////////////////////////////////////////////////////////////////// function iDeterminante = iDet(dmatValores,iX,iY) //Numero de renglones iRenglones = size(dmatValores,1) //Numero de columnas iColumnas = size(dmatValores,2) //Auxiliar iContador = 1 iA = 1 iB = 1 iDeterminante = 0 for i = 1: iRenglones for j = 1: iColumnas if i ~= iX & j ~= iY then if iContador == 2 | iContador == 3 then iContador = iContador + 1 iB = iB * dmatValores(i,j) else iContador = iContador + 1 iA = iA * dmatValores(i,j) end end end end iDeterminante = iA - iB endfunction ///////////////////////////////////////////////////////////////////// // Cofactores() // // Función que saca la matriz de cofactores de una matriz // // Parametros: // dmatValores: Matriz de donde se obtienen los valores para sacar la // matriz de cofactores. ///////////////////////////////////////////////////////////////////// function Cofactores(dmatValores) //Numero de renglones iRenglones = size(dmatValores,1) //Numero de columnas iColumnas = size(dmatValores,2) iAux = dmatValores iSigno = 1 for i = 1: iRenglones for j = 1: iColumnas dmatValores(i,j) = iDet(iAux,i,j)*iSigno iSigno = iSigno*-1 end end disp("Matriz Cofactores") ImprimeMatriz(dmatValores) Transpose(dmatValores) endfunction ///////////////////////////////////////////////////////////////////// // Transpose(dmatMatrix) // // Función que saca la matriz transpuesta de una matriz // // Parametros: // dmatMatrix: Matriz de donde se obtienen los valores ///////////////////////////////////////////////////////////////////// function Transpose(dmatMatrix) //Numero de renglones iRenglones = size(dmatMatrix,1) //Numero de columnas iColumnas = size(dmatMatrix,2) //Matriz transpuesta iTranspose = 0 for i = 1:iRenglones for j = 1:iColumnas iTranspose(j,i) = dmatMatrix(i,j) end end disp("Matriz Cofactores Transpuesta") ImprimeMatriz(iTranspose) iDeterminante = GetDeterminante(iAux) InversaCofactores(iTranspose,iDeterminante) endfunction ///////////////////////////////////////////////////////////////////// // GetDeterminante(dmatMatrix) // // Función que saca el determinante inverso de una matriz // // Parametros: // dmatMatrix // Regresa: // iDeterminante: Determinante inverso de la matriz ///////////////////////////////////////////////////////////////////// function iDeterminante = GetDeterminante(dmatMatrix) iDeterminante = 1/det(dmatMatrix) endfunction ///////////////////////////////////////////////////////////////////// // InversaCofactores(dmatValores,iDeterminante) // // // Función que saca la matriz inversa de una matriz a través de la formula: // Inversa: 1/determinante de la matriz * (Matriz de cofactores) // // Parametros: // dmatValores: A introducir datos ///////////////////////////////////////////////////////////////////// function InversaCofactores(dmatValores,iDeterminante) //Numero de renglones iRenglones = size(dmatValores,1) //Numero de columnas iColumnas = size(dmatValores,2) for i = 1: iRenglones for j = 1: iColumnas dmatValores(i,j) = dmatValores(i,j) * iDeterminante end end ImprimeMatriz(dmatValores) endfunction /////////////////////////////////////////////////////////////////////////// // Newton-Raphson para ecuaciones no lineales // // Programa de integración por el metodo de newton-raphson // // version 1.0 /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // IteraNewton(iTeraciones,darrX,sArgDeff1,sArgDeff2....) // // Programa que realiza las iteraciones del metodo newton-raphson para // integral // // Parametros: // iTeraciones = Numero de iteraciones máximas a dar // darrX = Arreglo que contiene el vector X // sArgDeff1: El primer argumento para declarar la función // sArgDeff2: El segundo argumento para deff // and so on.... // /////////////////////////////////////////////////////////////////////////// function IteraNewton(iTeraciones, darrX, sArgDeff1,sArgDeff2,sArgDeff3,... sArgDeff4,sArgDeff5,sArgDeff6,sArgDeff7,sArgDeff8,sArgDeff9,sArgDeff10,sArgDeff11,sArgDeff12) //Declara la función a ser resuelta deff(sArgDeff1, sArgDeff2) deff(sArgDeff3, sArgDeff4) deff(sArgDeff5, sArgDeff6) deff(sArgDeff7, sArgDeff8) deff(sArgDeff9, sArgDeff10) deff(sArgDeff11,sArgDeff12) iVal = sOriginal1(1,2) sTitulo = "Solucion de ecuación no lineal para " + string(iTeraciones) sTitulo = sTitulo + " iTeraciones" disp("---------- " + sTitulo + " ----------") for i = 1: iTeraciones J = [sParcialX1(darrX(1),darrX(2)), sParcialY1(darrX(1),darrX(2)); sParcialX2(darrX(1),darrX(2)), sParcialY2(darrX(1),darrX(2))] F = [sOriginal1(darrX(1),darrX(2)); sOriginal2(darrX(1),darrX(2))] darrX = darrX - inv(J) * F disp(darrX) end endfunction ///////////////////////////////////////////////////////////////////// // LeDatosNewton() // // Pide los datos para integrar una ecuación por newton-raphson ///////////////////////////////////////////////////////////////////// function LeeDatosNewton() darrX(1) = input("Introduzca la x0: ") darrX(2) = input("Introduzca la y0: ") disp("Introduzca la cantidad de iteraciones que quiere ") iIteraciones = input("--> ") disp("Introduzca la primera equación") [sArgDeff1, sArgDeff2] = LeeFuncion2("sOriginal1") disp("Introduzca la segunda equación" ) [sArgDeff3, sArgDeff4] = LeeFuncion2("sOriginal2") disp("Introduzca la derivada parcial con respecto a X de la primera ecuación ") [sArgDeff5, sArgDeff6] = LeeFuncion2("sParcialX1") disp("Introduzca la dervida parcial con respecto a Y de la primera ecuación ") [sArgDeff7, sArgDeff8] = LeeFuncion2("sParcialY1") disp("Introduzca la derivadar parcial con respecto a X de la segunda ecuación ") [sArgDeff9, sArgDeff10] = LeeFuncion2("sParcialX2") disp("Introduzca la derivada parcial con respecto a Y de la segunda ecuacuón") [sArgDeff11, sArgDeff12] = LeeFuncion2("sParcialY2") IteraNewton(iIteraciones, darrX, sArgDeff1, sArgDeff2, sArgDeff3,... sArgDeff4, sArgDeff5,sArgDeff6,sArgDeff7,sArgDeff8,sArgDeff9,sArgDeff10,... sArgDeff11,sArgDeff12) endfunction ///////////////////////////////////////////////////////////////////// // CalculaNewton() // // Pide datos y se llena la matriz que se encuentra su integral // ///////////////////////////////////////////////////////////////////// function CalculaNewton() // Leer datos iniciales LeeDatosNewton() endfunction /////////////////////////////////////////////////////////////////////////// // divisionSitentica(darrCoeficientes,dFactor,dCantidad) // // Función que calcula 2 diviones sinteticas de acuerdo al metodo y regresa // los valores para obtener el siguiente facot // // Parametros: // darrCoeficientes = Arreglo de datos con los coeficientes de la ecuación // dCantidad = Cantidad de datos del arreglo // dFactor = Valor inicial de las iteraciones /////////////////////////////////////////////////////////////////////////// function [dPrimerValor, dSegundoValor] = divisionSintetica(darrCoeficientes, dCantidad, dFactor) darrSoluciones(1) = darrCoeficientes(1) for i = 2:dCantidad darrSoluciones(i) = (darrSoluciones(i-1) * dFactor) + darrCoeficientes(i) end for i = 1: dCantidad disp(string(darrSoluciones(i))) end darrSoluciones2(1) = darrCoeficientes(1) dPrimerValor = darrSoluciones(dCantidad) for i = 2: dCantidad-1 darrSoluciones2(i) = (darrSoluciones2(i-1) * dFactor) + darrSoluciones(i) end dSegundoValor = darrSoluciones2(dCantidad-1) endfunction /////////////////////////////////////////////////////////////////////////// // IteracionVieta(darrDatos,dFactor,dCantidad,dIteraciones) // // Funcion que realiza las Iteraciones del metodo Birge Vieta hasta llegar // al numero deseado de // // Parametros: // darrDatos = Arreglo de datos con los coeficientes de la ecuación // dCantidad = Cantidad de datos del arreglo // dFactor = Valor inicial de las iteraciones // dIteraciones = Numero máximo de las iteraciones /////////////////////////////////////////////////////////////////////////// function IteracionVieta(darrDatos,dFactor, dCantidad,dIteraciones) //Inicalizamos el error con un valor muy grande dErrorAbsAct = 99999.9 //Inicializamos las iteraciones que tenemos dIteracionesActuales = 0 while (dIteracionesActuales <> dIteraciones) //Obtenemos los primeros valores de la iteración [dPrimerValor, dSegundoValor ] = divisionSintetica(darrDatos,dCantidad,dFactor) dFactorPrevio = dFactor dFactor = dFactor - dPrimerValor/dSegundoValor if dIteracionesActuales <> 0 then disp("Iteracion: " + string(dIteracionesActuales)) disp("Factor: " + string(dFactor)) disp("Error: " + string(CalculaErrAbs(dFactorPrevio, dFactor))) else disp("Iteracion: " + string(dIteracionesActuales)) disp("Factor: " + string(dFactor)) end dIteracionesActuales = dIteracionesActuales + 1 end endfunction /////////////////////////////////////////////////////////////////////////// // leeDatosVieata() // // Funcion que pide los datos para BirgeVieta // // Regresa: // darrDatos = Arreglo de datos con los coeficientes de la ecuación // dCantidad = Cantidad de datos del arreglo /////////////////////////////////////////////////////////////////////////// function [darrDatos,dCantidad] = leeDatosVieta() dCantidad = input("¿Grado del polinomio? ") dCantidad = dCantidad + 1 for i = 1: dCantidad darrDatos(i) = input("Introduzca los coeficientes del polinomio, si en algún coeficiente no hay introduzca 0 ") end dFactor = input("¿Valor inicial? ") dIteraciones = input("¿Cuantas iteraciones? ") //Función que manda a llamar a iterar Birge Vieat IteracionVieta(darrDatos,dFactor,dCantidad,dIteraciones) endfunction /////////////////////////////////////////////////////////////////////////// // Birge Vieta // // Programa que encuentra la raiz de una ecuación por el metodo de // Birge Vieta // // version 1.0 /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// // CalculaVieta() // // Funcion que manda a inicializar todos los valores necesarios para el // metodo de Birge Vieta // /////////////////////////////////////////////////////////////////////////// function CalculaVieta() [darrDatos,dCantidad] = leeDatosVieta() endfunction ///////////////////////////////////////////////////////////////////// // Menu() // // Muestra el menú de opciones principal // ///////////////////////////////////////////////////////////////////// function Menu() //Inicializar variables iOpciones = 0 while (iOpciones ~= 6) // Limpiar la pantalla antes del menu de opciones disp(ascii(10) + ascii(10) + ascii(10) + ascii(10) + ascii(10)) disp(ascii(10) + ascii(10) + ascii(10) + ascii(10) + ascii(10)) disp(ascii(10) + ascii(10) + ascii(10) + ascii(10) + ascii(10)) disp("=================== Menu de opciones ===================") disp("1. Solución de ecuaciones no lineales") disp("2. Solución de ecuaciones lineales") disp("3. Ajuste de curvas") disp("4. Interpolación") disp("5. Integración") disp("6. Salir") disp(ascii(10)) iOpciones = input(" Qué opción deseas (1-6) --> ") if (iOpciones == 1) then EcuacionesNoLineales() elseif (iOpciones == 2) then EcuacionesLineales() elseif (iOpciones == 3 ) then AjusteDeCurvas() elseif (iOpciones == 4) then Interpolacion() elseif (iOpciones == 5) then Integracion() elseif (iOpciones == 6) then disp("Hasta luego ") else disp("Opción erronea") end end endfunction ///////////////////////////////////////////////////////////////////// // EcuacionesNoLineales() // // Muestra el menú de opciones para los métodos de Ecuaciones no Lineales // ///////////////////////////////////////////////////////////////////// function EcuacionesNoLineales() iOpciones = 0 while(iOpciones ~= 6) disp(ascii(10) + ascii(10)) sTitulo = "Solución de ecuaciones no lineales" disp("================ " + sTitulo + " ================") disp("1. Bisección") disp("2. Newton-Rapson") disp("3. Secante") disp("4. Regula Falsi") disp("5. Birge Vieta") disp("6. Salir") iOpciones = input(" Qué opción deseas (1-6) --> ") if iOpciones == 1 then CalculaBiseccion() elseif iOpciones == 2 then CalculaNewtonRaphson() elseif (iOpciones == 3) then CalculaSecante() elseif (iOpciones == 4) then CalculaRegulaFalsi() elseif (iOpciones == 5) then CalculaVieta() end end endfunction ///////////////////////////////////////////////////////////////////// // EcuacionesLineales() // // Muestra el menú de opciones para los métodos de Ecuaciones Lineales // ///////////////////////////////////////////////////////////////////// function EcuacionesLineales() iOpciones = 0 bPrimeraVez = %T while (iOpciones ~= 5) sMensaje = "" // Desplegar un mensaje diferente para la segunda vez que entre if(bPrimeraVez == %T) sMensaje = "Presiona enter para ingresar una matriz " else sMensaje = "Presiona 1 si deseas ingresar una matriz diferente," sMensaje = sMensaje + ascii(10) + "2 " sMensaje = sMensaje + "si deseas usar la matriz anterior de nuevo " end iOpciones = input(sMensaje + "o 5 si deseas regresar --> ") if(iOpciones == 5) break end // Para permitir al usuario ingresar una matriz en todos los casos // En la primera vez, forzosamente se tiene que leer la matriz if(iOpciones ~= 5 & iOpciones ~= 2 | bPrimeraVez) dmatValores = LeeMatriz() end if iOpciones ~= 5 then bPrimeraVez = %F disp(ascii(10) + ascii(10)) sTitulo = "Solución de sistemas de ecuaciones lineales" disp("================ " + sTitulo + " ================") disp("1. Cramer") disp("2. Eliminación Gaussiana") disp("3. Gauss-Jordan") disp("4. Montante") disp("5. Salir") iOpciones = input(" Qué opción deseas (1-5) --> ") if (iOpciones == 1) then Cramer(dmatValores) elseif (iOpciones == 2) then EliminacionGaussiana(dmatValores) elseif (iOpciones == 3) then EliminacionGaussJordan(dmatValores) elseif (iOpciones == 4) then Montante(dmatValores,5) end end end endfunction ///////////////////////////////////////////////////////////////////// // AjusteDeCurvas() // // Muestra el menú de opciones para los métodos de Ajuste De Curvas // ///////////////////////////////////////////////////////////////////// function AjusteDeCurvas() iOpciones = 0 while (iOpciones ~= 5) // Para permitir al usuario ingresar una matriz en todos los casos // En la primera vez, forzosamente se tiene que leer la matriz disp(ascii(10) + ascii(10)) sTitulo = "Ajuste de curvas" disp("================ " + sTitulo + " ================") disp("1. Regresión Lineal") disp("2. Regresión Exponencial") disp("3. Regresión Potencial") disp("4. Inversa por Cofactores") disp("5. Salir") iOpciones = input(" Qué opción deseas (1-5) --> ") if iOpciones == 1 then RegresionLineal() elseif iOpciones == 2 then RegresionExponencial() elseif iOpciones == 3 then RegresionPotencial() elseif iOpciones == 4 then dMatMatriz = LeeMatriz() Cofactores(dMatMatriz) end end endfunction ///////////////////////////////////////////////////////////////////// // Interpolacion() // // Muestra el menú de opciones para los métodos de Interpolacion // ///////////////////////////////////////////////////////////////////// function Interpolacion() iOpciones = 0 bPrimeraVez = %T while (iOpciones ~= 3) sMensaje = "" // Desplegar un mensaje diferente para la segunda vez que entre if(bPrimeraVez == %T) sMensaje = "Presiona enter para ingresar los datos a interpolar " else sMensaje = "Presiona 1 si deseas ingresar datos diferentes," sMensaje = sMensaje + ascii(10) + "2 " sMensaje = sMensaje + "si deseas usar los datos anteriores de nuevo " end iOpciones = input(sMensaje + "o 3 si deseas regresar --> ") if(iOpciones == 3) break end // Para permitir al usuario ingresar una los datos en todos los casos // En la primera vez, forzosamente se tiene que leer la matriz if(iOpciones ~= 3 & iOpciones ~= 2 | bPrimeraVez) [dmatPuntos, dPred] = leeDatosInterpolacion() end bPrimeraVez = %F disp(ascii(10) + ascii(10)) sTitulo = "Interpolación" disp("================ " + sTitulo + " ================") disp("1. Lagrange") disp("2. Diferencias Divididas de Newton") disp("3. Salir") iOpciones = input(" Qué opción deseas (1-3) --> ") if iOpciones == 1 then InterLagrange(dmatPuntos, dPred) elseif iOpciones == 2 then InterNewtonDiff(dmatPuntos, dPred) end end endfunction ///////////////////////////////////////////////////////////////////// // Integracion() // // Muestra el menú de opciones para los métodos de integración // ///////////////////////////////////////////////////////////////////// function Integracion() iOpciones = 0 while (iOpciones ~= 4) disp(ascii(10) + ascii(10)) sTitulo = "Integración" disp("================ " + sTitulo + " ================") disp("1. Trapecio") disp("2. Simpson 1/3") disp("3. Newton-Rapson para ecuaciones no lineales") disp("4. Salir") disp(ascii(10)) iOpciones = input(" Qué opción deseas (1-4) --> ") if iOpciones == 1 then [dA, dB, iN, sArgDeff1, sArgDeff2] = leeDatosIntegracion() IntegraTrapecios(dA, dB, iN, sArgDeff1, sArgDeff2) elseif iOpciones == 2 then [dA, dB, iN, sArgDeff1, sArgDeff2] = leeDatosIntegracion() IntegraSimpson(dA, dB, iN, sArgDeff1, sArgDeff2) elseif iOpciones == 3 then CalculaNewton() end end endfunction //////////////////////// PROGRAMA PRINCIPAL /////////////////////////// // Manda llamara al menu pricipal Menu()
8fbf827be21093f0c5f7226d6249ac9310fc1118
3c47dba28e5d43bda9b77dca3b741855c25d4802
/microdaq/macros/mdaqToolboxPath.sci
dc8079555db01b69c26ed1f07c505a11b68c094d
[ "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
202
sci
mdaqToolboxPath.sci
function result_path = mdaqToolboxPath() result_path = []; path = fileparts(get_function_path('mdaqToolboxPath')); result_path = part(path,1:length(path)-length("macros") - 1 ); endfunction
a041d72e0beb5e92b52fc6e82cc1a604ecc20604
449d555969bfd7befe906877abab098c6e63a0e8
/2015/CH9/EX9.8/9_8.sce
b849a9c99d8e2a586e7c0813d95e764ff2c25060
[]
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
264
sce
9_8.sce
clc //initialisation of variables veff=0.8 //efficiency rp=7 n=1.2 //constant value pi=(22/7) //CALCULATIONS c=(veff-1)/(1-(rp)^(1/n)) vs=2/c d=((4*vs)/pi)^(1/3) //RESULTS printf('stroke volume is %2fm*m*m',vs) printf('\nlenght of stroke is %2fm',d)
b35b05745ffcc39cb33d1b10f3b87862550a488b
449d555969bfd7befe906877abab098c6e63a0e8
/2411/CH5/EX5.22/Ex5_22.sce
c771719e977df7ed757c82ce47b2df5341821ca9
[]
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
534
sce
Ex5_22.sce
// Scilab Code Ex5.22: Page-295 (2008) clc; clear; h = 6.62e-034; // Planck's constant, Js m = 1e-009; // Mass of the particle, kg v = 1; // Velocity of the particle, m/s delta_v = v*0.01/100; // Minimum uncertainty in the velocity of the particle, m/s delta_x = h/(m*delta_v); // Minimum uncertainty in the position of the particle, m printf("\nThe minimum uncertainty in the position of the particle = %4.2e m", delta_x); // Result // The minimum uncertainty in the position of the particle = 6.62e-021 m
0f7b23b239126aa773d70626ad6c68eae04c7532
449d555969bfd7befe906877abab098c6e63a0e8
/2015/CH8/EX8.3/8_3.sce
87e653a0bf3a62c390e52bc82ddf9f5618729581
[]
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
396
sce
8_3.sce
clc //initialisation of variables t1=253 //temp in k t3=313 //temp in k cp=1.005 //kj/kg r=4 //bar g=1.4 //CALCULATIONS t2=(t1*(r)^((g-1)/g)) t4=(t3/(r)^((g-1)/g)) re=cp*(t1-t4) wi=cp*((t2-t3)-(t1-t4)) cop=re/wi ma=(3.5164*10)/re p=ma*wi //RESULTS printf('cop is %2f',cop) printf('\nmass of refrigeration is %2fkg/s',ma) printf('\npower required to drive the unit is %2fkw',p)
81da69bfa85db94a6eb8177e4c70f530e96cce7e
38b89b84da9fe235f5b3a099bff16349b503cb87
/funcoes.sci
c9430c0a3911ec41ce27525f91e5ebd1aa9641de
[ "MIT" ]
permissive
matheussfarias/preditoracoes
744c7d422786a7dc9c52ffee58030b480d9f4e1f
101b917f5193dcd91037f332eb8dce40d867e739
refs/heads/master
2020-08-31T06:37:13.684274
2019-10-30T21:15:12
2019-10-30T21:15:12
218,625,603
1
0
null
null
null
null
UTF-8
Scilab
false
false
824
sci
funcoes.sci
// funcao de correlacao function Rx = comat(x,N) px = xcorr(x,N,'biased'); for i = 1:N+1 Rx(:,i) = px((N+2-i):(2*(N+1)-i)); end endfunction //para fins didaticos, a implementacao pura do LMS function [y,e,wn]=filterLMS(x,d,mi,N) xn=zeros(N+1,1); Wn=zeros(N+1,1); M=length(x); for n=1:M xn=[x(n);xn(1:N)]; y(n)= Wn'*xn; e(n)=d(n)-y(n); Wn = Wn + 2*mi*e(n)*xn; end wn=Wn endfunction //implementacao modificada para o caso do projeto function [y]=LMSpredict(x,l,u,N) xd=[zeros(1,l) x]; xn=zeros(N+1,1) Wn=zeros(N+1,1); M=length(xd); for n=1:M xn=[xd(n);xn(1:N)]; y(n)= Wn'*xn; if(n>M-l) e =0; else e=x(n)-y(n); end Wn = Wn + 2*u*e*xn; end endfunction
86a6a376ae4cef789c09e96a2a7dac67e5c00540
8ad9380384d2751d79937ba5d6d581565596b891
/macros/vtk2ply.sci
efbc1aba6deb0946f1c70c06df8896024ba901dd
[ "BSD-3-Clause" ]
permissive
iamAkshayrao/scilab_point_cloud_toolbox
1d8845f0830ddb623383c8dbfeadc8a3a35e8801
5d592a695b7976f4e63f0ae24d0a14937e474642
refs/heads/master
2022-12-17T23:14:11.513116
2020-09-25T18:57:02
2020-09-25T18:57:02
290,829,006
0
0
null
null
null
null
UTF-8
Scilab
false
false
507
sci
vtk2ply.sci
function vtk2ply() // Convert a VTK file to PLY format. // // Syntax // PointCloud(vtkFileName,plyFileName,"vtk2ply") // // Parameters // vtkFileName : input file of vtk format // plyFileName : output file of ply format // // Description // Input file is an VTK format which is them transformed to PLY format and stored // // Examples // PointCloud("tum_rabbit.vtk","output_vtk2ply.ply","vtk2ply") // // //Authors //Ankit Kumar //Akshay S Rao //Mohammed Rehab Sait //Aliasgar AV endfunction
ac0452ac6af57042ced5a91da0f4e342ecef41b3
449d555969bfd7befe906877abab098c6e63a0e8
/27/CH10/EX10.1.1/Example_10_1_1.sce
a738356d6d8634706c99c0fa1b691fa087e36c7d
[]
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
833
sce
Example_10_1_1.sce
//Example 10.1.1 Page 350 //Non-Linear Dynamics and Chaos, First Indian Edition Print 2007 //Steven H. Strogatz clear; clear; clc; close; x=poly(0,"x"); f = (x^2)-x; //Defining Polynomial--> x(dot)=x^2 -1. Let this be f(x) disp("Fixed Points are :") y = roots(f) lambda1=evstr(2*y(1)) lambda2=evstr(2*y(2)) //if lambda1<1 then // disp(y(1)) //disp("Stable.") //elseif lambda1>1 // disp(y(1)) //disp("Unstable.") //else // disp("Unconclusive since lambda=1.") //end //if lambda2<1 then // disp(y(2)) // disp("Stable.") //elseif lambda2>1 // disp(y(2)) // disp("Unstable.") //else // disp("Unconclusive since lambda=1.") //end disp("Since lambda1=0<1, Thus it is stable.") disp("Since lambda2=2>1 Thus it is unstable.") //End of Example.
d1a17abb2042ab522e595d999c29c45ac0c2eaa8
449d555969bfd7befe906877abab098c6e63a0e8
/2582/CH3/EX3.6/Ex3_6.sce
dc8b1001d2cbf8b40e0c05934aeb85bb071f2659
[]
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
Ex3_6.sce
//Ex 3.6 clc;clear;close; format('v',6); fo=1;//kHz Ap=1.586;//Band pass gain C1=0.005;C2=0.005//micro F(Assumed) R=1/(2*%pi*fo*10^3*C1*10^-6);//ohm Rf=10;//kohm(Assumed) Ri=Rf/(Ap-1);//kohm disp("Design values are :"); disp(R/1000,"Resistance in kohm, R1=R2="); disp(Ri,"Resistance Ri(kohm)"); disp(Rf,"Resistance Rf(kohm)"); disp(C1,"Capacitance(micro F), C1=C2=");
95eac6317244ec923df878951c8e53875a1d8ceb
f23cac45e0a1e3e9444fd3bb8e11d56a5be97cf8
/odeholding.sci
242b31a570415ca4b12d8f8c78d4c2d2a03768e1
[]
no_license
paulaperdigaoram/YOGURT
4cd805bfb9a06630fba0d990ad7edbbf3786903b
fc95ba5408e085c91bca2a04084fc36b2ea39f95
refs/heads/master
2020-03-22T07:56:53.718648
2018-08-23T17:31:35
2018-08-23T17:31:35
139,734,779
0
0
null
null
null
null
UTF-8
Scilab
false
false
128
sci
odeholding.sci
function dxdt = odeholding(t,x) Dm = D1211m*10^((121.1-T)/Zm); // s km = log(10)/Dm; // s-1 dxdt = -km*x(1) endfunction
e0d2407210c4d6cc14fadeab443edd1e4b85fecd
99b4e2e61348ee847a78faf6eee6d345fde36028
/Toolbox Test/bartlett/bartlett2.sce
f9428922565d58061b7f7585c4aba14af63829f2
[]
no_license
deecube/fosseetesting
ce66f691121021fa2f3474497397cded9d57658c
e353f1c03b0c0ef43abf44873e5e477b6adb6c7e
refs/heads/master
2021-01-20T11:34:43.535019
2016-09-27T05:12:48
2016-09-27T05:12:48
59,456,386
0
0
null
null
null
null
UTF-8
Scilab
false
false
250
sce
bartlett2.sce
//when i/p is a column vector v=[1;2;34;5]; w=bartlett(v); disp(w); //output //!--error 10000 //L must be a positive integer //at line 26 of function bartlett called by : //w=bartlett(v); //MATLAB o/p // 0 // 0 // 0 // 0 //
7da055dedc5c9fef8b1dba55219580e34b466cfb
6d976a524de332465dfaf499c4cdf8f09499f4fe
/prog_assembly/libs/scilab_code/characterization/char_Scurve.sce
16265287c4a655ba4bcd13b21c257ba42967cde3
[]
no_license
skim819/rasp30
78b035fa0f1d5e94e434d26324d3238695b1908c
1efee4f95cda788c2a379cc95a22cee31683d429
refs/heads/master
2020-04-07T07:42:52.848775
2016-01-27T21:22:55
2016-01-27T21:22:55
50,114,407
0
0
null
2016-01-21T14:51:37
2016-01-21T14:51:36
null
UTF-8
Scilab
false
false
32,385
sce
char_Scurve.sce
while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_swc ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_swc.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_aboveVt_swc"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_swc.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_swc.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_swc.hex','r'); clear data_swc; m_graph=3; data_swc = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_swc(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_swc(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_swc(:,2)=data_swc(:,2)*1e-5; // <- 10us for i=3:m_graph data_swc(:,i+2)=exp(polyval(p1,data_swc(:,i),S1)); end // data_swc(:,3) Hex@Vgm=0.6V, data_swc(:,4) Hex@Vgm=0V, data_swc(:,5) Current@Vgm=0.6V, data_swc(:,6) Current@Vgm=0V scf(11);clf(11); plot2d("nl", data_swc(:,2), data_swc(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-10;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; fprintfMat("Scurve_at_Vg3.6V_swc.data", data_swc, "%5.15f"); data_size_temp=size(data_swc) scf(12);clf(12); plot2d("nn", data_swc(1:data_size_temp(1,1)-1,3), data_swc(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_swc = [(0:64:64*255)']; pwt_swc = pwt_swc + hex_1na; pwt_swc(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_swc','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_swc(i,3) > hex_1na then j=j+1; end if pwt_swc(k,1) > data_swc(i,3) then pwt_swc(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_swc(k,2))),fd_w); end mclose(fd_w); while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_ota ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_ota.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_aboveVt_ota"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_ota.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_ota.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_ota.hex','r'); clear data_ota; m_graph=3; data_ota = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_ota(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_ota(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_ota(:,2)=data_ota(:,2)*1e-5; // <- 10us for i=3:m_graph data_ota(:,i+2)=exp(polyval(p1,data_ota(:,i),S1)); end scf(13);clf(13); plot2d("nl", data_ota(:,2), data_ota(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-10;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; data_size_temp=size(data_ota) fprintfMat("Scurve_at_Vg3.6V_ota.data", data_ota, "%5.15f"); scf(14);clf(14); plot2d("nn", data_ota(1:data_size_temp(1,1)-1,3), data_ota(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_ota = [(0:64:64*255)']; pwt_ota = pwt_ota + hex_1na; pwt_ota(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_ota','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_ota(i,3) > hex_1na then j=j+1; end if pwt_ota(k,1) > data_ota(i,3) then pwt_ota(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_ota(k,2))),fd_w); end mclose(fd_w); while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_otaref ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_otaref.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_aboveVt_otaref"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_otaref.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_otaref.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_otaref.hex','r'); clear data_otaref; m_graph=3; data_otaref = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_otaref(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_otaref(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_otaref(:,2)=data_otaref(:,2)*1e-5; // <- 10us for i=3:m_graph data_otaref(:,i+2)=exp(polyval(p1,data_otaref(:,i),S1)); end // data_otaref(:,3) Hex@Vgm=0.6V, data_otaref(:,4) Hex@Vgm=0V, data_otaref(:,5) Current@Vgm=0.6V, data_otaref(:,6) Current@Vgm=0V scf(15);clf(15); plot2d("nl", data_otaref(:,2), data_otaref(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-10;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; fprintfMat("Scurve_at_Vg3.6V_otaref.data", data_otaref, "%5.15f"); data_size_temp=size(data_otaref) scf(16);clf(16); plot2d("nn", data_otaref(1:data_size_temp(1,1)-1,3), data_otaref(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_otaref = [(0:64:64*255)']; pwt_otaref = pwt_otaref + hex_1na; pwt_otaref(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_otaref','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_otaref(i,3) > hex_1na then j=j+1; end if pwt_otaref(k,1) > data_otaref(i,3) then pwt_otaref(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_otaref(k,2))),fd_w); end mclose(fd_w); while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_mite ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_mite.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_aboveVt_mite"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_mite.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_mite.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_mite.hex','r'); clear data_mite; m_graph=3; data_mite = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_mite(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_mite(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_mite(:,2)=data_mite(:,2)*1e-5; // <- 10us for i=3:m_graph data_mite(:,i+2)=exp(polyval(p1,data_mite(:,i),S1)); end // data_mite(:,3) Hex@Vgm=0.6V, data_mite(:,4) Hex@Vgm=0V, data_mite(:,5) Current@Vgm=0.6V, data_mite(:,6) Current@Vgm=0V scf(17);clf(17); plot2d("nl", data_mite(:,2), data_mite(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-10;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; fprintfMat("Scurve_at_Vg3.6V_mite.data", data_mite, "%5.15f"); data_size_temp=size(data_mite) scf(18);clf(18); plot2d("nn", data_mite(1:data_size_temp(1,1)-1,3), data_mite(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_mite = [(0:64:64*255)']; pwt_mite = pwt_mite + hex_1na; pwt_mite(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_mite','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_mite(i,3) > hex_1na then j=j+1; end if pwt_mite(k,1) > data_mite(i,3) then pwt_mite(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_mite(k,2))),fd_w); end mclose(fd_w); while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_dirswc ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_dirswc.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_aboveVt_dirswc"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_dirswc.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_dirswc.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_dirswc.hex','r'); clear data_dirswc; m_graph=3; data_dirswc = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_dirswc(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_dirswc(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_dirswc(:,2)=data_dirswc(:,2)*1e-5; // <- 10us for i=3:m_graph data_dirswc(:,i+2)=exp(polyval(p1,data_dirswc(:,i),S1)); end // data_dirswc(:,3) Hex@Vgm=0.6V, data_dirswc(:,4) Hex@Vgm=0V, data_dirswc(:,5) Current@Vgm=0.6V, data_dirswc(:,6) Current@Vgm=0V scf(19);clf(19); plot2d("nl", data_dirswc(:,2), data_dirswc(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-10;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; fprintfMat("Scurve_at_Vg3.6V_dirswc.data", data_dirswc, "%5.15f"); data_size_temp=size(data_dirswc) scf(20);clf(20); plot2d("nn", data_dirswc(1:data_size_temp(1,1)-1,3), data_dirswc(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_dirswc = [(0:64:64*255)']; pwt_dirswc = pwt_dirswc + hex_1na; pwt_dirswc(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_dirswc','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_dirswc(i,3) > hex_1na then j=j+1; end if pwt_dirswc(k,1) > data_dirswc(i,3) then pwt_dirswc(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_dirswc(k,2))),fd_w); end mclose(fd_w); scf(21);clf(21); plot2d("nl", data_swc(:,2), data_swc(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; plot2d("nl", data_ota(:,2), data_ota(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 2;p.children.line_mode = 'off'; plot2d("nl", data_otaref(:,2), data_otaref(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 3;p.children.line_mode = 'off'; plot2d("nl", data_mite(:,2), data_mite(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 4;p.children.line_mode = 'off'; plot2d("nl", data_dirswc(:,2), data_dirswc(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 5;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); legend("swc","ota","otaref","mite","dirswc","in_lower_right"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-10;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; //a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-10;a.data_bounds(2,1)=0.001;a.data_bounds(2,2)=1D-04; scf(22);clf(22); data_size_temp=size(data_swc);plot2d("nn", data_swc(1:data_size_temp(1,1)-1,3), data_swc(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; data_size_temp=size(data_ota);plot2d("nn", data_ota(1:data_size_temp(1,1)-1,3), data_ota(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 2;p.children.line_mode = 'off'; data_size_temp=size(data_otaref);plot2d("nn", data_otaref(1:data_size_temp(1,1)-1,3), data_otaref(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 3;p.children.line_mode = 'off'; data_size_temp=size(data_dirswc);plot2d("nn", data_dirswc(1:data_size_temp(1,1)-1,3), data_dirswc(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 5;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); legend("swc","ota","otaref","dirswc","in_lower_right"); //a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-10;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_lowsubVt_swc ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_lowsubVt_swc.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_lowsubVt_swc"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_lowsubVt_swc.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_lowsubVt_swc.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_lowsubVt_swc.hex','r'); clear data_lowsubVt_swc; m_graph=3; data_lowsubVt_swc = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_lowsubVt_swc(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_lowsubVt_swc(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_lowsubVt_swc(:,2)=data_lowsubVt_swc(:,2)*1e-5; // <- 10us for i=3:m_graph data_lowsubVt_swc(:,i+2)=exp(polyval(p1,data_lowsubVt_swc(:,i),S1))/kappa_constant; end // data_swc(:,3) Hex@Vgm=0.6V, data_swc(:,4) Hex@Vgm=0V, data_swc(:,5) Current@Vgm=0.6V, data_swc(:,6) Current@Vgm=0V scf(31);clf(31); plot2d("nl", data_lowsubVt_swc(:,2), data_lowsubVt_swc(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-12;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; fprintfMat("Scurve_at_Vg3.6V_lowsubVt_swc.data", data_lowsubVt_swc, "%5.15f"); data_size_temp=size(data_lowsubVt_swc) scf(32);clf(32); plot2d("nn", data_lowsubVt_swc(1:data_size_temp(1,1)-1,3), data_lowsubVt_swc(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_lowsubVt_swc = [(0:64:64*255)']; pwt_lowsubVt_swc = pwt_lowsubVt_swc + hex_1na; pwt_lowsubVt_swc(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_lowsubVt_swc','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_lowsubVt_swc(i,3) > hex_1na then j=j+1; end if pwt_lowsubVt_swc(k,1) > data_lowsubVt_swc(i,3) then pwt_lowsubVt_swc(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_lowsubVt_swc(k,2))),fd_w); end mclose(fd_w); while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_lowsubVt_ota ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_lowsubVt_ota.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_lowsubVt_ota"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_lowsubVt_ota.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_lowsubVt_ota.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_lowsubVt_ota.hex','r'); clear data_lowsubVt_ota; m_graph=3; data_lowsubVt_ota = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_lowsubVt_ota(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_lowsubVt_ota(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_lowsubVt_ota(:,2)=data_lowsubVt_ota(:,2)*1e-5; // <- 10us for i=3:m_graph data_lowsubVt_ota(:,i+2)=exp(polyval(p1,data_lowsubVt_ota(:,i),S1))/kappa_constant; end scf(33);clf(33); plot2d("nl", data_lowsubVt_ota(:,2), data_lowsubVt_ota(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-12;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; data_size_temp=size(data_lowsubVt_ota) fprintfMat("Scurve_at_Vg3.6V_lowsubVt_ota.data", data_lowsubVt_ota, "%5.15f"); scf(34);clf(34); plot2d("nn", data_lowsubVt_ota(1:data_size_temp(1,1)-1,3), data_lowsubVt_ota(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_lowsubVt_ota = [(0:64:64*255)']; pwt_lowsubVt_ota = pwt_lowsubVt_ota + hex_1na; pwt_lowsubVt_ota(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_lowsubVt_ota','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_lowsubVt_ota(i,3) > hex_1na then j=j+1; end if pwt_lowsubVt_ota(k,1) > data_lowsubVt_ota(i,3) then pwt_lowsubVt_ota(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_lowsubVt_ota(k,2))),fd_w); end mclose(fd_w); while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_lowsubVt_otaref ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_lowsubVt_otaref.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_lowsubVt_otaref"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_lowsubVt_otaref.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_lowsubVt_otaref.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_lowsubVt_otaref.hex','r'); clear data_lowsubVt_otaref; m_graph=3; data_lowsubVt_otaref = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_lowsubVt_otaref(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_lowsubVt_otaref(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_lowsubVt_otaref(:,2)=data_lowsubVt_otaref(:,2)*1e-5; // <- 10us for i=3:m_graph data_lowsubVt_otaref(:,i+2)=exp(polyval(p1,data_lowsubVt_otaref(:,i),S1))/kappa_constant; end // data_lowsubVt_otaref(:,3) Hex@Vgm=0.6V, data_lowsubVt_otaref(:,4) Hex@Vgm=0V, data_lowsubVt_otaref(:,5) Current@Vgm=0.6V, data_lowsubVt_otaref(:,6) Current@Vgm=0V scf(35);clf(35); plot2d("nl", data_lowsubVt_otaref(:,2), data_lowsubVt_otaref(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-12;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; fprintfMat("Scurve_at_Vg3.6V_lowsubVt_otaref.data", data_lowsubVt_otaref, "%5.15f"); data_size_temp=size(data_lowsubVt_otaref) scf(36);clf(36); plot2d("nn", data_lowsubVt_otaref(1:data_size_temp(1,1)-1,3), data_lowsubVt_otaref(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_lowsubVt_otaref = [(0:64:64*255)']; pwt_lowsubVt_otaref = pwt_lowsubVt_otaref + hex_1na; pwt_lowsubVt_otaref(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_lowsubVt_otaref','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_lowsubVt_otaref(i,3) > hex_1na then j=j+1; end if pwt_lowsubVt_otaref(k,1) > data_lowsubVt_otaref(i,3) then pwt_lowsubVt_otaref(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_lowsubVt_otaref(k,2))),fd_w); end mclose(fd_w); while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_lowsubVt_mite ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_lowsubVt_mite.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_lowsubVt_mite"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_lowsubVt_mite.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_lowsubVt_mite.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_lowsubVt_mite.hex','r'); clear data_lowsubVt_mite; m_graph=3; data_lowsubVt_mite = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_lowsubVt_mite(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_lowsubVt_mite(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_lowsubVt_mite(:,2)=data_lowsubVt_mite(:,2)*1e-5; // <- 10us for i=3:m_graph data_lowsubVt_mite(:,i+2)=exp(polyval(p1,data_lowsubVt_mite(:,i),S1))/kappa_constant; end // data_lowsubVt_mite(:,3) Hex@Vgm=0.6V, data_lowsubVt_mite(:,4) Hex@Vgm=0V, data_lowsubVt_mite(:,5) Current@Vgm=0.6V, data_lowsubVt_mite(:,6) Current@Vgm=0V scf(37);clf(37); plot2d("nl", data_lowsubVt_mite(:,2), data_lowsubVt_mite(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-12;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; fprintfMat("Scurve_at_Vg3.6V_lowsubVt_mite.data", data_lowsubVt_mite, "%5.15f"); data_size_temp=size(data_lowsubVt_mite) scf(38);clf(38); plot2d("nn", data_lowsubVt_mite(1:data_size_temp(1,1)-1,3), data_lowsubVt_mite(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_lowsubVt_mite = [(0:64:64*255)']; pwt_lowsubVt_mite = pwt_lowsubVt_mite + hex_1na; pwt_lowsubVt_mite(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_lowsubVt_mite','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_lowsubVt_mite(i,3) > hex_1na then j=j+1; end if pwt_lowsubVt_mite(k,1) > data_lowsubVt_mite(i,3) then pwt_lowsubVt_mite(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_lowsubVt_mite(k,2))),fd_w); end mclose(fd_w); while 1==1, [a1,b1]=unix_g("~/rasp30/prog_assembly/libs/sh/asm2ihex.sh char_Scurve_lowsubVt_dirswc ~/rasp30/prog_assembly/libs/asm_code/char_Scurve_lowsubVt_dirswc.s43 16384 16384 16384"); [a2,b2]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/write_mem2_NoRelease.tcl -start_address 0x7000 -input_file_name "+hid_dir+"/target_info_lowsubVt_dirswc"); if (b1==0) & (b2==0) then [a3,b3]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/program.tcl -speed 115200 char_Scurve_lowsubVt_dirswc.elf"); [a4,b4]=unix_g("sudo tclsh ~/rasp30/prog_assembly/libs/tcl/read_mem2_NoRelease.tcl -start_address 0x5000 -length 7000 -output_file_name char_Scurve_lowsubVt_dirswc.hex"); end if (b1==0) & (b2==0) & (b3==0) & (b4==0) then break end // 0 if no error occurred, 1 if error. if (b1==1) | (b2==1) | (b3==1) | (b4==1) then disp("connection issue -> it is trying again"); unix_w('/home/ubuntu/rasp30/sci2blif/usbreset'); sleep(2000); end end j=1; fd = mopen('char_Scurve_lowsubVt_dirswc.hex','r'); clear data_lowsubVt_dirswc; m_graph=3; data_lowsubVt_dirswc = [1:m_graph];str_temp = mgetstr(7,fd); while str_temp ~= "0xffff ", data_lowsubVt_dirswc(j,1) = msscanf(str_temp,"%x"); for i=2:m_graph data_lowsubVt_dirswc(j,i) = msscanf(mgetstr(7,fd),"%x"); end str_temp = mgetstr(7,fd); j=j+1; end mclose(fd); data_lowsubVt_dirswc(:,2)=data_lowsubVt_dirswc(:,2)*1e-5; // <- 10us for i=3:m_graph data_lowsubVt_dirswc(:,i+2)=exp(polyval(p1,data_lowsubVt_dirswc(:,i),S1))/kappa_constant; end // data_lowsubVt_dirswc(:,3) Hex@Vgm=0.6V, data_lowsubVt_dirswc(:,4) Hex@Vgm=0V, data_lowsubVt_dirswc(:,5) Current@Vgm=0.6V, data_lowsubVt_dirswc(:,6) Current@Vgm=0V scf(39);clf(39); plot2d("nl", data_lowsubVt_dirswc(:,2), data_lowsubVt_dirswc(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-12;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; fprintfMat("Scurve_at_Vg3.6V_lowsubVt_dirswc.data", data_lowsubVt_dirswc, "%5.15f"); data_size_temp=size(data_lowsubVt_dirswc) scf(40);clf(40); plot2d("nn", data_lowsubVt_dirswc(1:data_size_temp(1,1)-1,3), data_lowsubVt_dirswc(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); pwt_lowsubVt_dirswc = [(0:64:64*255)']; pwt_lowsubVt_dirswc = pwt_lowsubVt_dirswc + hex_1na; pwt_lowsubVt_dirswc(1,2)=0; offset=0; fd_w = mopen('pulse_width_table_lowsubVt_dirswc','wt'); for k=1:255 j=0; for i=2:data_size_temp(1,1) if data_lowsubVt_dirswc(i,3) > hex_1na then j=j+1; end if pwt_lowsubVt_dirswc(k,1) > data_lowsubVt_dirswc(i,3) then pwt_lowsubVt_dirswc(k,2)=max(0,(j+offset)/2); end end mputl('0x'+string(sprintf('%4.4x', pwt_lowsubVt_dirswc(k,2))),fd_w); end mclose(fd_w); scf(41);clf(41); plot2d("nl", data_lowsubVt_swc(:,2), data_lowsubVt_swc(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; plot2d("nl", data_lowsubVt_ota(:,2), data_lowsubVt_ota(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 2;p.children.line_mode = 'off'; plot2d("nl", data_lowsubVt_otaref(:,2), data_lowsubVt_otaref(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 3;p.children.line_mode = 'off'; plot2d("nl", data_lowsubVt_mite(:,2), data_lowsubVt_mite(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 4;p.children.line_mode = 'off'; plot2d("nl", data_lowsubVt_dirswc(:,2), data_lowsubVt_dirswc(:,5));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 5;p.children.line_mode = 'off'; xtitle("","time [s]", "Id [A]"); legend("lowsubVt_swc","lowsubVt_ota","lowsubVt_otaref","lowsubVt_mite","lowsubVt_dirswc","in_lower_right"); a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-12;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04; //a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-12;a.data_bounds(2,1)=0.001;a.data_bounds(2,2)=1D-04; scf(42);clf(42); data_size_temp=size(data_lowsubVt_swc);plot2d("nn", data_lowsubVt_swc(1:data_size_temp(1,1)-1,3), data_lowsubVt_swc(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 1;p.children.line_mode = 'off'; data_size_temp=size(data_lowsubVt_ota);plot2d("nn", data_lowsubVt_ota(1:data_size_temp(1,1)-1,3), data_lowsubVt_ota(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 2;p.children.line_mode = 'off'; data_size_temp=size(data_lowsubVt_otaref);plot2d("nn", data_lowsubVt_otaref(1:data_size_temp(1,1)-1,3), data_lowsubVt_otaref(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 3;p.children.line_mode = 'off'; data_size_temp=size(data_lowsubVt_dirswc);plot2d("nn", data_lowsubVt_dirswc(1:data_size_temp(1,1)-1,3), data_lowsubVt_dirswc(2:data_size_temp(1,1),3));p = get("hdl"); p.children.mark_style = 9; p.children.mark_foreground = 5;p.children.line_mode = 'off'; xtitle("","hex_start", "hex_end"); legend("lowsubVt_swc","lowsubVt_ota","lowsubVt_otaref","lowsubVt_dirswc","in_lower_right"); //a=gca();a.data_bounds(1,1)=0;a.data_bounds(1,2)=1D-12;a.data_bounds(2,1)=a.data_bounds(2,1);a.data_bounds(2,2)=1D-04;
07b6eb37ea30cb95240ece3b5ca4b332292f380d
d976bbc11c40569df55ffeebaa44336b1aebb02b
/conditionStabilite.sce
6d011a155c3115484209424be7b14f5fdb16afed
[]
no_license
jonathanVisbecq/Projet-MODAL-SNA
212271eb7c47164b32b26823c629ad5f44c8230b
596e0052536cfe4522371bbd6de0ca0c37ba2f4d
refs/heads/master
2021-01-02T09:27:42.502076
2013-06-19T16:30:39
2013-06-19T16:30:39
null
0
0
null
null
null
null
ISO-8859-1
Scilab
false
false
849
sce
conditionStabilite.sce
//------------------------------------------------------------------------------ // Détermination d'un critère de stabilité du processus par méthode graphique //------------------------------------------------------------------------------ // Paramètres lambdaMin = 0.4 lambdaMax = 0.5 step = 0.02 mu = 0.5 tmax = 4000 nbSimulations = 200 // Calcul de l'espérance de l'encombrement en fonction du temps t = linspace(0, tmax, tmax/5) E = [] for lambda=lambdaMin:step:lambdaMax E = [E; esperanceEncombrement(lambda, mu, t, nbSimulations)] end // Affichage T = ones(length(lambda), 1)*t plot2d(T', E') str = "lambda = " leg = [] for i=lambdaMin:step:lambdaMax leg = [leg, str + string(i)] end legend(leg) // Coefficiens de regression lineaire avec le temps de l'esperance de l'encombrement [a, b, sig] = reglin(T(1,:), E) disp(a)
22840443f1231a3bf09732e74c5ef2b255aa3439
449d555969bfd7befe906877abab098c6e63a0e8
/55/CH5/EX5.5/5ex5.sci
87212c52b634d9b3755d18101d4c4d6bcc7ca782
[]
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
180
sci
5ex5.sci
A=[1,-2,3;0,4,5]; B=[4,6,8;1,-3,-7]; k=A+B; disp(k,'The addition of the two matrices A and B is:') m=3*A; disp(m,'The multiplication of a vector with a scalar is:') p=2*A-3*B
0b96bcb308509806f1c743181facf12dd28a3e56
74084a1c6ef810ee05785941963c7dc1725783cf
/test/UR4.prev.tst
764eac7f27f87b51f53e3b6ff7162569ca813312
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gfis/common
338d245dc6a1ef093748fa577129ac30822ec70b
da1e36931decdbdfe201d88207d5a01c207f8c5a
refs/heads/master
2022-03-21T14:56:42.582874
2022-02-07T10:39:22
2022-02-07T10:39:22
59,970,966
0
0
null
null
null
null
UTF-8
Scilab
false
false
723
tst
UR4.prev.tst
<?xml version="1.0" encoding="UTF-8"?> <!-- @(#) $Id: index.html 113 yyyy-mm-dd hh:mm:ssZ gfis $ Copyright (c) 2016 Dr. Georg Fischer 2016-09-03: redirect immediately to the servlet --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8" /> <meta name="robots" content="noindex, nofollow" /> <link rel="stylesheet" type="text/css" href="stylesheet.css" /> <title>Common index</title> <meta http-equiv="refresh" content="0; URL=/common/servlet?view=index" /> </head> <body> </body> </html>