blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 6 214 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 6 87 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 15 values | visit_date timestamp[us]date 2016-08-04 09:00:04 2023-09-05 17:18:33 | revision_date timestamp[us]date 1998-12-11 00:15:10 2023-09-02 05:42:40 | committer_date timestamp[us]date 2005-04-26 09:58:02 2023-09-02 05:42:40 | github_id int64 436k 586M ⌀ | star_events_count int64 0 12.3k | fork_events_count int64 0 6.3k | gha_license_id stringclasses 7 values | gha_event_created_at timestamp[us]date 2012-11-16 11:45:07 2023-09-14 20:45:37 ⌀ | gha_created_at timestamp[us]date 2010-03-22 23:34:58 2023-01-07 03:47:44 ⌀ | gha_language stringclasses 36 values | src_encoding stringclasses 17 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 1 class | length_bytes int64 5 10.4M | extension stringclasses 15 values | filename stringlengths 2 96 | content stringlengths 5 10.4M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71288197fe775ea4dc5b92de84cb52ba575e8d90 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3751/CH11/EX11.5/Ex11_5.sce | f927b863d889183e6ab88c77ab50bdeea66a6571 | [] | 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 | 941 | sce | Ex11_5.sce | //Fluid Systems - By - Shiv Kumar
//Chapter 11- Centrifugal Pumps
//Example 11.5
//To Find the Discharge of Pump.
clc
clear
//Given Data:-
Hm=14.5; //Manometric Head, m
N=1000; //Speed, rpm
beta_o=30; //Vane Angle at outlet, degrees
Do=300; //Outer Diameter of the Impeller, mm
bo=50; //Width at Outlet, mm
eta_man=95/100; //Manometric Efficiency
//Data Used:-
g=9.81; //Acceleration due to gravity, m/s^2
//Computations:-
Do=Do/1000; //m
bo=bo/1000; //m
uo=%pi*Do*N/60; //m/s
Vwo=g*Hm/(uo*eta_man); //m/s
Vfo=tand(beta_o)*(uo-Vwo); //m/s
Q=%pi*Do*bo*Vfo*1000; //Discharge, litres/s
//Results:-
printf("The Discharge of the Pump=%.2f litres/s\n",Q) //The answer vary due to round off error
|
18650db4c57cd42b731505865f65b88876e638bc | 364f7d17c4f024c39c47c99bda284bacb913d470 | /macros/DCT.sci | 5370a65d6480a7cccc5ed4b8052445df9ace4c6d | [] | no_license | msharsha/FOSSEE-Image-Processing-Toolbox | 6ce7bafc187b99b9e01d1eedcc09a11c3a80370d | f8b16bc3329f9186a3b362f29d9a40d20b48cfd4 | refs/heads/master | 2020-12-02T07:55:57.553927 | 2017-07-10T07:41:21 | 2017-07-10T07:41:21 | 96,747,260 | 0 | 0 | null | 2017-07-10T07:14:37 | 2017-07-10T07:14:37 | null | UTF-8 | Scilab | false | false | 1,084 | sci | DCT.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: Deepshikha
// Organization: FOSSEE, IIT Bombay
// Email: toolbox@scilab.in
function [dstImg] = DCT(srcImg)
//Performs forward Discrete Cosine Transform of the 1D or 2D array.
//
//Calling Sequence
//dstMat = DCT(srcMat)
//
//Parameters
//srcMat : 1D or 2D floating type array
//dstMat : The output matrix
//
//Description
//dstMat = DCT(srcMat)
//Returns the DCT of the input matrix.
//
//Examples
//srcMat = [230.3 23.1 432.5; 321 543.1 89.5]
//dstMAt = DCT(srcMat)
//disp(dstMAt)
//Authors
// Deepshikha
srcMat = mattolist(srcImg)
output = raw_DCT(srcMat)
channels = size(output)
for i = 1:channels // for i channel image
dstImg(:,:,i) = output(i)
end
endfunction |
ef9e90519d8e6742f6bc2f909f7449e53d0ebe14 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2510/CH12/EX12.6/Ex12_6.sce | 333baca4f41cddc3ac77f5e1c36b77e95358371d | [] | 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 | 927 | sce | Ex12_6.sce | //Variable declaration:
//From example 12.5:
Re = 73.9 //Reynolds number
mu_l = 2.82*10**-4 //Absolute viscosity of liquid water condensate (kg/m.s)
Pw = 0.2 //Wetted perimeter of rectangular plate (m)
h = 14700.0 //Heat transfer coefficient (W/m^2.K)
T_sat = 100.0 //Saturation temperature (°C)
Ts = 98.0 //Surface temperature (°C)
A = 0.2*0.4 //Heat transfer area of plate (m^2)
//Calculation:
m1 = Re*mu_l/4.0 //Mass flow rate of condensate (kg/m.s)
m = Pw*m1 //Mass flow rate of condensate (kg/s)
Co = (3.038*10**-5)*h //Condensation number
Q = h*A*(T_sat-Ts) //Heat transfer rate (W)
//Result:
printf("1. The mass flow rate of condensate is : %.4f kg/m.s.",m1)
printf("2. The heat transfer rate is : %.2f kW.",Q/10**3)
|
622e61f75653069d744088964eec4c2224a6e40b | 449d555969bfd7befe906877abab098c6e63a0e8 | /29/CH5/EX5.9.5/exa5_9_5.sce | 72c3d35bdbf01c14581da6a79e3c49efa9b0abe1 | [] | 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 | 394 | sce | exa5_9_5.sce | //Caption:calculate_reference_voltage_Vr
//example 5.9.5
//page 102
exec series.sce;
Vt=250//output_voltage
Rf=100//field_winding_resistance
Kg=500//generator_constant
A=2//amplifier
Vf=0.4//fraction_of_output_voltage_compared_with_reference_voltage
a=1/Rf;
b=series(A,a);
c=series(b,Kg);
d=c/.Vf;
disp(d,"Vt/Vr=");
//since Vt=250
Vr=Vt*(1/d);
disp(Vr,"reference_voltage=");
|
71afc16a94eca17401c5560a9c023ed85d0b69ab | 449d555969bfd7befe906877abab098c6e63a0e8 | /2072/CH24/EX24.2/EX24_2.sce | aa3dc7989eb4f6910b0b90765a0a3b3da40e96e5 | [] | 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 | 283 | sce | EX24_2.sce | errcatch(-1,"stop");mode(2);//Chapter 24
clc
//Example 2
//given
n=1.33 //refractive index of soap bubble
lambda=602 //wavelength of light in nm
//for constructive interference we have 2nt=lambda/2
t=lambda/(4*n)
disp(t,"Minimum thickness of soap bubble film in nm is")
|
1326703556007ed924e0d4fad7ef3845d9fe7e2e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2939/CH5/EX5.8/Ex5_8.sce | c5a6136ead3b4ae79da43e3af118ce5f91422142 | [] | 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 | 161 | sce | Ex5_8.sce |
// Ex5_8
clc;
// Given:
Q1=1.2;
M1=14;
m1=4;
// Solution:
E1=Q1*((m1+M1)/M1);
printf("The threshold energy is %f in MeV for O(17) reaction",E1)
|
9871c035230af7506bb863acb3218acae6c560f2 | 4302fa12c0b4bc3a8b7e99ced5933a42c1723b2a | /chris/mail/lang/Vietnamese.tst | 2518bf2959b03164fb65c733baff16d7a625153d | [] | no_license | iknowed/elect | d46dfafbf7258d63f2d92c6dc49a2a5f506753d5 | 39ab38bb195fe984053b976426f63b8c33a47fa8 | refs/heads/master | 2020-03-07T16:12:29.181060 | 2018-03-31T22:25:02 | 2018-03-31T22:25:02 | 127,575,919 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 13,227 | tst | Vietnamese.tst | NUM_AT_HH VOTER_ID NAME_PFX NAME_F NAME_L HOUSE_NUM STREET TYPE APT ZIP
1 815305 MISS ANH TY UNG 480 EDDY ST 506 94109
3 814726 MISS ANNIE LUU 350 TURK ST 402 94102
2 274396 HAH HUNG CHAU 631 OFARRELL ST 1205 94109
1 276653 MR HUNG NGUYEN 111 JONES ST 301 94102
1 133926 MR PAO TCHEN 390 CLEMENTINA ST 503 94103
2 320834 YANG HUA 801 HOWARD ST 818 94103
1 357618 MR TAM CAO 440 VALENCIA ST C204 94103
1 276343 MR THUC PHAN 201 TURK ST 513 94102
1 805961 MIEU LUU 240 JONES ST 310 94102
1 84074 MR VAN DANIEL CHIEM 230 EDDY ST 606 94102
1 283436 TU TAT 460 ELLIS ST 54 94102
2 712569 MR THUA TRAN 335 10TH ST 94103
1 718126 MISS FRANCINE PHAM 300 BEALE ST 201 94105
1 734337 MRS MUI NGO 434 LEAVENWORTH ST 401 94102
5 276467 MRS SANDY TRUONG 201 TURK ST 215 94102
1 517053 MRS PHUNG TRINH 508 LARKIN ST 508 94102
1 723507 DANG NGUYEN 743 POLK ST 305 94109
1 715578 MR MY LONG 555 ELLIS ST 405 94109
2 275811 KIMBERLY NGUYEN 632 HYDE ST 4 94109
1 273070 HUNG LY 601 LEAVENWORTH ST 33 94109
1 274741 MR KEVIN LEE 555 ELLIS ST 206 94109
1 815903 HON DANG 965 GEARY ST 38 94109
4 758509 MRS HOA LU 111 JONES ST 406 94102
1 386869 MR MINH HUYNH 49 TOWNSEND ST 208 94107
1 319193 CRESENCIA JIMENO 133 SHIPLEY ST W504 94107
1 770493 HANG CHAU 411 EDDY ST 1 94109
1 283206 ICH TRAN 535 TAYLOR ST 105 94102
3 711942 MR TRUONG VUONG 111 JONES ST 205 94102
2 794317 MR TAI NGUYEN 249 EDDY ST 502 94102
1 276021 THIEN TRINH 325 LEAVENWORTH ST 1C 94102
1 696838 MICHELLE NGUYEN 765 OFARRELL ST 8 94109
2 284845 MR FRANCIS TRAN 347 EDDY ST 207 94102
1 284748 MISS JEANNIE NGUYEN 741 ELLIS ST 8 94109
1 69115 MS LYNNE HO 225 JONES ST 2 94102
1 786571 MS SIBELLE NGUYEN 1390 MARKET ST 1818 94102
1 762927 SU HUYNH 308 EDDY ST 303 94102
1 276525 CHUONG POWERS 111 JONES ST 94102
1 822908 MARIA WEIGEL 550 S VAN NESS AVE 101 94110
1 786060 MR JAMES CHAN 80 SYCAMORE ST 94110
1 273179 LOC NGUYEN 746 GEARY ST 206 94109
1 275245 MRS SUSAN HUANG 359 HYDE ST 307 94109
1 283362 DAU DUONG 460 ELLIS ST 38 94102
1 288411 MR PHILLIP PETRASANTA 54 MCALLISTER ST 211 94102
1 364280 MR BRUCE NGUYEN 2135 MISSION ST 45 94110
1 724898 MR VING NGUYEN 565 ELLIS ST 4 94109
2 721871 MR HARRY YANG 555 ELLIS ST 305 94109
1 816895 SANG TRAN 555 ELLIS ST 308 94109
1 354579 MR PHU LE 320 CLEMENTINA ST 610 94103
1 321757 MR KENNETH ONG 22 S PARK ST 306 94107
1 282853 MR MICHAEL QUAN 585 GEARY ST 604 94102
1 821118 MRS MONGLAN NGUYEN 145 TAYLOR ST 204 94102-2875
1 361351 MR KENNETH VUONG 50 SYCAMORE ST B 94110
2 801524 HOAN NGO 601 LEAVENWORTH ST 21 94109
1 202590 MR WILLIAM NGUYEN 525 OFARRELL ST 403 94102
1 784688 MR THANH NGUYEN 145 TAYLOR ST 204 94102
1 361337 MR PAO CHIU 1081 NATOMA ST 94103-2550
1 251005 MRS HATTY ONG 1280 LAGUNA ST 6G 94115
1 284112 THANH THAI 350 ELLIS ST 5A 94102
1 720658 MRS CINDY TRIEU 680 MISSION ST 11M 94105
1 71203 MS CYNTHIA MACH 888 OFARRELL ST 94109
2 274770 MR KIEM LU 631 OFARRELL ST 316 94109
1 738831 MISS DIANA SAM 601 VAN NESS AVE 1042 94102
2 276508 HONG TRUONG 111 JONES ST 402 94102
1 823647 MR TUAN KHIEU 440 VALENCIA ST D401 94103
3 267606 ANN LAM 1003 POST ST 9 94109
1 769618 MR TAN HUYNH 575 EDDY ST 408 94109
1 816333 YEN TO 380 CLEMENTINA ST 1106 94103
1 761590 MS KIM NGO 356 12TH ST 201 94103-4347
1 265395 MR NAM DANG 421 TURK ST 405 94102
1 818229 MRS MUI LOC 111 JONES ST 701 94102-3934
1 81879 MS SERENA DANG 421 LEAVENWORTH ST 46 94102
1 670571 MS SUZAN TRAN 711 EDDY ST 1K 94109
1 714939 MR STEPHEN NGUYEN 434 LEAVENWORTH ST 505B 94102
2 274694 MISS JENNY TRAN 1180 HOWARD ST 311 94103
1 818637 MS LUCY SY 3214 18TH ST 94110
1 739733 MR BINH TRAN 1003 POST ST 3 94109
1 268925 QUYEN VUONG 735 ELLIS ST 12 94109
1 386913 MR BEN TRAN 10 KING ST 314 94107
1 695343 MR HENRY LAMB 709 GEARY ST 405 94109
1 778996 MS HUE LE 245 14TH ST 94103
1 283643 MISS SERENA BANH 515 OFARRELL ST 52 94102
3 267636 MR DU QUANG 1003 POST ST 7 94109
1 285004 QUYEN THACH 248 TAYLOR ST #302 94102
1 282766 MR DU TA 555 JONES ST 301 94102
1 124695 MISS CHRISTINE BUI 877 BRYANT ST 200 94103
1 273587 TONY QUACH 375 EDDY ST 29 94102
1 778953 MS MUOI HUYNH 375 EDDY ST 26 94102
1 756880 MR MARIO VUONG 545 OFARRELL ST 216 94102
1 705476 HUE LUONG 146 MCALLISTER ST 404 94102
1 769504 MR DAVID LAM 359 HYDE ST 603 94109
2 702489 MRS KIEM TRUONG 800 THE EMBARCADERO 232 94107
2 705535 MR CONG TRAN 479 NATOMA ST 404 94103
1 315518 FELIX CHAU 1101 HOWARD ST 507 94103
1 688499 MR KHUONG DAM 441 ELLIS ST 307 94102
1 321064 MS NANCY LAM 540 DELANCEY ST 201 94107
1 315944 MR DUC LY 1101 HOWARD ST 513 94103
1 688962 MS HOA LY 425 HYDE ST 53 94109
1 670388 MR MINH HUYNH 308 EDDY ST 611 94102
1 283617 SUSAN TRUONG 460 ELLIS ST 37 94102
1 199583 MRS CINDY LUC 480 EDDY ST 608 94109-8146
1 284879 CHARLIE DANG 340 EDDY ST 604 94102
1 669851 MR JACKSON CHIEN 801 HOWARD ST 816 94103
1 821576 MRS DUNG NGUYEN 601 LEAVENWORTH ST 44 94109
1 737362 DANNY DANG 1036 POLK ST 206 94109
1 349515 MR QUANG NGUYEN 1800 BRYANT ST 305 94110
2 75710 MR THANH TRAN 85 CLEARY CT 1 94109
1 10303 KIEN NGUYEN 326 HAYES ST 94102
2 276334 LONG LUU 201 TURK ST 217 94102
1 318876 YEN QUAN 133 SHIPLEY ST W705 94107
1 801827 MR VAN VO 230 EDDY ST 308 94102
1 72729 MR THINH LUU 308 EDDY ST 511 94102
1 319643 MR NGHE HY 321 CLEMENTINA ST 208 94103
1 795277 MS QUYEN LAM 248 TAYLOR ST 201 94102
1 772946 MR OWEN TRAN 388 TOWNSEND ST 4 94107
2 274030 MRS SALLY NGO 721 GEARY ST 24 94109
3 714760 MRS KATHERINE NGUYEN 1028 HOWARD ST 204 94103
1 771039 MR YAT LEUNG 585 GEARY ST 205 94102
1 199812 MS MUOI TAM DO 441 ELLIS ST 204 94102
2 275476 DIEU LY 430 TURK ST 500 94102
1 359472 MR THANH AU 2911 16TH ST 205 94103
2 275289 PHU MONG 575 EDDY ST 606 94109
1 758528 MRS JANA TRAN 111 JONES ST 816 94102
1 238335 MR TAI NGUYEN 1100 EDDY ST G 94109
1 705614 MR TAM NGUYEN 165 TURK ST 403 94102
1 765860 JOSON NICHOLAS LEE 350 TURK ST 302 94102
1 755051 MR DANNY LIEU 555 ELLIS ST 401 94109
3 709349 MS LIEN TRAN 375 EDDY ST 35 94102
1 340485 MR PHILLIP TRAN 118 CLINTON PARK 94103
1 669210 MINH VUONG 240 JONES ST 211 94102
1 358834 MR EDWARD MA 1930 MISSION ST 105 94103
1 284838 SAM SAN 201 TURK ST 219 94102
1 802439 MR THU TRUONG 21 COLUMBIA SQUARE ST 410 94103
1 291263 MR RYAN NGUYEN 855 FOLSOM ST 728 94107
3 276339 SHERINE TA 201 TURK ST 721 94102
1 428123 MR JACK FUNG 355 EDDY ST 207 94102
1 312861 MR KEVIN CHIEN 500 BRYANT ST 204 94107
1 284802 TAI THAI 375 EDDY ST 47 94102
1 275776 MR DAVID HOANG 255 LEAVENWORTH ST 1 94102
1 306618 MS CAMILLE ARRIETA 265 FELL ST 606 94102
1 283587 THANH HUYNH 201 TURK ST 825 94102
1 695371 MS KIMBERLY TRAN 536 LEAVENWORTH ST 66 94109
1 283498 ROGER VUONG 395 EDDY ST 1 94102
1 276022 MRS NHU HOA NGUYEN 325 LEAVENWORTH ST 1A 94102
1 781202 SHARON LAM 199 NEW MONTGOMERY ST 608 94105
1 282662 MR KIM TRAN 685 GEARY ST 204 94102
1 274408 MR MICHAEL YIP 775 OFARRELL ST 5 94109
1 276259 QUAN DAM 480 EDDY ST 210 94109
1 317655 MR SRUC TRUONG 587 NATOMA ST 101 94103
1 102366 JAMES HANG 1655 MISSION ST 640 94103
2 274995 MS ELIZABETH DUONG 575 EDDY ST 508 94109
2 274790 MR TONY MACH 722 LARKIN ST 3 94109
1 706835 MRS GINA TRAN 205 JONES ST 410 94102
1 774688 MR VANDY SIVONGSAY 526 ELLIS ST 34 94109
3 386848 TRAN THACH 49 TOWNSEND ST 110 94107
1 829064 NAM VO 308 EDDY ST 312 94102
1 322305 MS PHUONG LE 300 3RD ST 519 94107
1 273941 JOHN HUYNH 721 GEARY ST 27 94109
1 283645 MR TOM TRUONG 460 ELLIS ST 16 94102
2 282104 MR UNG CAO 120 ELLIS ST 106 94102
1 584172 MR DUC TRUNG TA 375 EDDY ST 67 94102
1 274062 CUONG LU 535 LEAVENWORTH ST 55 94109
1 284719 THAP TA 741 ELLIS ST 3 94109
1 274675 THINH VU 666 ELLIS ST 502 94109
1 800394 MRS HUONG NGUYEN 321 CLEMENTINA ST 911 94103
1 276608 VAN DANG 111 JONES ST 404 94102
3 772791 MRS XUAN NGUYEN 735 ELLIS ST 11 94109
1 792115 MISS MY LINH NGUYEN 555 ELLIS ST 300 94109
1 726803 MR THAI PHAM 440 VALENCIA ST D404 94103
1 285080 MR HOANH LE 230 EDDY ST 512 94102
1 775968 MISS TRAN UNG 575 EDDY ST 94109
3 274973 MR MINGO NGUYEN 555 EDDY ST 24 94109
2 755652 MR STEVE DANG 800 THE EMBARCADERO 334 94107
4 274732 MR DAN TRAN 1101 HOWARD ST 313 94103
1 802283 MRS HON BUI 308 EDDY ST 704 94102
1 317544 MRS NGAN DINH 1028 HOWARD ST 502 94103
3 317455 SIU VUONG 1028 HOWARD ST 210 94103
1 695704 LARRY GOPPERT 1221 HARRISON ST 27 94103-4450
1 504450 MS MAI ANH NGUYEN 239 8TH ST 10 94103
1 821152 MR CAT DUONG 145 GUERRERO ST 213 94103
1 319226 MRS MUOI HUYNH 133 SHIPLEY ST E713 94107
1 72651 LAN DUONG 54 MCALLISTER ST 604 94102
1 712331 MR THANH TRAN 525 OFARRELL ST 201 94102
3 274621 MR THANH LE 725 OFARRELL ST 46 94109
1 274278 TRINH QUACH 725 OFARRELL ST 6 94109
1 751627 MRS HONG PHUC NGUYEN 441 ELLIS ST 211 94102
2 740598 MR DO NGUYEN 1101 HOWARD ST 209 94103
1 781787 MR ANDREW LEUNG 1051 POST ST 3 94109
1 274581 MR VAN NGUYEN 624 ELLIS ST 6 94109
1 282552 MR DAVID TRAC 516 OFARRELL ST 506 94102
1 283495 THANH LAM 450 ELLIS ST 501 94102
1 275483 MR SAM TANG 395 EDDY ST 3 94102
1 820837 DUNG NGUYEN 300 HYDE ST 31 94109
3 35767 DUNG HOANG 350 ELLIS ST 6E 94102-2702
1 296514 MR PAUL LE 885 FRANKLIN ST 207 94102
1 715626 MR KENH HAU 555 ELLIS ST 202 94109
1 687530 MRS PAMELA CHAO 620 S VAN NESS AVE 1 94110
1 276061 MISS LAN LAM 249 EDDY ST 309 94102
1 60703 MRS JULIE DUE 1280 LAGUNA ST 94115
1 705607 PHILLIP HO 980 HOWARD ST 301 94103
1 276278 SINH LUU 711 EDDY ST 1A 94109
1 252713 MS DANIELLE ALBANO 1150 FOLSOM ST 5 94103-3970
1 275139 STEVEN NGUYEN 530 LARKIN ST 210 94102
1 804948 MRS YEM QUACH 201 TURK ST 809 94102
1 284450 MR CHINH PHAM 223 JONES ST 94102
2 268277 MRS ELLEN LUU 965 GEARY ST 48 94109
1 238856 MR KHINH CHAC 1030 FRANKLIN ST 402 94109
4 237950 MR BRIAN LAI 66 CLEARY CT 108 94109
1 284870 MR TY NGO 308 EDDY ST 501 94102
1 264901 GEE SAM 330 CLEMENTINA ST 821 94103
1 273460 MR HA VUONG 746 GEARY ST 303 94109
1 268098 MR JOE LEUNG 1051 POST ST 2 94109
2 735552 MR JOHNNY LA 980 HOWARD ST 203 94103
1 273513 MR YOUNG WONG 746 GEARY ST 406 94109
2 284506 MRS JENNY UNG 340 EDDY ST 508 94102
2 283031 MRS CHRISTINE TRAN 501 TAYLOR ST 309 94102
1 273297 MR TONY TRAN 851 POST ST 94109
1 273762 JASON LY 721 GEARY ST 1 94109
1 361768 JIMMY TRAN 21 SYCAMORE ST 94110
2 276284 MR HOA BANH 441 ELLIS ST 408 94102
1 783597 MR PAUL HOA 485 TEHAMA ST 3 94103
1 744373 MR KIEN TRAN 535 EDDY ST 94109
1 740547 MR MITCHELL YOUNG 555 HYDE ST 1 94109
1 267647 LIZA DAMIANI 970 GEARY ST 52 94109
1 800102 MR THANH NGUYEN 201 TURK ST 301 94102
1 799801 MISS DAKHAM SOUVANNARATH 526 ELLIS ST 21 94109
1 319813 MISS SAY THAI 50 RIZAL ST 313 94107
1 775132 MRS QUY HO 111 JONES ST 201 94102
1 276481 MR PAUL LUU 631 OFARRELL ST 1904 94109
1 786339 MS PRISCILLA TRAN 725 OFARRELL ST 23 94109
1 275434 TAMMY BUI 530 LARKIN ST 303 94102
1 816677 MRS PHU DANG 448 LARKIN ST 94102
2 287203 MR HAROLD TAT 479 NATOMA ST 306 94103
1 679970 MS THU HA VU 62 SYCAMORE ST A 94110
1 728940 CHRIS WU 333 1ST ST N603 94105
1 681622 MR MICHAEL PHAM 590 6TH ST 304 94103
1 274854 QUE DANG 530 LARKIN ST 110 94102
1 721410 MRS CHAU KOLTUN 62 PEARL ST 94103
1 238360 MRS HOANG NGUYEN 1100 EDDY ST 94109
2 275845 MR HUU LUU 350 TURK ST 409 94102
1 284106 NAPOLEON SAU 350 ELLIS ST 10E 94102
1 272115 MR TUONG TRINH 421 TURK ST 305 94102-3383
1 269815 MRS BETSY TRAN 54 MCALLISTER ST 701 94102
4 249276 MIKE DUONG 800 THE EMBARCADERO 225 94107
1 283539 JADE TRUONG 450 ELLIS ST 504 94102
1 750366 LAN LU 340 EDDY ST 400 94102
2 275938 SANDI LUU 421 LEAVENWORTH ST 62 94102-6707
1 371079 MR TUYEN NGUYEN 540 ALABAMA ST 212 94110
2 283633 THANH TRAN 555 OFARRELL ST 307 94102
1 276226 MS EMILY LY 350 TURK ST T913 94102
1 56599 LUONG THAI 1 BLUXOME ST 405 94107-5522
1 717683 TRAM PHAN 421 TURK ST 602 94102
1 747917 MR EDWARD LOC 350 ELLIS ST 1-A 94102
1 584282 MS LIEU TRAN 737 FOLSOM ST 408 94107
1 104374 MRS NANCY CAM DU 735 ELLIS ST 24 94109
1 274699 MR THOMAS TRAN 604 ELLIS ST 94109
1 280933 GAIL HUYNH 1030 FRANKLIN ST 203 94109
1 558706 MR TUONG LU 2616 19TH ST 94110
1 752618 MR THOMAS LIEN 2635 18TH ST 94110
1 284169 MR ALBERT LIEU 375 EDDY ST 49 94102-6645
1 822810 MR DU NGUYEN 880 FRANKLIN ST 202 94102
2 282527 MRS WENDY HONG 565 GEARY ST 604 94102
2 284412 MARILYN PHAM 421 ELLIS ST 206 94102
1 275849 MR JOHNNY LUU 350 TURK ST T404 94102
1 379065 MR TONY LIU 946 GEARY ST 4 94109
1 702562 MRS QUE VUONG 308 EDDY ST 510 94102
1 709057 MS ANH LIEU LEE 441 ELLIS ST 314 94102
1 786409 ANTONY TRAN 380 EDDY ST 349 94102
1 740443 MS NICOLETTE PHAN 400 BEALE ST 303 94105
1 274117 KHOA NGUYEN 705 GEARY ST 94109
1 576303 TAI TRANG 3375 17TH ST 201 94110
1 666770 MR DAO HO 345 HYDE ST 2 94109
1 689234 MS TAI LY 200 VAN NESS AVE 102 94102
1 698313 MR LIN KIT CHAU 241 6TH ST 307 94103
1 804550 MISS QUYNH NGUYEN 519 ELLIS ST 410 94109
2 276249 KHINH GUE THI 411 EDDY ST 22 94109
3 363987 MS DEBBIE PHAN 255 CAPP ST 94110
1 801485 MR ANH DO 242 POWELL ST 308 94102
1 804356 MR JOHN TRAN 340 EDDY ST 504 94102
1 780461 MR GIAO PHAN 855 FOLSOM ST 937 94107
|
302e343f6dc7a8c4902d5c6a9d407eabbbf5de0d | 449d555969bfd7befe906877abab098c6e63a0e8 | /1238/CH3/EX3.1/1.sce | 18936117b8aed8fc1bf71caaeb0fb7009af5c1e8 | [] | 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 | 636 | sce | 1.sce | //finding required data//
//example 1//
clc
//clears the command window//
clear
//clears//
//finding time constant and time for capacitor to charge 90% of supplied voltage//
R=10^6 ;//resistance in ohms//
C=10^-5 ;//capacitance in farads//
T=R*C
printf('the time constant=%f seconds\n',T)
//time constant is found out//
v=90/100*10;//v=voltage at time t//
V=10;//voltage in volts//
//t=required time//
disp('from the formula v=V*(1-exp(-t/(R*C))),we get the required time as:')
t=-((R*C)*log(1-(v/V)))
printf('required time to charge to 90 percent of the supplied voltage=%f seconds',t)
//the result is t seconds//
|
8f27f20cf808a5438eee06df7b47f4cc1b02c913 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1931/CH15/EX15.1/1.sce | 81fe90e230cbcec8a16ec5a7111c1f40c34a0157 | [] | 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 | 422 | sce | 1.sce | clc
clear
//INPUT DATA
t=0.1*10^-2//thickness of piezo electric crystal in m
E=80*10^9//Young's modulus of crystal in pa
d=2654//density of material of crystal in Kgm^-3
//CALCULATION
f=(1/(2*t)*sqrt(E/d))/10^6//The frequency to which a piezo electric oscillator circuit should be turned in Hz
//OUTPUT
printf('The frequency to which a piezo electric oscillator circuit should be turned is %3.4f*10^6 Hz',f)
|
f2c456034a170f554d2e017d4f5741337ac52d89 | cb8badb7b62f46da3dd1b582c4186b5b2829d5af | /ajax-scilab/scifunc-cleandata-do_spline.sci | cfc2894ea960d8aadcc1942cd2746a60a36cc99f | [
"MIT"
] | permissive | FOSSEE/xcos_on_cloud | e3cf7ff202a1628a875484774c87936fbd8696cf | e981d77e0c96ab5db0e01755a2531d878864266f | refs/heads/master | 2023-05-12T12:12:08.955522 | 2023-02-16T10:25:15 | 2023-02-16T10:25:15 | 99,215,141 | 12 | 31 | MIT | 2023-05-02T00:18:57 | 2017-08-03T09:24:23 | JavaScript | UTF-8 | Scilab | false | false | 3,503 | sci | scifunc-cleandata-do_spline.sci | function callFunctioncleandata(filename,xye)
f_temp = mopen(filename, 'wt'); // Creating a text file
xye_split = strsplit(xye,';'); //split string for ';'
ary_size = size(xye_split); // get size of array which will be 6 1
n = ary_size(1); // retrive only size of element ie. 6
arry_xye = [];
for i = 1:n
comma_split = strsplit(xye_split(i),',');//split string for ','
comma_ary_size = size(comma_split); // get size of array which will be 6 1
m = comma_ary_size(1);
for j = 1:m
arry_xye(i)(j) = strtod(comma_split(j)); //convert string to double and add to array
end
end
[xy] = cleandata([arry_xye]); //pass new array to cleandata and save return value in xy
[m,n] = size(xy) // reading the size of variable
mfprintf(f_temp, '[[');
for y = 1:m // no. of rows in variables
for z = 1:n //no. of columns in variabes
if z == n then
mfprintf(f_temp, '%g', xy(y,z)); //Print the variable values
else
mfprintf(f_temp, '%g,', xy(y,z)); //Print the variable values
end
end
if y ~= m then
mfprintf(f_temp, '],[')
end
end
mfprintf(f_temp, ']]');
mclose(f_temp)
endfunction
function callFunction_do_Spline(filename,N,order,x,y)
f_temp = mopen(filename, 'wt'); // Creating a text file
if ((strindex(x,",")) ~= []) then // if x value is array (0,0) or single value 0
x_split = strsplit(x,','); //split string for ','
x_size = size(x_split); // get size of array
n = x_size(1); // retrive size
x = [];
for i = 1:n
x(1)(i) = strtod(x_split(i)); //convert string to double and add to array
end
else
x = strtod(x); // in case x is single value 0 convert it into double
end
if ((strindex(y,",")) ~= []) then // if y value is array (0,0) or single value 0
y_split = strsplit(y,','); //split string for ','
y_size = size(y_split); // get size of array
n = y_size(1); // retrive size
y = [];
for i = 1:n
y(1)(i) = strtod(y_split(i)); //convert string to double and add to array
end
else
y = strtod(y); // in case y is single value 0 convert it into double
end
[Xdummy,Ydummy,orpar] = Do_Spline(strtod(N),strtod(order),x,y); //pass new array to do_spline and save return value in [Xdummy,Ydummy,orpar]
Do_Spline_write(Xdummy,Ydummy,orpar,f_temp);
mclose(f_temp)
endfunction
function Do_Spline_write(Xdummy,Ydummy,orpar,f_temp)
mfprintf(f_temp, '{');
mfprintf(f_temp, '""Xdummy"":[');
for i = 1:length(Xdummy)
if (i == length(Xdummy)) then
mfprintf(f_temp, '%f', Xdummy(i));
else
mfprintf(f_temp, '%f,', Xdummy(i));
end
end
mfprintf(f_temp, ']');
mfprintf(f_temp, ',""Ydummy"":[');
for i = 1:length(Ydummy)
if (i == length(Ydummy)) then
mfprintf(f_temp, '%f', Ydummy(i));
else
mfprintf(f_temp, '%f,', Ydummy(i));
end
end
mfprintf(f_temp, ']');
mfprintf(f_temp, ',""orpar"":[');
for i = 1:length(orpar)
if (i == length(orpar)) then
mfprintf(f_temp, '%d', orpar(i));
else
mfprintf(f_temp, '%d,', orpar(i));
end
end
mfprintf(f_temp, ']');
mfprintf(f_temp, '}');
endfunction
|
6c82130e3e570d366fb710a0ee7d168b15db6475 | 449d555969bfd7befe906877abab098c6e63a0e8 | /752/CH4/EX4.13.1/4_13_1.sce | 6ce520017899d0d0bf2c962d5a183494c0686e83 | [] | 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 | 286 | sce | 4_13_1.sce | clc;
// page no 139
// prob no 4_13_1
//Noise fig. of an amplifier is 7 dB with input SNR=35 dB
SNRin=35;//SNR at i/p of amplifier
F=7;//Noise figure of an amplifier
//Determination of output SNR
SNRout=SNRin-F;
disp('dB',SNRout,'The value of output signal to noise ratio is '); |
9b70f7d8b4860996e7489b71e0dc585e6a3c431f | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.5/Unix-Windows/scilab-2.5/macros/percent/%b_i_sp.sci | e8b95a2d0cf66ba5c3ca149e244b095e3663bcaa | [
"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 | 296 | sci | %b_i_sp.sci | function M=%b_i_sp(varargin)
// Copyright INRIA
[lhs,rhs]=argn(0)
M=varargin(rhs)
N=bool2s(varargin(rhs-1))//inserted matrix
if rhs<=4 then
if rhs==3 then
M(varargin(1))=N
else
M(varargin(1),varargin(2))=N
end
else
error('multidimensional sparse matrices are not handled')
end
|
3e192422b29329ac7ae2f982e00557378b16d68b | 717ddeb7e700373742c617a95e25a2376565112c | /116/CH3/EX3.4/exa3_4.sce | eb0c422f7ab919f3c7aa3d5972007f8790d7240c | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 424 | sce | exa3_4.sce | //Caption:Program to calculate how many bits per sample can be saved by using DPCM
//Example 3.4
//Page 128
w=800//Omega=800Hz
//x(t)=A sin(2pi.wt), equation for sine wave with maximum amplitude
//x'(t)=A(2pi).w.cos(2pi.wt), diff w.r.t time
(2*%pi)*800*(1/8000)
//0.62831*a, x'(t)max
disp('savings in the bits per sample can be determined as ')
log2(1/0.628)
//Result
//0.67 bits |
b2cfbe6a1765b9856c7491894f8e85e0a5a5fef4 | 1bb72df9a084fe4f8c0ec39f778282eb52750801 | /test/VM2.prev.tst | 9a4a1821586955cc578baa76864fa2441e5cd096 | [
"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 | 35 | tst | VM2.prev.tst | {a=>-a-1,b=>-b-1,c=>-c-1,d=>-d-1}
|
0ff552a598b89e38881cdd8bda9bc7d856b3c721 | 449d555969bfd7befe906877abab098c6e63a0e8 | /61/CH15/EX15.1/ex15_1.sce | 82cc2e4a1028ed2a7795034ffbd9ad2fd0e5c06d | [] | 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 | 127 | sce | ex15_1.sce | //EX15.1
f0=15*10^3; //center frequency in hertz
BW=1*10^3;
Q=f0/BW;
if Q>10 then
disp(Q,'narrow band filter')
end |
bf534a60ccf69ead3147c382878b71c3df6c3cea | 449d555969bfd7befe906877abab098c6e63a0e8 | /343/CH3/EX3.12/ex3_12.sce | 6f77e720c3cae94b660371a75412cccb17c797d4 | [] | 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 | ex3_12.sce | clc
vl=400 //assigning values to the parameters
t=0
zph=50
vph=vl/sqrt(3)
iph=vph/zph
il=iph
p=sqrt(3)*vl*il*cos(t)
disp("Watts",polar(p),"Power taken is")
iph=4
il=iph
p=vl*il*cos(t)
disp("Watts",polar(p),"Power taken after disconecting one of the resistor is") |
9566be0e6d96e22225b5c156f39db4845ba9edd2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2159/CH7/EX7.11/711.sce | 4179bc0ea78b939ac9a5de0510603e92b5e7c1f7 | [] | 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 | 186 | sce | 711.sce | // problem 7.11
b=1.5
d=0.8
Q=0.75
i=1/2500
A=b*d
P=b+(2*d)
m=A/P
C=Q/(((m*i)^0.5)*A)
z=(157.6/C)-1.81
K=z*(m^0.5)
disp(K,C,"Chezys constant and coefficient of roughness")
|
d2a1026c2ef545f6b0256b27595fd5bd5cafea2d | 449d555969bfd7befe906877abab098c6e63a0e8 | /291/CH7/EX7.7c/eg7_7c.sce | d5c35b84762a3d18cf24a4c74a13829d952c9752 | [] | 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 | 98 | sce | eg7_7c.sce | function result = unbiasedestimator(X, n)
c=(n+2)/(n+1);
result = c*max(X);
endfunction |
d198cbb68fe4c55be0aaf37f764686414ace480e | 449d555969bfd7befe906877abab098c6e63a0e8 | /2219/CH4/EX4.2/Ex4_2.sce | 1acd97fc8c067869ef985c42dd06dba3105fe5d2 | [] | 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 | 516 | sce | Ex4_2.sce | // chapter 4 example 2
//-----------------------------------------------------------------------------
clc;
clear;
// given data
Pi = 10; // Input power in mW
IL = 0.4; // insertion loss in dB
// calculations
// ILdb) = 10log(Pi/Po)
Po = Pi/(10^(IL/10)) // antilog conversion and coupling power
// Output
mprintf('Power available at the straight through port output = %3.3f mW',Po);
//------------------------------------------------------------------------------
|
440d0ab08480448e7fe84a4dc2a82d8ec8756364 | da5b40d917ec2982828bd9bdf06b18b7bf189f26 | /sim/scripts/proptable.tst | c974f193aaa7119aab33ee3425ffee8fa4e2b9b3 | [] | no_license | psy007/NNPC-CHEMICAL-SIM- | 4bddfc1012e0bc60c5ec6307149174bcd04398f9 | 8fb4c90180dc96be66f7ca05a30e59a8735fc072 | refs/heads/master | 2020-04-12T15:37:04.174834 | 2019-02-06T10:10:20 | 2019-02-06T10:10:20 | 162,587,144 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 4,940 | tst | proptable.tst | optimizecode 1
maxversions 0
units Field
/LiquidPhases = 2
/StdLiqVolRefT = 288.15
/StdLiqVolRefT = 60 F
/RecycleDetails = 1
displayproperties
displayproperties VapFrac T P MoleFlow MassFlow VolumeFlow StdLiqVolumeFlow StdGasVolumeFlow Energy H S MolecularWeight MassDensity Cp ThermalConductivity Viscosity molarV ZFactor
commonproperties
commonproperties + ZFactor P T MolecularWeight MassDensity StdLiqMolarVolVapFrac T P MoleFlow MassFlow VolumeFlow StdLiqVolumeFlow StdGasVolumeFlow Energy H S MolecularWeight MassDensity Cp ThermalConductivity Viscosity molarV ZFactor
$VMGThermo = VirtualMaterials.Advanced_Peng-Robinson
/ -> $VMGThermo
/SolidPhases = 0
$VMGThermo + METHANE
$VMGThermo + ETHANE
$VMGThermo + PROPANE
$VMGThermo + n-BUTANE
$VMGThermo + n-PENTANE
$VMGThermo + n-HEXANE
$VMGThermo + n-HEPTANE
$VMGThermo + WATER
$VMGThermo + CARBON_DIOXIDE
/PT1 = Properties.PropertyTable()
'/PT1.In.Fraction' = .1 .1 .2 .1 .1 .1 .1 .1 .1
/PT1.XProperty = PRESSURE
/PT1.XMin = 10
/PT1.XMax = 20
/PT1.XPoints = 4
/PT1.YProperty = TEMPERATURE
/PT1.YMin = 60
/PT1.YMax = 100
/PT1.YPoints = 3
/PT1.Phase = FEED
#One property
/PT1.ZProperty = CP
valueOf /PT1.TableXYZCP.convertedArrayRep
#More than one property
/PT1.ZProperty = CP CV ENTHALPY ENTROPY ZFACTOR
valueOf /PT1.TableXYZCP.convertedArrayRep
valueOf /PT1.TableXYZCV.convertedArrayRep
valueOf /PT1.TableXYZENTHALPY.convertedArrayRep
valueOf /PT1.TableXYZENTROPY.convertedArrayRep
valueOf /PT1.TableXYZZFACTOR.convertedArrayRep
#Change phases
/PT1.Phase = LIQUID
valueOf /PT1.TableXYZCP.convertedArrayRep
valueOf /PT1.TableXYZCV.convertedArrayRep
valueOf /PT1.TableXYZENTHALPY.convertedArrayRep
valueOf /PT1.TableXYZENTROPY.convertedArrayRep
valueOf /PT1.TableXYZZFACTOR.convertedArrayRep
/PT1.Phase = VAPOR
valueOf /PT1.TableXYZCP.convertedArrayRep
valueOf /PT1.TableXYZCV.convertedArrayRep
valueOf /PT1.TableXYZENTHALPY.convertedArrayRep
valueOf /PT1.TableXYZENTROPY.convertedArrayRep
valueOf /PT1.TableXYZZFACTOR.convertedArrayRep
/PT1.Phase = LIQUID2
valueOf /PT1.TableXYZCP.convertedArrayRep
valueOf /PT1.TableXYZCV.convertedArrayRep
valueOf /PT1.TableXYZENTHALPY.convertedArrayRep
valueOf /PT1.TableXYZENTROPY.convertedArrayRep
valueOf /PT1.TableXYZZFACTOR.convertedArrayRep
/PT1.Phase = FEED
valueOf /PT1.TableXYZCP.convertedArrayRep
valueOf /PT1.TableXYZCV.convertedArrayRep
valueOf /PT1.TableXYZENTHALPY.convertedArrayRep
valueOf /PT1.TableXYZENTROPY.convertedArrayRep
valueOf /PT1.TableXYZZFACTOR.convertedArrayRep
#With VF at the end BULK
/PT1.ZProperty = CP CV ENTHALPY ENTROPY ZFACTOR VF
valueOf /PT1.TableXYZCP.convertedArrayRep
valueOf /PT1.TableXYZCV.convertedArrayRep
valueOf /PT1.TableXYZENTHALPY.convertedArrayRep
valueOf /PT1.TableXYZENTROPY.convertedArrayRep
valueOf /PT1.TableXYZZFACTOR.convertedArrayRep
valueOf /PT1.TableXYZVF.convertedArrayRep
#With VF in the middle BULK
/PT1.ZProperty = CP CV ENTHALPY ENTROPY ZFACTOR VF VISCOSITY
valueOf /PT1.TableXYZCP.convertedArrayRep
valueOf /PT1.TableXYZCV.convertedArrayRep
valueOf /PT1.TableXYZENTHALPY.convertedArrayRep
valueOf /PT1.TableXYZENTROPY.convertedArrayRep
valueOf /PT1.TableXYZZFACTOR.convertedArrayRep
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
#With VF at the beginning BULK
/PT1.ZProperty = VF VISCOSITY
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
#Now only VF in all phases
/PT1.ZProperty = VF
/PT1.Phase = VAPOR
valueOf /PT1.TableXYZVF.convertedArrayRep
/PT1.Phase = LIQUID
valueOf /PT1.TableXYZVF.convertedArrayRep
/PT1.Phase = LIQUID2
valueOf /PT1.TableXYZVF.convertedArrayRep
/PT1.Phase = VAPOR
valueOf /PT1.TableXYZVF.convertedArrayRep
#With VF at the beginning all phases
/PT1.ZProperty = VF VISCOSITY
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
/PT1.Phase = LIQUID
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
/PT1.Phase = LIQUID2
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
#With VF in the middle all phases
/PT1.ZProperty = ENTHALPY VF VISCOSITY
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
/PT1.Phase = LIQUID
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
/PT1.Phase = LIQUID2
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
#With VF at the end all phases
/PT1.ZProperty = VISCOSITY VF
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
/PT1.Phase = LIQUID
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
/PT1.Phase = LIQUID2
valueOf /PT1.TableXYZVF.convertedArrayRep
valueOf /PT1.TableXYZVISCOSITY.convertedArrayRep
copy /PT1
paste /
valueOf /PT1Clone.TableXYZVISCOSITY.convertedArrayRep |
4cac501e81d787b53e71e02f6f0db65f92ce6020 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1226/CH20/EX20.26/EX20_26.sce | 67e6dbb486189b9d993955659cf76442c883946d | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 2,160 | sce | EX20_26.sce | clc;funcprot(0);//EXAMPLE 20.26
// Initialisation of Variables
p1=1;............//Intake pressure in bar
p2=4;..............//Pressure after first stage in bar
p3=16;............//Final pressure in bar
ns=2;............//No of stages
t1=300;............//Intake temperature in K
n=1.3;............//Compression index
klp=0.04;.........//Clearance ratio for low pressure cylinder
khp=0.06;........//Clearance ratio for high pressure cylinder
N=440;............//Engine rpm
R=0.287;..........//Gas constant in kJ/kgK
m=10.5;.............//Mass of air delivered in kg/min
cp=1.005;.........//Specific heat at constant pressure in kJ/kgK
//Calculations
rp=sqrt(p1*p3);...........//Pressure ratio per stage
P=((ns*n)/(n-1))*R*t1*(m/60)*(((p3/p1)^((n-1)/(ns*n)))-1);..........//Work done per min in Nm
disp(P,"Power required in kW:")
isoWd=(m/60)*R*t1*log(p3/p1);..........//Isothermal work done in Nm
disp(isoWd,"Isothermal work done in kW:")
etaiso=isoWd/P;...............//Isothermal efficiency
disp(etaiso*100,"Isothermal efficiency in %:")
FAD=(m*R*t1*1000)/(p1*10^5);.............//Free air delivered in m^3/min
disp(FAD,"Free air delivered in m^3/min:")
t2=t1*((p2/p1)^((n-1)/n));.....//Temperature at the end of compression in K
Qt=(m/60)*cp*(t2-t1);..............//Heat transferred in intercooler in kW
disp(Qt,"Heat transferred in intercooler in kW:")
etavlp=(1+klp)-(klp*((p2/p1)^(1/n)));..........//Volumetric efficiency of low pressure stage
etavhp=(1+khp)-(khp*((p2/p1)^(1/n)));..........//Volumetric efficiency of high pressure stage
vslp=FAD/(N*etavlp);......//Swept volume for low pressure stage in m^3
vclp=klp*vslp;..............//Clearance volume for low pressure stage in m^3
printf("\nSwept volume for low pressure stage in m^3: %f\n",vslp)
printf("\nClearance volume for low pressure stage in m^3: %f\n",vclp)
vshp=FAD/(N*rp*etavhp);......//Swept volume for high pressure stage in m^3
vchp=khp*vshp;..............//Clearance volume for high pressure stage in m^3
printf("\nSwept volume for high pressure stage in m^3: %f\n",vshp)
printf("\nClearance volume for high pressure stage in m^3: %f\n",vchp)
|
9ee78c7f6cb43ae01226ee9282b17887275f7960 | bdbafbcce90eb6b9aa54964c32057b8117961b58 | /Wolfe_Skel.sci | fdb5b33035cd7b91067e217268fd2fd1e825eee7 | [] | no_license | Rachine/Tp_Optim | 617191c586b46d8d44fc1bd24b24e3d3b760c851 | 68cabcb55cd4f343796d6f0f3823e4aa03edbe25 | refs/heads/master | 2016-09-05T09:23:21.650931 | 2015-05-10T20:37:58 | 2015-05-10T20:37:58 | 34,060,544 | 2 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 3,232 | sci | Wolfe_Skel.sci | function [alphan,ok]=Wolfe(alpha,x,D,Oracle)
//////////////////////////////////////////////////////////////
// //
// RECHERCHE LINEAIRE SUIVANT LES CONDITIONS DE WOLFE //
// //
// //
// Arguments en entree //
// ------------------- //
// alpha : valeur initiale du pas //
// x : valeur initiale des variables //
// D : direction de descente //
// Oracle : nom de la fonction Oracle //
// //
// Arguments en sortie //
// ------------------- //
// alphan : valeur du pas apres recherche lineaire //
// ok : indicateur de reussite de la recherche //
// = 1 : conditions de Wolfe verifiees //
// = 2 : indistinguabilite des iteres //
// //
// //
// omega1 : coefficient pour la 1-ere condition de Wolfe //
// omega2 : coefficient pour la 2-eme condition de Wolfe //
// //
//////////////////////////////////////////////////////////////
// -------------------------------------
// Coefficients de la recherche lineaire
// -------------------------------------
omega1 = 0.1;
omega2 = 0.9;
alphamin = 0.0;
alphamax = %inf;
ok = 0;
dltx = 0.00000001;
// ---------------------------------
// Algorithme de Fletcher-Lemarechal
// ---------------------------------
// Appel de l'oracle au point initial
ind = 4;
[F,G] = Oracle(x,ind);
// Initialisation de l'algorithme
alphan = alpha;
xn = x;
// Boucle de calcul du pas
//
// xn represente le point pour la valeur courante du pas,
// xp represente le point pour la valeur precedente du pas.
while ok == 0
xp = xn;
xn = x + (alphan*D);
[Fx,Gx,ind]=Oracle(x,ind);
[Fn,Gn,ind]=Oracle(xn,ind);
// Calcul des conditions de Wolfe
Condition1= (Fn<=Fx+omega1*alphan*Gx'*D);
Condition2= (Gn'*D>=omega2*Gx'*D);
// Test de la valeur de alphan :
// - si les deux conditions de Wolfe sont verifiees,
// faire ok = 1 : on sort alors de la boucle while
// - sinon, modifier la valeur de alphan : on reboucle.
if ~Condition1
alphamax = alphan;
alphan= 0.5*(alphamin+alphamax);
else
if ~Condition2
alphamin=alphan;
if (alphamax==%inf)
alphan=2*alphamin;
else
alphan=0.5*(alphamin+alphamax);
end
else
ok=1;
break;
end
end
// Test d'indistinguabilite
if norm(xn-xp) < dltx then
ok = 2;
end
end
endfunction
|
906ea75c82db81a838703ea0f045d6c3e2227215 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2780/CH1/EX1.13/Ex1_13.sce | f6a1fc1458ef5d198e4b358861beb56092a70f32 | [] | 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 | 241 | sce | Ex1_13.sce | clc
//to calculate velocity
c=3*10^8 // light velocity
v=0.75*c //speed of A
ux=-0.85*c //speed of B
ux1=(ux-v)/(1-ux*v/c^2)
disp(ux1,'velocity of B with respect to A (m/s) is :')
//answer is given in terms of c in the book=-0.9771c
|
51aed3f50cd0f5c55b78c36e14d7781629b1db66 | 449d555969bfd7befe906877abab098c6e63a0e8 | /575/DEPENDENCIES/761.sci | eec1e7342b6cf2a79f0c36e94e4327852b618cb3 | [] | 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 | 113 | sci | 761.sci | m1=120 //kg
m2=175 //kg
m3=295 //kg
ID=6 //cm
P=17 //bar
H1=125.7 //Kj/Kg
H2=271.9 //Kj/Kg
H3=2793 //Kj/kg |
f6774f8dd2bd29a94723109d71af175f24b321bf | 449d555969bfd7befe906877abab098c6e63a0e8 | /1670/CH5/EX5.21/5_21.sce | 56aab357f2e6fe2c9a9b9d2f4cef567dbb66c7bb | [] | 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,032 | sce | 5_21.sce | //Example 5.21
//Newton's Forward Difference Formula
//Page no. 145
clc;close;clear;
printf(' x\t f(x)\t\t 1st\t\t 2nd\t\t 3rd\t\t\n\t\t\tdifference\tdifference\tdifference\t')
printf('\n---------------------------------------------------------------------------------------------------')
h=1;
z=[0,-4;1,-1;2,2;3,11;4,32;5,71]
deff('y=f1(x,p)','y=z(x,2)+p*z(x,3)+p*(p-1)*z(x,4)/2+p*(p-1)*(p-2)*z(x,5)/6')
x01=0;x11=6;
x02=2;x12=2.5
for i=3:7
for j=1:8-i
z(j,i)=z(j+1,i-1)-z(j,i-1)
end
end
printf('\n')
for i=1:6
for j=1:5
if z(i,j)==0 & i~=1 then
printf(' \t')
else
if j==1 then
printf(' %.1f\t',z(i,j))
else
printf('%.7f\t',z(i,j))
end
end
end
printf('\n')
end
x=poly(0,'x')
l=z(1,2)+x*z(1,3)+x*(x-1)*z(1,4)/2+x*(x-1)*(x-2)*z(1,5)/6
disp(l,"The required equation is :")
p=(x11-x01)/h;
disp(f1(1,p),"fp (6) =");
p=(x12-x02)/h;
disp(f1(3,p),"fp (2.5) =");
|
fc8ef09e7c47b693ebcd4a10e3fdd7565370ec07 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1628/CH14/EX14.1/Ex14_1.sce | c7a62295b3b2855bef269ae36c2e488445b39d74 | [] | 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 | 346 | sce | Ex14_1.sce |
// Example 14.1
F=60; // Frequency
P=6; // No.Of poles
ns=(120*F)/P; // Speed Of rotation
disp('Speed Of rotation Is = '+string(ns)+' Rpm');
F1=20; // Decreased frequency
P1=(120*F1)/ns; // Number Of poles
disp('Number Of poles = '+string(P1));
// p 546 Ex14.1
|
0b39dd5f7dbf3d1f7e89b5690ecccf2659ba20e9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /858/CH7/EX7.11/example_11.sce | cb3e0db5c031c6bbc3c7e5aad3479f61940a31a4 | [] | 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 | 175 | sce | example_11.sce | clc
clear
printf("example 7.11 page number 316\n\n")
//to find the product concentration
printf("this is a theoritical question, book shall be referred for solution")
|
640906ff2eafe0668c422014758e21a469546033 | 449d555969bfd7befe906877abab098c6e63a0e8 | /29/CH11/EX11.2/exa11_2.sce | f0cc432e29a5268358d3d9450b37fee1aa6b0755 | [] | 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 | 188 | sce | exa11_2.sce | //Caption:transfer_function
// example 11_2
//page 469
syms G1 G2 G3 H1;
s=%s;
G1=4/(s*(s+4));
G2=s+1.2;
G3=s+0.8;
H1=1;
H2=(G2+G3);
a=G1/.H1;
y=a/(1+a*H2)
disp(y,"C(s)/R(s)=") |
e21d283d24da013838639f6fabfc0be4b7d36521 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3751/CH12/EX12.13/Ex12_13.sce | ae1c93cebc8a34d19155f335b682436254ae4a87 | [] | 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 | 818 | sce | Ex12_13.sce | //Fluid Systems - By - Shiv Kumar
//Chapter 12- Reciprocating Pumps
//Example 12.13
//To Determine the Crank Angle, at which there is no flow of water to or from the vessel.
clc
clear
//Given Data:-
D=17.5; //Bore diameter, cm
L=35; //Stroke Length, cm
d_s=15; //Diameter of Suction pipe, cm
N=150; //Speed, rpm
//Computations:-
D=D/100; //m
L=L/100; //m
d_s=d_s/100; //m
omega=2*%pi*N/60; //rad/s
A=(%pi/4)*D^2; //m^2
r=L/2; //m
Q_s=2*A*omega*r/%pi; //Rate of flow from sump upto air vessel, m^3/s
theta=asind(Q_s/(A*omega*r)); //degrees
//Result:-
printf("The Crank Angle at which there is no flow, theta=%.2f Degrees\n",theta)
|
c67343d766618d916001d09ecf72b48e160c2286 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3685/CH22/EX22.5/Ex22_5.sce | 9c970abfff8b71b61b8df1b8d08e52596e8e4a06 | [] | 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 | 580 | sce | Ex22_5.sce | clc
// Given that
p = 1 // Pressure in atm
t = 300 // Temperature in K
F = 5 // For oxygen gas degree of freedom
printf("\n Example 22.5 \n")
v = 445 // In m/s as given in the book
m = 5.31e-26 // Mass of oxygen molecule in kg
sigma = 3.84e-19 // As given in the book in m^2
k = (1/6)*(v*F*(1.38*10^-23))/sigma
// If the gas has Maxwellian velocity distribution,
k_ = (1/3)*(F*(1.38*10^-23)/sigma)*((1.38*10^-23)*t/(%pi*m))^(1/2)
printf("\n Thermal conductivity = %f W/mK,\n If the gas has Maxwellian velocity distribution,\n Thermal conductivity = %f W/mK",k,k_)
|
933a87d68d2aba85231bd501148e4256311bf572 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1370/CH4/EX4.8/Exp4_8.sce | fe30895fc0d19a4b6a4068e30dddcf7afa09776b | [] | 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,955 | sce | Exp4_8.sce | //Example 4.8
clc
disp("V_L = 230 V, R_a between lines = 1.8 ohm")
disp("(V_oc)_line = 230 V, I_scc = 12.5 A for same I_f = 0.38 A")
disp("The value of open circuit e.m.f is always line value unless and until specifically mentioned to be a phase value")
disp("Therefore, Z_s = (V_oc)_ph / (I_scc)_ph |for same I_f")
voc=230/sqrt(3)
format(7)
disp(voc," (V_oc)_ph(in V) =")
zs=132.79/12.5
disp(zs,"Therefore, Z_s(in ohm/phase) =")
disp("R_a between lines = 1.8 ohm")
disp("For star connection, R_a between the terminals is 2 R_a per ph")
disp("Therefore, 2R_a per ph = 1.8")
disp("Therefore, R_a per ph = 0.9 ohm")
xs=sqrt((10.623^2)-(0.9^2))
format(7)
disp(xs,"Therefore, X_s(in ohm/phase) = sqrt(Z_s^2 - R_a^2) =")
disp("Now regulated is asked for I_a = 10 A")
disp("Now : The value of Z_s is calculated for I_s = 12.5 A and not at I_s = 10 A. It will be different for I_s = 10 A. But in this problem the test results are not given hence it is not possible to sketch the graphs to detemine Z_s at I_a = 10 A. So value of Z_s calculated is assumed to be same as I_a = 10 A")
disp("(i) For 0.8 lagging p.f.")
vph=230/sqrt(3)
format(7)
disp(vph,"V_ph(in V) = V_L/sqrt(3) =")
disp("I_a = 10 A")
disp("cos(phi) = 0.8 so sin(phi) = 0.6")
disp("(E_ph)^2 = (V_ph*cos(phi)+I_a*R_a)^2 + (V_ph*sin(phi)+I_a*X_s)^2")
eph=(((132.79*0.8)+(10*0.9))^2)+(((132.79*0.6)+(10*10.585))^2)
p=sqrt(eph)
format(8)
disp(p,"Therefore, E_ph(in V) = ")
regu=((218.39-132.79)/132.79)*100
format(6)
disp(regu,"Therefore, %Regulation(in percentage) = (E_ph-V_ph / V_ph)*100 =")
disp("(ii) For 0.8 leading p.f.")
disp("(E_ph)^2 = (V_ph*cos(phi)+I_a*R_a)^2 + (V_ph*sin(phi)+I_a*X_s)^2")
eph=(((132.79*0.8)+(10*0.9))^2)+(((132.79*0.6)-(10*10.585))^2)
p=sqrt(eph)
format(8)
disp(p,"Therefore, E_ph(in V) = ")
regu=((118.168-132.79)/132.79)*100
format(6)
disp(regu,"Therefore, %Regulation(in percentage) = (E_ph-V_ph / V_ph)*100 =")
|
60782abb2cade541791b0eaae32d595385b86708 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2579/CH2/EX2.6/Ex2_6.sce | 0a75830727fc0eb794c81f571f347cee89ab4271 | [] | 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 | 816 | sce | Ex2_6.sce | //Ex:2.6
clc;
clear;
close;
x1r=2*%pi/3;// in radian
x2r=2*%pi/3;// in radian
D=4*%pi/(x1r)^2;// the max directivity
// Now, let us find the exact value of the max directivity and compare the result
// y=Bo.cos(x)
// ymax=Bo
// Prad=integration of (Bo.cos(x).sin(x)) with limit 0 to 2*pi
P=integrate('sin(2*x)','x',0,2*3.14);
// Prad=%pi*Bo*integration of (Bo.cos(x).sin(x)) with limit 0 to 2*pi
// then we get Prad=%pi*Bo
// Do=(4*pi*ymax)/Prad=4*pi*Bo/%pi*Bo
Do=4;// exact value of the max directivity
printf("The max directivity = %f (dimensionless)", D);
printf("\n The exact value of the max directivity = %d (dimensionless)", Do);
printf("\n The exact max directivity is 4 and its approx. value is 2.84. Better approximations can be obtained if the patterns have much narrower beamwidths."); |
fff383b5610b58c41644efe07f16c7b77bfbd7fa | f5bb8d58446077a551e4d9a6461a55255db523fe | /sistemas_nao_lineares/metodos/sistema_nao_linear_newton.sce | bfe5f613ee694aceab3c76111a8b0857528661b2 | [] | no_license | appositum/numerical-calculus | 6be1a9990a1621c705af6ba5694cf8c7b891d06e | 7759e74ce9ce5c5826f96be7de84a2f7ecb97c91 | refs/heads/master | 2021-07-19T18:19:09.336819 | 2018-11-27T21:52:36 | 2018-11-27T21:52:36 | 143,060,426 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,079 | sce | sistema_nao_linear_newton.sce | clc
//RESOLUÇÃO NUMÉRICA DE UM SISTEMA NÃO LINEAR
/////////////////////////////////////////////////////////////////////////
// MÉTODO DE NEWTON - RAPHSON //
////////////////////////////////////////////////////////////////////////
// n: dimensão do sistema
//F: vetor das funções a serem igualadas a zero (f1, f2, f3,...,fn)
//J: Matriz Jacobiana
//X0: Aproximação inicial para a solução exata
// eps1: precisão a ser utilizada
function w = naolinear(F, J, X0, eps1)
n=length(F(X0))
max_iter = 200;
teste=10.0;
iter=1;
// salvando X0 na coluna 1 da matriz M
for i=1:n
M(i,1)=X0(i)
end
while((teste>eps1) | iter>=max_iter ) do
VF = F(X0)
MJ=J(X0)
S=MJ \ (- VF)
X1 = S + X0
for i=1:n
M(i,iter+1)=X1(i)
end
d = X1 - X0
teste=sqrt( sum(d.^(2)) )
iter = iter +1
X0=X1
end
printf("\n")
printf(" NEWTON - RAPHSON \n")
printf("SISTEMAS NÃO LINEARES ")
printf("\n \n \n")
printf("k= %g iteracoes \n \n", iter)
w = M
endfunction
|
2b264a47d8abc44fd5c6d27f56530b378a96f296 | 3953ee8faa83677c4470242adc45315acd353eff | /examples/nav/nav30Q_s3camr.tst | 966952ecdfb8fb3e8bd7ff716660f8728b66410e | [
"BSD-2-Clause"
] | permissive | zutshi/S3CAMR | 83be6ba820207273e6f4b81c55d737b48b097e2a | e7a354137729fcc1f87e647efc8d91e5cd40c83d | refs/heads/master | 2021-05-04T11:52:09.707263 | 2019-06-25T00:37:11 | 2019-06-25T00:37:11 | 51,499,986 | 4 | 0 | null | 2016-03-29T22:01:38 | 2016-02-11T07:22:38 | Python | UTF-8 | Scilab | false | false | 1,611 | tst | nav30Q_s3camr.tst | # REFERENCE:
# EMSOFT paper
inf = float('inf')
plant_pvt_init_data = None
# Property
initial_set = [[4.0, 21.0, -1.0, -1.0],
[5.0, 22.0, 1.0, 1.0]]
ROI = [[-1, -1, -5,-5],
[26, 26, 5, 5]]
Q = [[7., 9., -inf, -inf],
[8., 10., inf, inf]]
error_set = Q
T = 20.0
# Working set for P, Q
# ./scamr.py -f ../examples/nav/nav30.tst -cn --refine model-dft --prop-check --incl-error --seed 0 --max-model-error 10 --max-paths 1000
#
# grid_eps = [1.1]*4
# delta_t = 5.0
# num_samples = 100
#
# grid_eps = [0.11]*4
# delta_t = 5.0
# num_samples = 2
grid_eps = [0.2]*4
delta_t = 5.0
num_samples = 10
# Gets the right x0 from linprog: but the interval is big enough to
# concretize succesfully
# grid_eps = [5.1]*4
# delta_t = 5.0
# num_samples = 100
# grid_eps = [1.1]*4
# delta_t = 5.0
# num_samples = 10 #[but all paths]
MAX_ITER = 4
plant_description = 'python'
plant_path = 'nav30.py'
#############################################
############## Don't care params ############
#############################################
initial_controller_integer_state = []
initial_controller_float_state = []
num_control_inputs = 0
min_smt_sample_dist = 0
ci = [[], []]
pi = [[],[]]
controller_path = None
controller_path_dir_path = None
initial_discrete_state = []
initial_private_state = []
# Viloations
#
# S
# x0=[ 4.14327461 21.51742883 0.8471542 0.9884877 ] -> x=[ 22.44414369 11.999 0.22792075 -0.86384343], t=30.1382177243
# x0=[ 4.50024758 21.82478644 0.97146715 0.6993149 ] -> x=[ 22.4524101 11.999 0.22748131 -0.86401213], t=30.1798284278
|
0aebecf3170aa340f1e46e8a326dacd49edb54a3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /761/CH14/EX14.14/14_14.sce | c22b9681d796e5e8a9443ffb0910ec55c57b9ce8 | [] | 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 | 328 | sce | 14_14.sce | clc;
//page no 492
//prob no. 14.14
Zo=50;//line impedance in ohm
ZL=75+%i*25;
// the requirment of this is simply to match the 50ohm line to the impedsnce at this point on the line,which is 88.38 ohm,resistive.
Z2=88.38;//in ohm
//The required turn ratio is
N1_N2=sqrt(Zo/Z2);
disp(N1_N2,'The required turn ratio is'); |
3e178af961a24cf3fc5ae7741bd1921c2a581a11 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/1.1/Unix/scilab-1.1/macros/percent/%ris.sci | 7413b4a4d4485bb23c8f6ff0837f1347e2f32fb4 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] | 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 | 354 | sci | %ris.sci | //<f2>=%ris(i,j,f2,n)
// %rip(i,j,r,m) insere la matrice de fractions rationnelles r dans la matrice
//de scalaires m pour les indices de lignes (de colonnes) i (j). (m(i,j)=r)
//!
[l,c]=size(n),
if size(i)<>[-1,-1]; l=maxi([l,maxi(i)]); end;
if size(j)<>[-1,-1]; c=maxi([c,maxi(j)]); end;
d=ones(l,c);
n(i,j)=f2(2),d(i,j)=f2(3)
f2(2)=n;f2(3)=d;
//end
|
8bd3d8833d13d20ee748672112bd0b45a02320a0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2777/CH5/EX5.11/Ex5_11.sce | ca8b07f1178f6c267c78f483cac1e523eb150530 | [] | 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,209 | sce | Ex5_11.sce |
// ELECTRICAL MACHINES
// R.K.Srivastava
// First Impression 2011
// CENGAGE LEARNING INDIA PVT. LTD
// CHAPTER : 5 : INDUCTION MACHINES
// EXAMPLE : 5.11
clear ; clc ; close ; // Clear the work space and console
// GIVEN DATA
m = 3; // Total Number of phase in Induction Motor
p = 6; // Total number of Poles of Induction Motor
f = 50; // Frequency in Hertz
s = 0.03; // Slip
// CALCULATIONS
Ns = (120*f)/p; // Synchronous Speed in RPM
Nr = (1-s)*Ns; // Rotor Speed in RPM
Nf = Ns - Nr; // Speed of Forward Rotating magnetic fields with respect to stator and rotor in RPM
Nb = Ns + Nr; // Speed of Backward Rotating magnetic fields with respect to stator and rotor in RPM
// DISPLAY RESULTS
disp("EXAMPLE : 5.11 : SOLUTION :-");
printf("\n (a) Speed of Forward Rotating magnetic fields with respect to stator and rotor is equal to + %.f RPM \n",Nf)
printf("\n (b) Speed of Backward Rotating magnetic fields with respect to stator and rotor is equal to + %.f RPM \n",Nb)
|
4f77dae5ae85219a29e5977af1eca623c6d7bd14 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2021/CH21/EX21.10/EX21_10.sce | fc3acf61eb6e78d52ed20ecc9d8706ce0686d158 | [] | 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 | 156 | sce | EX21_10.sce | //Finding of Diameter
//Given
D=25;
P1=25;
P2=120;
//To Find
A=(%pi/4)*D^2;
d=(A*P1)/P2;
d1=sqrt(d);
disp("Diameter ="+string(d1)+" centimeter");
|
fe6dd2146f0ea81a7a42d1ed445a6f75977517da | 449d555969bfd7befe906877abab098c6e63a0e8 | /2279/CH7/EX7.8/eg_7_8.sce | 5257de4580227a4c075501337fc142b9002c0745 | [] | 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 | 724 | sce | eg_7_8.sce | //x[n] = 1+sin(2*%pi/N)n+3cos(2*%pi/N)n+cos[(4*%pi/N)n+%pi/4]
clear;
close;
clc;
N = 10;
n = 0:0.01:N;
Wo = 2*%pi/N;
xn =ones(1,length(n))+sin(Wo*n)+3*cos(Wo*n)+cos(2*Wo*n+%pi/4);
for k =0:N-2
C(k+1,:) = exp(-sqrt(-1)*Wo*n.*k);
a(k+1) = xn*C(k+1,:)'/length(n);
if(abs(a(k+1))<=0.1)
a(k+1)=0;
end
end
a =a';
a_conj =conj(a);
ak = [a_conj($:-1:1),a(2:$)];
Mag_ak = abs(ak);
for i = 1:length(a)
Phase_ak(i) = atan(imag(ak(i))/(real(ak(i))+0.0001));
end
Phase_ak = Phase_ak'
Phase_ak = [Phase_ak(1:$-1) -Phase_ak($:-1:1)];
k = -(N-2):(N-2);
subplot(2,1,1)
plot2d3('gnn',k,Mag_ak,5)
xtitle('abs(ak)','k','ak')
subplot(2,1,2)
plot2d3('gnn',k,Phase_ak,5)
xtitle('phase(ak)','k','ak')
|
91e64c5850e5f6705b90700f23bbf4cc01ab6029 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3705/CH14/EX14.2/Ex14_2.sce | 33f4e0e3b28962a91d68d3164e877bef5dc1ac23 | [] | 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,241 | sce | Ex14_2.sce |
clear//
//Variable Declaration
R=45 //Radius of the circle in mm
r=20 //Radius of the smaller circle in mm
h=100 //Depth of the straight section in mm
//Calculations
//Part 1
//Triangle
b=2*R //Breadth in mm
A_t=b*h*0.5 //Area in mm^2
Ix_bar_t=b*h**3*36**-1 //Moment of inertia in mm^4
y_bar1=2*3**-1*h //centroidal axis in mm
Ix_t=Ix_bar_t+A_t*y_bar1**2 //moment of inertia in mm^4
//Semi-circle
A_sc=%pi*R**2*0.5 //Area of the semi-circle in mm^2
Ix_bar_sc=0.1098*R**4 //Moment of inertia in mm^4
y_bar2=h+(4*R*(3*%pi)**-1) //Distance of centroid in mm
Ix_sc=Ix_bar_sc+A_sc*y_bar2**2 //Moment of inertia in mm^4
//Circle
A_c=%pi*r**2 //Area of the circle in mm^2
Ix_bar_c=%pi*r**4*4**-1 //Moment of inertia in mm^4
y_bar3=h //Distance of centroid in mm
Ix_c=Ix_bar_c+A_c*y_bar3**2 //Moment of inertia in mm^4
//Composite Area
A=A_t+A_sc-A_c //Total area in mm^2
Ix=Ix_t+Ix_sc-Ix_c //Moment of inertia in mm^4
//Part 2
y_bar=(A_t*y_bar1+A_sc*y_bar2-A_c*y_bar3)/(A) //Location of centroid in mm
Ix_bar=Ix-A*y_bar**2 //Moment of inertia in mm^4
//Result
printf("\n Moment of inertia about x-axis is %0.0f mm^4",Ix)
printf("\n Moment of inertia about the centroidal axis is %0.0f mm^4",Ix_bar)
|
1abcdd3b866c1daf7a050a66a025ba49f92a7b7f | 3a031f437fdd7426aec9731b31871506b540c723 | /Histogram of Gray Scale Image.sce | 084a229a446fc0cdc31d16d18876cf9eb9f99b25 | [] | no_license | mohammedkesury/Digital-Image-Processing | 006294df3c05100912ade8f75dcadc59f518cbba | 6589dcf0f400a803862fcd2194ff4b008ceb795e | refs/heads/master | 2020-04-20T05:20:20.161398 | 2019-04-09T16:04:04 | 2019-04-09T16:04:04 | 168,653,548 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 136 | sce | Histogram of Gray Scale Image.sce | a=imread('C:\Users\Mohammed Kesury\Desktop\Sem 6\DIP\cameraman.tif')
[counts,cells]=imhist(a)
[m n]=size(cells)
imhist(a,m,'black')
|
132cc65868c7632cd216fd97d228783658505373 | 0812f3bb6f3cc038b570df68ccee4275da04b11f | /models/complexity_1000/Applied_Thermodynamics_and_Engineering/CH8/EX8.3/8_3.sce | e01200906d7dea9754a9ad599c794dfbb95eb788 | [] | no_license | apelttom/20-semester_PhD_thesis | edc0b55580bae9d364599932cd73cf32509f4b7a | ff28b115fcf5e121525e08021fa0c02b54a8e143 | refs/heads/master | 2018-12-26T22:03:38.510422 | 2018-12-14T20:04:11 | 2018-12-14T20:04:11 | 106,552,276 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 202 | sce | 8_3.sce | clc;
h1=3442.6;
h2=2713;
h6=3487;
h7=2535;
h3=112;
TW=(h1-h2)+(h6-h7);
Q=(h1-h3)+(h6-h2);
Ceff=TW/Q;
disp(Ceff,"cycle efficiency is:");
ssc=1/TW;
disp("kg/kW h",ssc,"specific steam consuption is:")
|
cbec5b382d0d65a89ca6610afcbdeaa91a5d5d54 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1541/CH3/EX3.7/Chapter3_Example7.sce | cc5cf208a52b5e15260d05685e7eac5426e9c25b | [] | 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,030 | sce | Chapter3_Example7.sce | //Chapter-3, Example 3.7, Page 3.18
//=============================================================================
clc
clear
//INPUT DATA
P=6;//Number of poles
f=50;//Supply frequency in Hz
R2=0.4;//Rotor reisitance in ohm
X2=4;//Rotor standstill reactance in ohm
T1=2;//Ratio of maximum torque to starting torque
//CALCULATIONS
Ns=(120*f)/P;//Synchronous speed in rpm
Sm=(R2/X2);//Slip at maximum torque
NTM=(Ns*(1-Sm));//Speed of the motor at maximum torque in rpm
T=((R2^2+X2^2)/(2*R2*X2));//Ratio of maximum torque to starting torque
Rext=(sqrt(X2^2/((2*T1)-1))-R2);//Additional resistance required for the ratio of maximum torque to the statring torque to be 2 in ohm
//OUTPUT
mprintf('a)Speed of the motor at maximum torque is %i rpm \n b)Ratio of maximum torque to starting torque is %3.2f \n c)Additional resistance required for the ratio of maximum torque to the starting torque to be 2 is %3.1f ohm',NTM,T,Rext)
//=================================END OF PROGRAM==============================
|
f7040c0f9942bb1c3ab442a7de42c0adb3777571 | a62e0da056102916ac0fe63d8475e3c4114f86b1 | /set14/s_Materials_Science_And_Engineering_-_A_First_Course_V._Raghavan_3159.zip/Materials_Science_And_Engineering_-_A_First_Course_V._Raghavan_3159/CH17/EX17.1/Ex17_1.sce | 6fa5bdb0668567fa1e49d00f91ef99e7fe97b1d5 | [] | 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 | 421 | sce | Ex17_1.sce | errcatch(-1,"stop");mode(2);// calculation of relative dielectric constant
l= 10// length of capacitor in mm
b = 10 // width of capacitor in mm
d = 2 // distance of separation in mm
c = 1e-9 // capacitance in farad
epsilon_0 = 8.85e-12 // permittivity of free space
printf("\n Example 17.1")
epsilon_r = c*d*1e-3/(epsilon_0*l*1e-3*b*1e-3)
printf("\n Relative dielectric constant is %d",epsilon_r)
exit();
|
6a0ff926fffae28f11ec1342cf8482e70e25385b | 449d555969bfd7befe906877abab098c6e63a0e8 | /172/CH7/EX7.4/ex4.sce | 4693cab224f12ff81656b679d9d1e3e1c52c6a4e | [] | 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 | 858 | sce | ex4.sce | //example 4
//comparison of ideal carnot heat engine with actual heat engine
clear
clc
Qh=1000 //rate of heat transfer to heat engine in kW
W=450 //rate of production of work in kW
Ql=Qh-W //rate of heat rejected by heat engine in kW
nthermal=W/Qh //efficiency from the definition of efficiency
Tl=300 //temperature of surroundings in K
Th=550 //temperature of heat source in Celsius
ncarnot=1-Tl/(Th+273) //efficiency if heat engine is considered to be ideal carnot heat engine
W2=ncarnot*Qh //rate of work production if heat engine is assumed to be ideal carnot heat engine in kW
Ql2=Qh-W2 //rate of heat rejected by heat engine in kW if heat engine is assumed to be ideal carnot heat engine
printf("\n hence,energy discarded to the ambient surroundings is Ql2=%.0fkW.\n",Ql2)
printf("\n and the engine efficiency is ncarnot=%.3f.\n",ncarnot) |
96ab2b923aee09cc1c0b86a6eedca13471a6e780 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.4/Unix-Windows/scilab-2.4/macros/signal/jmat.sci | 197261e7199bf4bfe237fcc716482140037ff0bd | [
"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 | 279 | sci | jmat.sci | function [j]=jmat(n,m)
//j=jmat(n,m)
//This macro permutes block rows or block columns of a matrix
//
// n : number of block rows or block columns of the matrix
// m : size of the (square) blocks
//!
// Copyright INRIA
j=[];
for k=1:n,j(k,n-k+1)=1;end;
j=j.*.eye(m,m);
|
3a401ca7f51152cd287d57ccf51979802d5c9954 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2168/CH3/EX3.9/Chapter3_example9.sce | 8594673ba3a4a86b5c0c5b55ce96d265782f256b | [] | 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,016 | sce | Chapter3_example9.sce | clc
clear
//Input data
p1=1//Pressure at the end of suction stroke in kg/cm^2
T1=30+273//Temperature at the end of suction stroke in kg/cm^2
T3=1500+273//Maximum temperature during the cycle in K
r=16//Compression ratio
Cp=0.24//Specific heat at constant pressure in kJ/kg.K
Cv=0.17//Specific heat at constant volume in kJ/kg.K
g=1.41//Ratio of specific heats
//Calculations
T2=T1*r^(g-1)//Temperature at the end of adiabatic compression in K
s=(((T3/T2)-1)/(r-1))*100//Percentage of the stroke at which cut off occurs
r1=(r/(T3/T2))//Expansion ratio
T4=T3/(r1)^(g-1)//Temperature at the end of adiabatic expansion in K
qa=(Cp*(T3-T2))//Heat added in kcal/kg of air
qre=(Cv*(T4-T1))//Heat rejected in kcal/kg of air
nt=((qa-qre)/qa)*100//Air standard efficiency in percent
//Output
printf('(a) The percentage of stroke at which cut off takes place is %3.2f percent \n (b) The temperature at the end of expansion stroke is %3.0f K \n (c) The theoretical efficiency is %3.0f percent',s,T4,nt)
|
0c04197ef1b841efc0bbe43efb05f8702aa9ef5e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1658/CH19/EX19.6/Ex19_6.sce | 63f34253b1c6255cc8e28d27bc74facd5c9d5623 | [] | 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 | 607 | sce | Ex19_6.sce | clc;
//e.g 19.6
Vcc=10;
Rc=5*10**3;
Re=1*10**3;0
RL=50*10**3;
R1=50*10**3;
R2=10*10**3;
Rs=600;
beta=50;
Vs=10*10**-3;
Vbe=0.7;
Vth=(Vcc*R2)/(R1+R2);
disp('V',Vth*1,"Vth=");
Rth=(R1*R2)/(R1+R2);
disp('10^3ohm',Rth*10**-3,"Rth=");
Ie=(Vth-Vbe)/(Re+(Rth/beta));
disp('mA',Ie*10**3,"Ie=");
re=25/(Ie*10**3);
disp('ohm',re*1,"re=");
Ri=beta*re;
Ris=(Rth*Ri)/(Rth+Ri);
disp('ohm',Ris*1,"Ris=");
rl=(Rc*RL)/(Rc+RL);
disp('Kohm',rl*10**-3,"rl=");
Av=rl/re;
disp(Av);
Vin=(Vs*Ris)/(Ris+Rs);
disp('mV',Vin*10**3,"Vin=");
V0=Av*Vin;
disp('mV',V0*1,"V0=");
Avs=(Av*Vin)/Vs;
disp(Avs);
|
d83151035a5afb46cee46bd68c447da0638ac997 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1919/CH9/EX9.4/Ex9_4.sce | 906276247aecf117cef2dfa151941542ad18222b | [] | 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,339 | sce | Ex9_4.sce |
// Theory and Problems of Thermodynamics
// Chapter 9
// Air_water Vapor Mixtures
// Example 4
clear ;clc;
//Given data
V = 5 // volume of tank in m^3
X1 = 0.3 // volume fraction of Hydrogen
X2 = 0.3 // volume fraction of Argon
X3 = 0.4 // volume fraction of Methane
Xf = 0.6 // final mixture composition of methane
T = 300 // initial temperature of mixture in K
P = 1 // initial pressure of mixture in MPa
R = 8.314 // gas constant
// Calculations
p1 = X1*P // pressure of Hydrogen
p2 = X2*P // pressure of Argon
p3 = X3*P // pressure of Methane
N1 = p1*1e3*V/(R*T) // pressure of Hydrogen
N2 = p2*1e3*V/(R*T) // pressure of Argon
N3 = p3*1e3*V/(R*T) // pressure of Methane
// to determine the number of moles of methane in final mixture
deff('y=moles(Nf)', 'y = Xf-(Nf/(N1+N2+Nf))')
Nf = fsolve(0.1,moles)
CH4_add = Nf-N3 // CH4 moles to be added
N = N1 + N2 + Nf // total number of moles
Pf = N*R*T/V * 1e-3 // Final pressure in MPa
// Output Results
mprintf('Amount of methane to be added = %4.4f kmol' , CH4_add);
mprintf('\n Final pressure of mixture in Tank = %4.1f MPa' , Pf);
|
1e308c0e0518174d7124f211711cc039a65cc8cf | 449d555969bfd7befe906877abab098c6e63a0e8 | /2855/CH6/EX6.2/Ex6_2.sce | 4c453c1ecddf7a9085955dc97515402d3f87c0f7 | [] | 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 | 343 | sce | Ex6_2.sce | //Chapter 6
//page no 140
//Given
clear;
clc;
Tj=120;//in degree celsius
Tamp=80;//n degree celsius
Pt=2.1;//in W
RthJ_a =34; //in k/w(Assumption)
Rth=(Tj-Tamp)/Pt;
printf("Rth = %0.0f K/W",Rth);
if Rth>RthJ_a then
printf("\n No Heat sink is required");
else
printf("\n Yes,Heat sink is required");
end ;
|
250d6b8ba752764b87bbfc6d6d1e7177f550890d | 449d555969bfd7befe906877abab098c6e63a0e8 | /1658/CH17/EX17.4/Ex17_4.sce | 8cb439511da4bea6b121822ec2e9ad1684a1351d | [] | 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 | 183 | sce | Ex17_4.sce | clc;
//e.g 17.4
Vrms=100;
a=45;
Idc=0.5;
Vm=sqrt (2)*Vrms;
disp('V',Vm*1,"Vm=");
//Idc=(Vm/(2*%pi*RL))*(1+cosd(a));
RL=(Vm/(2*%pi*Idc))*(1+cosd(a));
disp('ohm',RL*1,"RL=");
|
4f480f1424076d7adccf3e1bf0c98340efce6368 | 449d555969bfd7befe906877abab098c6e63a0e8 | /593/CH14/EX14.6/ex14_6.sce | 3a9679f01cb1550db33d7ade5f6cc4586f23171c | [] | 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,502 | sce | ex14_6.sce | clear;
//clc();
// Example 14.6
// Page: 386
printf("Example-14.6 Page no.-386\n\n");
//***Data***//
T = 100;//[C] Temperature of the outside
P_outside = 1;//[atm]
// At 100 C, the surface tension between steam and water is
T = 0.05892;//[N/m] From metric steam table (7, page 267)
// Pressure difference between inside and outside of a drop is given by the expression
// (P_inside - P_outside) = (4*T)/d_i
// Let (P_inside - P_outside) = delta_P , so
//delta_P = (4*T)/d_i
// For the drop of diameter
d_1 = 0.001;//[m]
// So
delta_P_1 = (4*T)/d_1;//[Pa]
// Which is certainly negligible
// If we reduce the diameter to
d_2 = 10^(-6);//[m]
// So
delta_P_2 = (4*T)/d_2;//[Pa]
// If we reduce it to diameter that is smallest sized drop likely to exist
d_3 = 0.01*10^(-6)//[m]
// Then the calculated pressure difference is
delta_P_3 = (4*T)/d_3;//[Pa]
printf("Pressure difference with the change in radius of the drop of the water is given as in the following table\n\n");
printf(" Diameter of the droplet (d_i)(in meter) Pressure difference ( P_inside - P_outside )(in atm)\n");
printf(" %0.2e %0.2e\n",d_1,delta_P_1);
printf(" %0.2e %0.2e\n",d_2,delta_P_2);
printf(" %0.2e %0.2e\n",d_3,delta_P_3);
|
45f153ef1ca541419638756327c1103b402ed196 | 449d555969bfd7befe906877abab098c6e63a0e8 | /683/CH27/EX27.3/SBG_3.sce | 071cff1c1973fc0435584b45a639a7a82e73ac5e | [] | 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 | 579 | sce | SBG_3.sce | // sum 27-3
clc;
clear;
m=6;
Zp=30;
Zg=45;
dp=m*Zp;
rp=dp/2;
dg=m*Zg;
rg=dg/2;
R=sqrt(rg^2+rp^2);
gamma1=180/%pi*asin(rp/R);
gamma2=(90-gamma1);
ha=6;
hf=1.25*ha;
phi=180/%pi*atan(ha/R);
beta=180/%pi*atan(hf/R);
//let Face Cone Angle be FCA
FCA=(gamma1+phi);
//Let Root cone angle be RCA
RCA=(gamma1-beta);
// printing data in scilab o/p window
printf(" gamma1 is %0.1f deg ",gamma1);
printf("\n gamma2 is %0.1f deg ",gamma2);
printf("\n R is %0.2f mm ",R);
printf("\n FCA is %0.3f deg ",FCA);
printf("\n RCA is %0.2f deg ",RCA);
|
fc7c78ce8fb95da5e688798847ef07a377cbc9d0 | 694ad1c574305de3b85702522d231dea9660e94c | /test/store.tst | d7a1be478150a0bcc75a3dc056527f3cb9658f03 | [] | no_license | Mark-Seaman/SeamanTech | ced41e87b2b6fe2ffdc1172c2bd1b2e207536dfd | f2635eb82c26990305ff338c1a9dcbbf4618a3ed | refs/heads/master | 2021-01-13T02:03:24.626053 | 2015-12-07T16:20:34 | 2015-12-07T16:20:34 | 23,025,408 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 31 | tst | store.tst | tpyrun $p/bin/util/store_test
|
89e7bc60d1b4eb80b633f426f298dc5cb764ed95 | e41b69b268c20a65548c08829feabfdd3a404a12 | /3DCosmos/Data/Scripts/_Movie/scene_foucault.SCI | 06d8326cc791163cca99c03a69555fecabc29cee | [
"LicenseRef-scancode-khronos",
"MIT"
] | permissive | pvaut/Z-Flux | 870e254bf340047ed2a52d888bc6f5e09357a8a0 | 096d53d45237fb22f58304b82b1a90659ae7f6af | refs/heads/master | 2023-06-28T08:24:56.526409 | 2023-03-01T12:44:08 | 2023-03-01T12:44:08 | 7,296,248 | 1 | 1 | null | 2023-06-13T13:04:58 | 2012-12-23T15:40:26 | C | UTF-8 | Scilab | false | false | 5,118 | sci | scene_foucault.SCI |
codeblock readtextfile(ScriptDir+"\_TOOLS.sci");
codeblock readtextfile(ScriptDir+"\_SSYS.sci");
codeblock readtextfile(ScriptFilePath+"\_FoucaultTools.sci");
codeblock readtextfile(ScriptFilePath+"\_Colors.sci");
codeblock readtextfile(ScriptFilePath+"\_AnimateTools.sci");
codeblock readtextfile(ScriptFilePath+"\_CamMoveTools.sci");
planesize=2500;
pendframe=root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject;
planeframe=pendframe.addsubframe("PendPlane");
planeframe.CastVolumeShadow=false;
planeframe.add("Rectangle",
"color":color(0,0.5,1,0.3),"enablelight":false,"RenderBack":true,"BlendType":BlendTranslucent,
"DepthMask":DepthMaskDisable,
"Position":point(-1*planesize,0,-2*planesize+3500),"Axis1":vector(2*planesize,0,0),"Axis2":vector(0,0,2*planesize));
planeframe.visible=false;
#planeframe.addignoreviewport("sky");
pendcolor1=color(0.5,0.5,0.5);
pendcolor2=color(1.0,0.8,0.0);
pendspeccolor1=color(0.6,0.6,0.6);pendspecval=30;
##########################################################################
#Create sky viewport
try { DelObject(root.Viewports.Sky); }
au2km=149598000;
myviewport=CreateNewViewPort(0.5,0,1,1);
myviewport.name="Sky";
myviewport.Framesize=0.005;
myviewport.FrameColor=color(0.2,0.2,0.2);
myviewport.FrameRight=false;myviewport.FrameTop=false;myviewport.FrameBottom=false;
myviewport.start;
myviewport.setscene(root.SC);
myviewport.FocalDistance=21000;
myviewport.cameradir=vecnorm(vector(-0.4,-1.5,-2));
myviewport.cameraupdir=vector(0,0,1);
myviewport.enableusernavigation=root.Viewports.main.enableusernavigation;
myviewport.EnableUserTimeControl=root.Viewports.main.EnableUserTimeControl;
myviewport.NearClipPlane=0.1*myviewport.FocalDistance;
myviewport.FarClipPlane=20*myviewport.FocalDistance;
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.GlobeRendering.addignoreviewport("sky");
Cam_Init(myviewport);
root.Viewports.Sky.Active=true;
root.Viewports.main.XMaxFrac=0.63;
root.Viewports.Sky.XMinFrac=0.63;
root.Viewports.Sky.XMaxFrac=1.0;
#=================================================================================
# SETUP
#=================================================================================
root.time=time(2009,8,1,22,0,0);
root.TimeSpeedFactor=0;
root.Viewports.main.cameradir=vecnorm(vector(0.2,-0.6,-0.7));
#This sets the pendulum position to a particular lattitude position on Earth
setposition(deg2rad(89.9));
#=================================================================================
# ANIMATION
#=================================================================================
StartPendulum(true);
FadeViewportsIn;
Animate(2);
#start the time
starttime;
animate(7);
#show gravity arrow
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendSusp.GravArrow.visible=true;
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendSusp.GravArrow.blinkperiod=0.4;
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendSusp.GravArrow.maxblinkcount=5;
animate(9);
#show rotation indication
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendSusp.RotIndic.visible=true;
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendSusp.RotIndic.blinkperiod=0.4;
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendSusp.RotIndic.maxblinkcount=5;
animate(9);
#show swing plane
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendPlane.visible=true;
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendPlane.blinkperiod=0.4;
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendPlane.maxblinkcount=2;
animate(10);
#move pendulum to equator
stoptime;
#stopcorotate;
animate(2);
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendPlane.visible=false;
MovePendulum(deg2rad(0.0));
animate(0.5);
Cam_Rotate(root.Viewports.main,vector(0.486147924, -0.833475705, 0.26263748),4);
animate(5);
#start the time
StartPendulum(true);
starttime;
animate(12);
#corotate with earth
#startcorotate;
#animate(4);
#set at belgium position
FadeViewportsOut;
root.time=time(2009,8,1,7,0,0);
root.TimeSpeedFactor=0;
setposition(deg2rad(51.0));
FastStopCorotate;
root.Viewports.main.cameradir=vector(-0.002367378, -0.99255836, -0.121746861);
StartPendulum(true);
FadeViewportsIn;
animate(2);
starttime;
animate(6);
#show swing plane
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendPlane.visible=true;
animate(12);
#set at south pole
FadeViewportsOut;
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendPlane.visible=false;
root.time=time(2009,1,1,0,0,0);
root.TimeSpeedFactor=0;
setposition(deg2rad(-89.0));
FastStopCorotate;
root.Viewports.main.cameradir=vector(0.142389847, 0.629207954, 0.764082773);
StartPendulum(true);
FadeViewportsIn;
animate(2);
starttime;
animate(6);
root.SC.Universe.SolarSystem.Earth.Inclin.Globe.LocFrame.PendObject.PendPlane.visible=true;
animate(12);
FadeViewportsOut;
stop;
|
edb8175926cdc685d4205e26d2f60164c2f206f1 | 449d555969bfd7befe906877abab098c6e63a0e8 | /887/CH6/EX6.6/6_6.sce | 2d136c1798686e0551a10dbc5dcd60b7b22cad6e | [] | 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,635 | sce | 6_6.sce | clc
//ex6.6
R=10*10^3;
f_o=1*10^6;
B=100*10^3;
I=10^-3*complex(cos(0),sin(0));
Q_p=f_o/B; //quality factor
L=R/(2*%pi*f_o*Q_p);
C=Q_p/(2*%pi*f_o*R);
//At resonance
V_out=I*R;
Z_L=%i*2*%pi*f_o*L;
Z_C=-%i/(2*%pi*f_o*C);
//across resistance
I_R=V_out/R;
I_R_R=real(I_R); //real part
I_R_I=imag(I_R); //imaginary part
I_R_max=sqrt((I_R_R^2)+(I_R_I^2)); //peak value
I_R_phi=atan(I_R_I/I_R_R); //phase angle
//across inductance
I_L=V_out/Z_L;
I_L_R=real(I_L); //real part
I_L_I=imag(I_L); //imaginary part
I_L_max=sqrt((I_L_R^2)+(I_L_I^2)); //peak value
//Z_L is pure imaginary ==> V_L is pure imaginary which means V_L_phi can be +or- %pi/2
if ((I_L/%i)==abs(I_L)) then
I_L_phi=%pi/2
elseif ((I_L/%i)==-abs(I_L)) then
I_L_phi=-%pi/2
end
//across capacitor
I_C=V_out/Z_C;
I_C_R=real(I_C); //real part
I_C_I=imag(I_C); //imaginary part
I_C_max=sqrt((I_C_R^2)+(I_C_I^2)); //peak value
//Z_C is pure imaginary ==> V_C is pure imaginary which means V_C_phi can be +or- %pi/2
if ((I_C/%i)==abs(I_C)) then
I_C_phi=%pi/2
elseif ((I_C/%i)==-abs(I_C)) then
I_C_phi=-%pi/2
end
disp('Current phasor across Resistance')
disp(I_R_max,'peak value in amperes')
disp(I_R_phi*180/%pi,'phase angle in degrees')
disp('')
disp('Current phasor across Inductance')
disp(I_L_max,'peak value in amperes')
disp(I_L_phi*180/%pi,'phase angle in degrees')
disp('')
disp('current phasor across capacitance')
disp(I_C_max,'peak value in amperes')
disp(I_C_phi*180/%pi,'phase angle in degrees')
disp('Phasor diagram cannot be drawn here')
|
ba082ff85cb766bb6339565b1facc3e43bf6bda2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2438/CH2/EX2.4/Ex2_4.sce | d7fd3444b3e58d605c24c72e78891a112e97534d | [] | 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 | 931 | sce | Ex2_4.sce | // Chapter 2 example 4
clc;
clear;
// Variable declaration
h = 1.054*10^-34; //plancks constant in J.s
m = 9.1*10^-31; // mass of electron in kg
a = 5*10^-10; // width of infinite potential well in m
e = 1.6*10^-19; // charge of electron coulombs
// Calculations
//cos(ka) = ((Psin(alpha*a))/(alpha*a)) + cos(alpha*a)
//to find the lowest allowed energy bandwidth,we have to find the difference in αa values, as ka changes from 0 to π
// for ka = 0 in above eq becomes
// 1 = 10*sin(αa))/(αa)) + cos(αa)
// This gives αa = 2.628 rad
// ka = π , αa = π
// sqrt((2*m*E2)/h^2)*a = π
E2 = ((%pi*%pi) *h^2)/(2*m*a^2*e); //energy in eV
E1 = ((2.628^2) *h^2)/(2*m*a^2*e) // for αa = 2.628 rad energy in eV
dE = E2 - E1; //lowest energy bandwidth in eV
// Result
mprintf('Lowest energy bandwidth = %3.3f eV',dE);
|
962e384d1e6e25c10be37ba628a553c8a2a565f1 | 99b4e2e61348ee847a78faf6eee6d345fde36028 | /Toolbox Test/filtord/filtord10.sce | a05ddf0a132f9db178a20ce858e266d62271aeb2 | [] | 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 | 181 | sce | filtord10.sce | b=[1 2 3 2 3 4];
a=[1 2 3; 4 5 6];
y=filtord(b,a);
disp(y);
//output
//!--error 10000
//check input dimension
//at line 36 of function filtord called by :
//y=filtord(b,a);
|
26f755ec3b8c44195ccbd18e3462abcc42f673ba | 449d555969bfd7befe906877abab098c6e63a0e8 | /2873/CH7/EX7.14/Ex7_14.sce | 79b72d90f7bc65ec9c6af8111a68df20d02c985f | [] | 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,388 | sce | Ex7_14.sce | // Display mode
mode(0);
// Display warning for floating point exception
ieee(1);
clear;
clc;
disp("Engineering Thermodynamics by Onkar Singh Chapter 7 Example 14")
V_A=6;//volume of compartment A in m^3
V_B=4;//volume of compartment B in m^3
To=300;//temperature of atmosphere in K
Po=1*10^5;//atmospheric pressure in pa
P1=6*10^5;//initial pressure in pa
T1=600;//initial temperature in K
V1=V_A;//initial volume in m^3
V2=(V_A+V_B);//final volume in m^3
y=1.4;//expansion constant
R=287;//gas constant in J/kg K
Cv=0.718;//specific heat at constant volume in KJ/kg K
disp("expansion occurs in adiabatic conditions.")
disp("temperature after expansion can be obtained by considering adiabatic expansion")
disp("T2/T1=(V1/V2)^(y-1)")
disp("so T2=T1*(V1/V2)^(y-1) in K")
T2=T1*(V1/V2)^(y-1)
T2=489.12;//approx.
disp("mass of air,m=(P1*V1)/(R*T1)in kg")
m=(P1*V1)/(R*T1)
m=20.91;//approx.
disp("change in entropy of control system,deltaSs=(S2-S1)=m*Cv*log(T2/T1)+m*R*10^-3*log(V2/V1)in KJ/K")
deltaSs=m*Cv*log(T2/T1)+m*R*10^-3*log(V2/V1)
disp("here,there is no change in entropy of environment,deltaSe=0")
deltaSe=0;
disp("total entropy change of combined system=deltaSc=deltaSs+deltaSe in KJ/K")
deltaSc=deltaSs+deltaSe
disp("loss of available energy(E)=irreversibility=To*deltaSc in KJ")
E=To*deltaSc
disp("so loss of available energy,E=0.603 KJ")
|
fdf67f59febbe6e2f6f5eab02f1582c9ed4ef183 | 8217f7986187902617ad1bf89cb789618a90dd0a | /source/2.4.1/macros/robust/cfspec.sci | 0d67922ff38255d11d49a4d9035c8cf9b5695ef7 | [
"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 | 542 | sci | cfspec.sci | function [gm]=cfspec(g)
//[gm]=cfspec(g) computes a co-spectral factorization:
// g = gm*gtild(gm)
//with stable gm and gm^-1 ( gm^-1 = invsyslin(gm) ).
//-- g: syslin list defining the linear system g
//-- gm:
//Assumptions:
//- g is invertible ( inv(D) exists ),
//- g and g^1 (invsyslin(g)) have no poles on the imaginary axis.
//- gtild(g) = g.
// (poles and zeros of g are symmetric wrt imaginary axis))
//- g(+oo) = D is positive definite.
//!
// Copyright INRIA
if type(g)==1 then gm=chol(g),return,end,
gm=fspec(g'),
gm=gm'
|
54f1b95d5211f06ef67e8b887a2c03b57e59673e | b3c9357cd1290921e67444ae057761959fdf24f1 | /Curso de programação com Scilab/exhx.sce | 4fdbb38dff9ab5c3ee204e001eeb5de97744049e | [] | no_license | joaolrneto/Scilab | 91742520422426dc8a772997ef4a5d6376008b6e | f383f87e4585955cf19d0dae1b5c29f93c3f70b4 | refs/heads/master | 2023-02-05T20:13:03.677069 | 2020-12-30T14:53:09 | 2020-12-30T14:53:09 | 264,671,730 | 1 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 420 | sce | exhx.sce | clc
clear
function [hx]=hxsoma(x,den)
if den > x then
hx=return(1)
end
hx=((x^den)/(den))+hxsoma(x,den+1)
endfunction
function [hx]=hxmult(x,den)
if den > x then
hx=return(1)
end
hx=((x^den)/(den))*hxmult(x,den+1)
endfunction
x=input("Informe um valor para X :")
den=1
numerador=hxsoma(x,den)
denominador=hxmult(x,den)
printf("h(x) = %.50f",numerador/denominador)
|
feb1ba8758f63d43d06341510a2de89d687ea95e | 449d555969bfd7befe906877abab098c6e63a0e8 | /1529/CH16/EX16.13/16_13.sce | 4989a2d9fdf547653aa14efa21a7b46c550f1c31 | [] | 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,002 | sce | 16_13.sce | //Chapter 16, Problem 13
clc;
eff = 0.8; // effficiency
f = 50; // in ohm
Pout = 4800; // in Watt
pf1 = 0.625 // power factor
pf2 = 0.95 // power factor
V = 240; // in Volts
//calculation:
Pin = Pout/eff
Im = Pin/(V*pf1)
phi1 = acos(pf1)
phi1d = phi1*180/%pi
//When a capacitor C is connected in parallel with the motor a current Ic flows which leads V by 90°.
phi2 = acos(pf2)
phi2d = phi2*180/%pi
Imh = Im*cos(phi1)
//Ih = I*cos(phi2)
Ih = Imh
I = Ih/cos(phi2)
Imv = Im*sin(phi1)
Iv = I*sin(phi2)
Ic = Imv - Iv
C = Ic/(2*%pi*f*V)
kvar = V*Ic/1000
printf("\n\n (a)Current taken by the motor, Im = %.0f A",Im)
printf("\n\n (b)Supply current after p.f. correction, I = %.2f A ",I)
printf("\n\n (c)Magnitude of the capacitor current Ic = %.0f A",Ic)
printf("\n\n (d)Capacitance, C = %.0f μF ",(C/1E-6))
printf("\n\n (d)kvar rating of the capacitor = %.2f kvar ",kvar)
|
e097577db93af47cec8c858f65f1548fb69fe38e | 44dccf35d0d05580e3fc20af3b7697b3c638d82d | /testcases/ocr/3.sce | 6074e59179b4b35d3d71919218676cecfce15ebf | [] | no_license | surirohit/Scilab-Image-Processing-Toolbox-Unclean | 213caacd69badd81ec0f99a800f44a2cf8f79b5d | 3a8057f8a8d05e7efd83704a0e732bdda23fa3a0 | refs/heads/master | 2020-04-09T07:31:20.042501 | 2016-06-28T09:33:57 | 2016-06-28T09:33:57 | 60,406,367 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 56 | sce | 3.sce | i = imread('test3.jpg');
result = ocr(i);
disp(result);
|
2132c42cde3dc850b132aeb397c06aaeec240f97 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1442/CH8/EX8.8/8_8.sce | 52244febd3f7f759a69764453dac335f2ed31fe7 | [] | 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 | 453 | sce | 8_8.sce | clc
//initialisation of variables
m1= 5 //kg
c1= 1.26 //kJ/kg K
m2= 20 //kg
c2= 4.19 //kJ/kg K
T1= 95 //C
T2= 25 //C
//CALCULATIONS
T= (m1*c1*T1+m2*c2*T2)/(m1*c1+m2*c2)
S1= m1*c1*log((273.15+T)/(273.15+T1))
S2= m2*c2*log((273.15+T)/(273.15+T2))
S= S1+S2
//RESULTS
printf (' change in entropy of billet = %.4f kJ/K',S1)
printf (' \n change in entropy of water= %.4f kJ/kg K',S2)
printf (' \n change in entropy of water= %.4f kJ/kg K',S)
|
06eeccd53f4d157bf4572a4b18a790233cf66cd6 | d590546a0877ac197ba2a6c65da314fa1c4a1c12 | /Software/Script/Scilab/ADCAsgard/viscosityair.sci | 3f19f2b2d11a812bdac70503f852fcef9d3f6f77 | [
"CC-BY-4.0"
] | permissive | JLJu/AirDataComputer | e0fe19ee9e8aa0b5914d9af8ab62cbc04a42c55d | 8576622349805733bdd1f97c069f8c948b5b8c05 | refs/heads/master | 2019-07-06T06:24:44.612648 | 2019-01-29T15:48:53 | 2019-01-29T15:48:53 | 167,345,821 | 0 | 0 | NOASSERTION | 2019-01-24T10:04:03 | 2019-01-24T10:04:02 | null | UTF-8 | Scilab | false | false | 158 | sci | viscosityair.sci | //Calculate viscosity. Sutherland's formula
function [viscosity]=viscosityair(T)
viscosity = 18.27*(291.15+120)/(T+120)*((T/291.15)^(3/2))*1e-6;
endfunction
|
626cd3733c6162237b33641e7cb19abbf2a1159b | 449d555969bfd7befe906877abab098c6e63a0e8 | /564/DEPENDENCIES/16_14data.sci | 97cd862f48720f4cf2bcc4bc70b682f5103d8d22 | [] | 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 | 42 | sci | 16_14data.sci | h=100;//in mm
t=2;//in mm
Mx=1000;//N.mm |
4da12f07fc9c46f892448b2565a51dc4f43fb9e0 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2837/CH11/EX11.7/Ex11_7.sce | 276471ec43ab469ee0878d845e1a13505e62a2a8 | [] | 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 | 277 | sce | Ex11_7.sce | clc
clear
//Initialization of variables
p1=40 //psia
t1=80 //F
p2=30 //psia
ar=0.5 //sq ft
v1=200 //ft/s
R=53.35
cp=0.24
g=32.17
J=778
t2=78 //F
//calculations
G=40 //lb/sq ft/sec
rho2=144*p2/(R*(t2+460))
v2=p1/rho2
//results
printf("Velocity = %d ft/s",v2)
|
e9076f0bb884fc124fbea16a5a583f51586aeb10 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3556/CH11/EX11.18/Ex11_18.sce | e4a6775567e4b6d572dbe4fd8076a23174742ded | [] | 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 | 768 | sce | Ex11_18.sce | clc
// Fundamental of Electric Circuit
// Charles K. Alexander and Matthew N.O Sadiku
// Mc Graw Hill of New York
// 5th Edition
// Part 2 : AC Circuits
// Chapter 11 : AC power Analysis
// Example 11 - 18
clear; clc; close;
//
// Given data
P = 300.0000;
Vrms = 13.0000;
pf = 0.8000;
Hours = 520;
Energy_Charge = 0.0600;
pf_penalty = 0.001;
pf_credit = 0.001;
// Calculations Energy Consumed
W = P * Hours;
// Calculations Delta Energy Consumed
Delta_W = (5*pf_penalty)*W;
// Calculation Total Energy Consumed
Wt = W + Delta_W;
// Calculations Cost Per Month
Cost = Energy_Charge * Wt;
//
disp("Example 11-18 Solution : ");
printf(" \n a. Cost = Cost For Month = %.3f Dollar",Cost)
|
e4384122dedcb84564a762cf770654695015e05c | 449d555969bfd7befe906877abab098c6e63a0e8 | /2360/CH5/EX5.12/ex5_12.sce | c3e818e55d657c16af37b84e677fce7e599342cc | [] | 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 | 391 | sce | ex5_12.sce | // Exa 5.12
format('v',7);clc;clear;close;
// Given data
P = 0.4;//power dissipation in each arm in W
Rarm = 150;// in ohm
//P = (I^2)*Rarm;
I = sqrt(P/Rarm);// in A
//Apply KVL to the loop ABCEFA, (-I*Rarm) - (I*Rarm) - (2*I) + 25 - (2*I*R) = 0;
R = ((-I*Rarm) - (I*Rarm) - (2*I) + 25)/(2*I);//required series resistance in ohm
disp(R,"The required series resistance in Ω is");
|
f4fb648f3fb01c161537599ca3fd6fb475c27962 | 4545588c8427debaf17f9dc71b0ace32f4fb5d67 | /avr32/services/dsp/dsplib/conception/operators/fixed_point_cos.sci | cb559a01ed3496da1b038cc69451a793c460d4ad | [] | no_license | eewiki/asf | 02e06cec0465b28dd689dea801e6be6cbcd47eca | 8d0f55bd089f2e68d2b53aa76adbb02c07cdb166 | refs/heads/master | 2021-01-16T18:20:22.690176 | 2015-03-09T05:42:50 | 2015-03-09T05:42:50 | 18,419,213 | 34 | 30 | null | 2014-12-25T05:13:20 | 2014-04-03T21:42:46 | C | UTF-8 | Scilab | false | false | 5,530 | sci | fixed_point_cos.sci | // Fixed point 16-bit cosine and sine
clear
function res=dsp32_k_cos(y)
pi = 3.1415926535897;
// Q1.31 emulation
y = y*2^31;
one = 1.0000000000e+00*2^31;
half = 0.61685027507*2^31; //0.5*(pi^2/8);
C1 = 0.50733903092*2^31; //pi^2*(4.1666667908e-02*pi^2)/8;
C2 = -0.16690785015*2^31; //(-1.3888889225e-03*pi^4)*(pi^2/8);
C3 = 0.02941632920*2^31; //(2.4801587642e-05*pi^6)*(pi^2/8);
C4 = -0.00322586085*2^31; //(-2.7557314297e-07*pi^8)*(pi^2/8);
C5 = 0.00024118485*2^31; //(2.0875723372e-09*pi^10)*(pi^2/8);
C6 = -0.00001295308*2^31; //(-1.1359647598e-11*pi^12)*(pi^2/8);
z = y*y/2^31;
produ = z*C6/2^31;
suma = C5 + produ;
produ = z*suma/2^31;
suma = C4 + produ;
produ = z*suma/2^31;
suma = C3 + produ;
produ = z*suma/2^31;
suma = C2 + produ;
produ = z*suma/2^31;
suma = C1 + produ;
r = z*suma/2^31;
res = one - ((half*z - (z*r)))/2^28;
res = res/2^31;
endfunction
function res=dsp32_k_sin(y)
pi = 3.1415926535897;
// Q1.31 emulation
y = y*2^31;
S0 = 0.78539816340*2^31; //pi/4;
S1 = -0.64596411675*2^31; //-1.6666667163e-01*pi^3/8;
S2 = 0.31877052162*2^31; //8.3333337680e-03*pi^5/8;
S3 = -0.07490806720*2^31; //-1.9841270114e-04*pi^7/8;
S4 = 0.01026823400*2^31; //2.7557314297e-06*pi^9/8;
S5 = -0.00092125426*2^31; //-2.5050759689e-08*pi^11/8;
S6 = 0.00005769937*2^31; //1.5896910177e-10*pi^13/8;
z = y*y/2^31;
v = z*y/2^31;
produ = z*S6/2^31;
suma = S5 + produ;
produ = z*suma/2^31;
suma = S4 + produ;
produ = z*suma/2^31;
suma = S3 + produ;
produ = z*suma/2^31;
suma = S2 + produ;
produ = z*suma/2^31;
suma = S1 + produ;
produ = v*suma/2^30;
suma = S0*y/2^31 + produ;
res = suma/2^29;
endfunction
// [-2*pi 2*pi] => [-1 1]
function res=dsp32_sin(angle)
// convertion from float to Q1.15
pi = 3.1415926535897;
x = angle/(pi);
x = x;
// Input of this function is in binary angular measure format (Q15
// with the full -1 to 1 range representing -pi to pi). */
// Determine the quadrant the input resides in
temp = (x + 0.25)
n = abs(int(temp));
// printf("%f\t", temp/2^15);
// n = temp
//temp=abs(x) + 0.25*2^15;
// n = int(abs(int((temp + 0.25*2^15)/2^14)));
// translate input down to +/- pi/4
x = modulo(x - n * 0.5, 1);
// printf("%f %f\t", n, x/2^15);
// call the appropriate function given the quadrant of the input
// printf("%f\t", x);
if n == 0 then
res = dsp32_k_sin(x);
elseif n == 1 then
res = dsp32_k_cos(x);
elseif n == 2 then
res = -dsp32_k_sin(x);
elseif n == 3 then
res = -dsp32_k_cos(x);
else
res = dsp32_k_sin(x);
end
// printf("%f\t", res);
endfunction
function res=dsp32_cos(angle)
pi = 3.1415926535897;
res = dsp32_sin(angle + pi/2);
endfunction
// Input angle from -pi/4 to pi/4
function res=dsp16_k_sin(y)
// series coefficients, tweaked with Chebyshev
s1 = 0.785369873046875*2^15; //0x6487;
s3 = 0.322784423828125*2^15; //0x2951;
s5 = 0.03875732421875*2^15; //0x4f6;
z = (y * y)/2^12;
produ = (z * s5)/2^16;
suma = s3 - produ;
produ = (z * suma)/2^16;
suma = s1 - produ;
res=(y * suma)/2^13;
endfunction
function res=dsp16_k_cos(y)
c0 = 1.*2^15; //0x7fff;
c2 = 0.61651611328125*2^15; //0x4eea;
c4 = 0.1231689453125*2^15; //0x0fc4;
z = (y * y)/2^12;
produ = (z * c4)/2^16;
suma = c2 - produ;
produ = (z * suma)/2^15;
res = (c0 - produ);
endfunction
// [-2*pi 2*pi] => [-1 1]
function res=dsp16_sin(angle)
// convertion from float to Q1.15
pi = 3.1415926535897;
x = angle/(pi);
x = x*2^15;
// Input of this function is in binary angular measure format (Q15
// with the full -1 to 1 range representing -pi to pi). */
// Determine the quadrant the input resides in
temp = (x + 0.25*2^15)
if temp > 0 then
n = abs(int(temp/2^14));
else
n = 3 - abs(int(temp/2^14));
end
printf("%f\t", temp/2^15);
// n = temp
//temp=abs(x) + 0.25*2^15;
// n = int(abs(int((temp + 0.25*2^15)/2^14)));
// translate input down to +/- pi/4
x = modulo(x - n * 0.5*2^15, 2^16);
printf("%f %f\t", n, x/2^15);
// call the appropriate function given the quadrant of the input
if n == 0 then
res = dsp16_k_sin(x)/2^15;
elseif n == 1 then
res = dsp16_k_cos(x)/2^15;
elseif n == 2 then
res = -dsp16_k_sin(x)/2^15;
elseif n == 3 then
res = -dsp16_k_cos(x)/2^15;
else
res = dsp16_k_sin(x)/2^15;
end
endfunction
function res=dsp16_cos(angle)
pi = 3.1415926535897;
res = dsp16_sin(angle + pi/2);
endfunction
pi = 3.1415926535897;
err_cos_moy = 0;
err_cos_max = 0;
for i=-pi/2:0.01:pi/2,
err = abs((dsp32_cos(i) - cos(i)));
err_cos_moy = err_cos_moy + err;
if err > err_cos_max then
err_cos_max = err;
end
end
err_cos_moy = err_cos_moy/length(-pi:0.1:pi);
printf("Error average for cosinus:\t%.10f\n", err_cos_moy);
printf("Error maximum for cosinus:\t%.10f\n", err_cos_max);
disp('');
err_sin_moy = 0;
err_sin_max = 0;
for i=-pi/2:0.01:pi/2,
err = abs((dsp32_sin(i) - sin(i)));
err_sin_moy = err_sin_moy + err;
if err > err_sin_max then
err_sin_max = err;
end
end
err_sin_moy = err_sin_moy/length(-pi:0.1:pi);
printf("Error average for sinus:\t%.10f\n", err_sin_moy);
printf("Error maximum for sinus:\t%.10f\n", err_sin_max);
|
ce44201b886ab0f2b6261278688c34255b8bc84d | 449d555969bfd7befe906877abab098c6e63a0e8 | /1466/CH23/EX23.2/23_2.sce | 7dd736f6077cb2de4c97cc67a5dabca57ad674da | [] | 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 | 613 | sce | 23_2.sce |
clc
//initialisation of variables
g= 32.2 //ft/sec^2
h= 50 //ft
vd= 5 //ft/sec
A= 60 //degrees
//CALCULATIONS
R= h+(vd^2/(2*g))
x=poly(0,"x")
vec=roots(x^2-(2*vd/tand(A))*x-R*g)
v1= vec(1)
V1= sqrt(4*vd^2+(v1-((2*vd)/tand(A)))^2)
H1= 0.5*(h+(vd^2/(2*g))-vd-(V1^2/(2*g)))+11.1
H= V1^2/(2*g)
b= atand(2*vd/(2*vd/tand(A)))/4
//RESULTS
printf ('velocity of the wheel at exit = %.2f ft/sec',v1-0.04)
printf ('\n Pressure head at outlet = %.1f ft of water',H1)
printf ('\n velocity head at exit from the vessel = %.1f ft of water',H-0.1)
printf ('\n inclination of guide vanes = %.f degrees',b)
|
e5d100842eb6c1edf97b484f88e47fe77c08da8b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3888/CH16/EX16.1/Ex16_1.sce | 7666d1725ae645e08499c8a97dc64ca7f84e29ed | [] | 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,666 | sce | Ex16_1.sce | //Electric Power Generation, Transmission and Distribution by S.N.Singh
//Publisher:PHI Learning Private Limited
//Year: 2012 ; Edition - 2
//Example 16.1
//Scilab Version : 6.0.0 ; OS : Windows
clc;
clear;
V=238; //Transformer primary voltage in kV
Em=110; //Transformer secondary voltage in kV
f=50; //Supply frequency in Hz
u=20; //Commutation angle in degree
alpha1=30; //Delay angle 1 in degree
alpha2=90; //Delay angle 2 in degree
alpha3=150; //Delay angle 3 in degree
Vdo=3*sqrt(3*2)*Em/(%pi*sqrt(3)); //Direct output voltage in kV
Vd1=Vdo/2*(cosd(alpha1)+cosd(alpha1+u)); //Direct output voltage when commutation angle 20 and delay angle is 30 degree in kV
Vd2=Vdo/2*(cosd(alpha2)+cosd(alpha2+u)); //Direct output voltage when commutation angle 20 and delay angle is 90 degree in kV
Vd3=Vdo/2*(cosd(alpha3)+cosd(alpha3+u)); //Direct output voltage when commutation angle 20 and delay angle is 150 degree in kV
printf("\nThe direct voltage output is %.2f kV",Vdo);
printf("\nThe direct voltage output when commutation angle 20 and delay angle is 30 degree is %.2f kV",Vd1);
printf("\nThe direct voltage output when commutation angle 20 and delay angle is 90 degree is %.2f kV",Vd2);
printf("\nThe direct voltage output when commutation angle 20 and delay angle is 150 degree is %.2f kV",Vd3);
|
369cd5475c11485731ebe90f0d60abca2dc4104d | 449d555969bfd7befe906877abab098c6e63a0e8 | /2708/CH1/EX1.26/ex_1_26.sce | ef640304b0640bc76245720ef31a03a8d6c7cdd8 | [] | 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 | 342 | sce | ex_1_26.sce | //Example 1.26 // thickness of flim
clc;
clear;
//given data :
u=1.5;// refractive index of flim between lens and plate
m=10;//no. of fringes shifted in experiment
w=5890D-10;// wavelength of light used in m
t=m*w/(2*(u-1));// thickness of plastic flim in m
t=t*1D9;// to convert in nm
disp(t,"thickness of flim in nm(nanometer)")
|
ca937d5045d70ea7a21bd8e239471c6963bb25a2 | 449d555969bfd7befe906877abab098c6e63a0e8 | /416/CH2/EX2.14/exp2_14.sce | 148e8324973dc0b04178938e42f2418b72f7c0f9 | [] | 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,154 | sce | exp2_14.sce | clc
disp("example 2.14")
disp("(a)")
//given
transformer1.motorload=300;transformer1.demandfactorm=0.6;tarnsformer1.commercialload=100;transformer1.demandfactorc=0.5;transformer1.diversityfactor=2.3;transformer2.residentalload=500;transformer2.demandfactor=0.4;transformer2.diversitryfactor=2.5;transformer3.residentalload=400;transformer3.demandfactor=0.5;transformer3.diversityfactor=2.0;diversitybtwxmer=1.4
peakloadoftransformer1=((transformer1.motorload*transformer1.demandfactorm)+(tarnsformer1.commercialload*transformer1.demandfactorc))/transformer1.diversityfactor
peakloadonxmer=(transformer2.residentalload*transformer2.demandfactor)/transformer2.diversitryfactor
peakloadonxmer3=(transformer3.residentalload*transformer3.demandfactor)/(transformer3.diversityfactor)
printf("peak load on transformer 1 =(300x0.6+100x0.5)/2.3 =%dkW \npeak load on transformer 2 =%dkW \n peak load on transformer 3 =%dkW",peakloadoftransformer1,peakloadonxmer,peakloadonxmer3)
disp("(b)")
peakloadonfeeder=(peakloadoftransformer1+peakloadonxmer+peakloadonxmer3)/diversitybtwxmer
printf("peak load on feeder =(100+80+100)/1.4 =%dkW",peakloadonfeeder)
|
3a6ecd30a2fa069f945036fb5b6f91c383a66351 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1499/CH2/EX2.5/q5.sce | 7396e52e6742d95a1ccd4bc0bf3215807f73ff09 | [] | 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 | 285 | sce | q5.sce |
s=%s; // first create a variable
Wn=%Wn;
Wd=%Wd;
num=1;
den=10*s+s^2;
TF=syslin('c',num,den)
[wn,z] = damp(TF)
zeta=z/(2*wn)
ts=4/(zeta*wn)
t=linspace(0,5,500);
step_res=csim('step',t,TF);
plot(t,step_res)
xgrid()
xtitle('Step response','time','response');
|
d1395a6d7efe70f6826ad3a17f7b2edc5be770a7 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3718/CH14/EX14.3/Ex14_3.sce | 28b38ff57eacb0f6f6a15152ee0939ff0a2b558a | [] | no_license | FOSSEE/Scilab-TBC-Uploads | 948e5d1126d46bdd2f89a44c54ba62b0f0a1f5e1 | 7bc77cb1ed33745c720952c92b3b2747c5cbf2df | refs/heads/master | 2020-04-09T02:43:26.499817 | 2018-02-03T05:31:52 | 2018-02-03T05:31:52 | 37,975,407 | 3 | 12 | null | null | null | null | UTF-8 | Scilab | false | false | 421 | sce | Ex14_3.sce | //Chapter 14: Water Treatment
//Problem: 3
clc;
//Initialisation of Variables
wt1 = 32.4 //in mg/L
wt2 = 29.2 //in mg/L
wt3 = 13.5 //in mg/L
//Solution
temp_h = wt1 * 100 / 162. + wt2 * 100 / 146. //where temp_h is temporary hardness
perm_h = wt3 * 100 / 136. //where perm_h is permanent hardness
mprintf("Temporary hardness: %.2f mg/L\n",temp_h)
mprintf(" Total hardness: %.2f mg/L",perm_h)
|
852f066dab3731a71aa8cbdd066af82845aa92b4 | 449d555969bfd7befe906877abab098c6e63a0e8 | /858/CH2/EX2.12/example_12.sce | 0108a5adc07f405a2a10d975885f9b673939c84a | [] | 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 | 384 | sce | example_12.sce | clc
clear
printf("example 2.12 page number 74\n\n")
//to find the vapor pressure of water
w_water=540 //in gm
w_glucose=36 //in gm
m_water=18; //molar mass of water
m_glucose=180; //molar mass of glucose
x=(w_water/m_water)/(w_water/m_water+w_glucose/m_glucose);
p=8.2*x;
depression=8.2-p;
printf("depression in vapor pressure = %f Pa",depression*1000)
|
9daaa175d80737d7eb3db9de7c58cb7490c164f5 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3769/CH18/EX18.7/Ex18_7.sce | bddf5c5d0ae2f789a5ebeeac9f0d79d40485fc8a | [] | 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 | 159 | sce | Ex18_7.sce | clear
//Given
uv=1.68
ur=1.56
A=18 //degree
//Calculation
A1=A*(uv-ur)
//Result
printf("\n Angular dispersion is %0.3f Degree", A1)
|
1fdf2d3f047d8ff5a984892fabc3872dba6df30c | 449d555969bfd7befe906877abab098c6e63a0e8 | /3689/CH9/EX9.3/9_3.sce | cda296edf9b79ac7a7026571b5c261ce3d005baa | [] | 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 | 615 | sce | 9_3.sce | ////Variable Declaration
nb = 5.00 //Number of moles of Benzene, mol
nt = 3.25 //Number of moles of Toluene, mol
T = 298.15 //Temperature, K
R = 8.314 //Ideal Gas Constant, J/(mol.K)
P0b = 96.4 //Vapor pressure of Benzene, torr
P0t = 28.9 //Vapor pressure of Toluene, torr
//Calculations
n = nb + nt
xb = nb/n
xt = 1. - xb
P = xb*P0b + xt*P0t
y = (P0b*P - P0t*P0b)/(P*(P0b-P0t))
yt = 1. -y
//Results
printf("\n Total pressure of the vapor is %4.1f torr",P)
printf("\n Benzene fraction in vapor is %4.3f ",y)
printf("\n Toulene fraction in vapor is %4.3f ",yt)
|
7a394823cbe1ae040509fc8c751db30ab8b34300 | bb960ba6d38506687dde494d17d7650d4ee64969 | /scilab/commandeOptimale.sce | 043be5e4b96bb22af8a30c41bc32db2ba1248f41 | [] | no_license | cgorrieri/Polytech_Lunar_launder | 6e24ac50a2979ec4295113e8ecc2fe652430f171 | e9cce1510ab77d89d4f1e65a4d54a5bfdae64a0a | refs/heads/master | 2021-01-10T13:34:48.618587 | 2013-06-06T13:50:43 | 2013-06-06T13:50:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 1,317 | sce | commandeOptimale.sce | //script ‘commandeOptimale.sce’
// équations de Lunar Lander en temps continu
Te=0.04 // (s) période d'échantillonnage
mvide= 6839; // masse à vide (kg)
mfuel=816.5 // masse de carburant (kg)
m = mvide + mfuel // masse totale
ve=4500; // vitesse d'éjection des gaz (en m/s),
erg = ve/m; // coefficient de poussée
maxThrust = 50; //débit de carburant maximum (en kg/s)
g= 1.6; // attraction lunaire (en m/s^2)
x0=[45, 1, 51, -1]'; // état initial de Lunar Lander
A= [0, 1, 0, 0
0, 0, 0, 0
0, 0, 0, 1
0, 0, 0, 0]; // matrice d'état (4x4)
B=[0, 0
erg, 0
0, 0
0, erg]; // matrice de commande, 2 commandes
C=eye(4,4); // matrice d'observation, quatre sorties
D=zeros(4,2); //matrice de couplage entrée sortie
lem=syslin('c',A,B,C,D);
// discretisation du processus d'alunissage
lemd=dscr(lem,Te);
ad=lemd('a');
bd=lemd('b');
// calcul de la loi de commande
funcprot(0) //pour redéfinir ‘riccati’ sans warning
//exec('riccati.sci');
H=100; //horizon
Q=0*eye(4,4); // poids de l'écart quadratique
R=eye(2,2) // poids de l'énergie de commande
[K,P0]=riccati(H,ad,bd,R,Q);
//
//écrire K dans le fichier 'K.txt'
fileid='K.txt'
fp=mopen(fileid,'w');
Kt=K';
Ks=string(K(1));
for k=2:length(K),
Ks=Ks+','+string(Kt(k));
end
mputstr(Ks,fp);
mclose(fp); |
079d11dfa5426b026d1162e19c2f38724915fa77 | 449d555969bfd7befe906877abab098c6e63a0e8 | /3754/CH10/EX10.18/10_18.sce | c20bde19f69611ab9b4f4242ce338138572d275d | [] | 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 | 403 | sce | 10_18.sce | clear//
//Variables
RH = 160 //Hall coeffficient (in cubic-centimeter per Coulomb)
p = 0.16 //Resistivity (in ohm-centimeter)
//Calculation
sig = 1/p //Conductivity (in per ohm-centimeter)
un = sig * RH //Electron mobility (in cmentimeter-square per volt-second)
//Result
printf("\n Electron mobility is %0.3f cm**2/V-s.",un)
|
d1901432fd4c2a1e6eace766fc14d6fcd0435a26 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1439/CH14/EX14.8/14_8.sce | 27d4fe94f39679d387850835cf4c714ba8ee1133 | [] | 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 | 196 | sce | 14_8.sce | clc
//initialisation of variables
E= -0.126 //volt
E1= -0.140 //volt
n=2
R= 0.0591 //volt
//CALCULATIONS
E0= E-E1
K= 10^((E-E1)*n/R)
//RESULTS
printf ('equilibrium constant = %.2f ',K)
|
03fe3d1001bb93c198859d3bdd8a984b6cec23a3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /991/CH17/EX17.1/Example17_1.sce | e3b94b77c0f67f68698150f89fbc40d2b6689134 | [] | 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,048 | sce | Example17_1.sce | //Example 17.1.
clc
format(5)
disp("We know that")
disp(" fo = 1 / (2.303*RE*CE*log10(1/1-eta))")
disp("We know that etamin = 0.56")
disp("For determining RE, we have")
RE=(20-2.9)/(1.6) // in k-ohm
disp(RE,"RE < VBB-VP/IP, i.e. RE(k-ohm) < 20-2.9/1.6*10^-3 =")
RE=(20-1.118)/(3.5) // in k-ohm
disp(RE,"RE > VBB-VV/IV, i.e. RE(k-ohm) < 20-1.118/3.5*10^-3 =") // answer in textbook is wrong
disp("Therefore, RE is selected as 10 k-ohm")
disp(" 1/500 = 2.303*10*10^3*CE*log10(1/1-0.56)")
CE=1/(500*(2.303*10^4)*0.36) // in farady
x1=CE*10^6 // in uF
disp(x1,"Therefore, CE(uF) =")
disp("So, CE is selected as 0.22 uF")
disp("Let the required pluse voltage at B1 = 5V")
disp("Let the peak pulse current, IE = 250 mA")
R1=5/(250*10^-3) //in ohm
disp(R1,"Therefore, R1(ohm) = VR1/IE =")
disp("So, R1 is selected to be 22 ohm")
disp("We select the voltage characteristics for VB1B2 = 4 V")
disp("Therefore, VR2 = 20-(4+5) = 11 V")
R2=11000/250
disp(R2," R2(ohm) = 11*10^3/250 =")
disp("So, R2 is selected as 100 ohm") |
6992fc12e34359978b183bbb05bcc17c392b95f6 | 449d555969bfd7befe906877abab098c6e63a0e8 | /1382/CH2/EX2.37.b/EX_2_37_b.Sce | 50619b2d9df93b62c8737b55d19681464ec50335 | [] | 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 | 542 | sce | EX_2_37_b.Sce | // Example 2.37.b:baising component
clc;
clear;
close;
Vb=1.6;//
Ve=1;//
Vcc=12;// Colector voltage in volts
Beta=180;
Ieq=2;// Emiier current in mA
Rc=1;// Collector resistance in killo ohms
Vbe=0.6;// Base to emitter voltage in volts
Vceq=6;// Collector to emitter voltage in volts
Ic= (Vcc-Vceq-Ve)/Rc;
Ib=Ic/Beta;
Ie=Ic+Ib*10^-3;//emitter current in milli ampere
Re= (Ve/Ie);//emitter resistance in killo ohms
Ir2= 10*Ib;
R2= (Ve+Vbe)/Ir2;//
Ir1=Ir2+Ib;//
R1=((Vcc-Vb)/Ir1);//
disp (R2," RESISTANCE IN KILLO OHMS")
|
05c2766fa3552344153de83318f9f4e34e5908b0 | 8627886261b3eddf8440c0b470cd9ee25c762d97 | /сайлаб/2_lab_rabota.sce | f481c73d398d303f5e532de91f93014f573acab0 | [] | no_license | timurzotov/pvis | ba75cf86fae91b6adc8dd3fe9cd2672eea561cca | d60e8e241d6ce0ad3a9b2a75c8771f92a9b039ba | refs/heads/master | 2020-09-08T07:59:31.719500 | 2019-11-11T21:14:13 | 2019-11-11T21:14:13 | 221,070,925 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 141 | sce | 2_lab_rabota.sce | Startup execution:
loading initial environment
Start quapro toolbox
Load macros
Load gateways
Load help
Execution done.
|
4241ef3b79ab02c0aaf3b44bcaf049102497f7e1 | efc2fec9dd841d0ca834702c904e00c52762a9f9 | /isEpipoleInImage/isEpipoleInImage5.sce | b3dbef53f315275d7156d8ffc594200ce503b180 | [] | no_license | surajch77/Scilab-Computer-Vision-Toolbox-TestCases | 64c8e0382e8b9d416c4c27c1ed4272f49bf45b51 | 969f9bcddefea05b42c623aeebe2e0cdcffd6eeb | refs/heads/master | 2021-01-20T20:24:14.345296 | 2016-06-29T15:16:52 | 2016-06-29T15:16:52 | 61,932,313 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 196 | sce | isEpipoleInImage5.sce | f = [0.0000 -0.0004; 0.0004 0.0000 ; -0.0425 0.0993 ];
imageSize = [200, 300];
[isIn,epipole] = isEpipoleInImage(f,imageSize)
/// output
/// Invalid size of fundamental matrix
|
1e5f61247afa57c47ff91ec86cad2aee56915d88 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2417/CH6/EX6.17/Ex6_17.sce | 531651dc76e2aac58c14f5050c2294668ebfac41 | [] | 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,118 | sce | Ex6_17.sce | clear;
clc;
printf("\t\t\tProblem Number 6.17\n\n\n");
// Chapter 6: The Ideal Gas
// Problem 6.17 (page no. 261)
// Solution
//data of problem6.16
cp=0.24; //Specific heat at constant pressure //Btu/lbm*R
p2=15; //psia //final pressure
p1=100; //psia //initial pressure
T2=460+0; //absolute final temperature //unit:R
T1=460+100; //absolute initial temperature //unit:R
J=778; //conversion factor
R=1545/29; //moleculer weight=29 //Unit:ft*lbf/lbm*R //constant of proportionality
//Because cp and R are given,let us first solve for cv,
//cp=(R*k)/(J*(k-1))
k=(cp*J)/((cp*J)-R); //k=cp/cv //ratio of specific heats
printf("Ratio of specific heats k is %f\n",k);
//k=cp/cv
cv=cp/k; //Specific heat at constant volume //Btu/lbm*R
printf("Specific heat at constant volume is %f Btu/lbm*R\n",cv);
//Now, deltas=(cv*log(p2/p1))+(cp*log(v2/v1));
//But, v2/v1=(T2*p1)/(T1*p2)
v2byv1=(T2*p1)/(T1*p2); // v2/v1 //unitless
deltas=(cv*log(p2/p1))+(cp*log(v2byv1)); //The change in enthalpy //unit:Btu/lbm*R
printf("The change in enthalpy is %f Btu/lbm*R\n",deltas);
//The agreement is very good.
|
af77645b9f259ef9cf3443fbb275ef1ca570de27 | b26cbe6bc3e201f030705aaf9eb82da94def231f | /tests/matrix_arithm-003.tst | 157abee81bb6e7e695c76576e399e4b957306bae | [] | no_license | RP-pbm/Recurrence-plot | f86c5cd85460661b01a609f8f4281d2cda6b4e07 | b5da95f9b30c1a924a002102219bf0a2ad47df2c | refs/heads/master | 2022-07-24T12:11:34.163543 | 2022-07-09T19:32:43 | 2022-07-09T19:32:43 | 92,934,698 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 21 | tst | matrix_arithm-003.tst | ../inputs/mini-09.ssv |
5e2640a21d9b8347aab321b10e3b5367f2942c2d | 6341d86b6e2b6f82a073d49238eec966922e0e5c | /60002190033_DHRUVIN DUNGRANI_SCILAB_6.sce | a6f7bb3e4d9ba9184f8573c3097d4312ba2b7d22 | [] | no_license | Dhruvin2801/60002190033_DHRUVIN-DUNGRANI_SS-EXPS | cbf69afc790659ef6579d6a7a90e4f687e5fd2a0 | 41ca58e8fc510b423afcb3b940f46f08b8b06a6c | refs/heads/main | 2023-01-24T16:18:47.396727 | 2020-11-25T17:24:56 | 2020-11-25T17:24:56 | 315,966,537 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 382 | sce | 60002190033_DHRUVIN DUNGRANI_SCILAB_6.sce | clc;
n=0:1:100;
fs=50;
T=1/fs;
t=n*T;
figure;
x1=cos(2*%pi*5*t);
plot2d3(n,x1);
figure;
x2=cos(2*%pi*45*t);
plot2d3(n,x2);
figure;
x3=cos(2*%pi*55*t);
plot2d3(n,x3);
x = input ( ' Enter the input sequence e := ' );
m = length (x);
n = 0 :1: m;
c1=mtlb_fliplr(x);
c=mtlb_fliplr(x(2:m));
x1=[c x(1)];
disp("Folded sequence is:",x1);
y=mtlb_fliplr(-n);
|
106fdec1a4e883fb4460ea35854eddc50d60dd08 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2444/CH7/EX7.15/ex7_15.sce | 260445514c9d85e0639430240dd179c9b9772d3d | [] | 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 | 330 | sce | ex7_15.sce | // Exa 7.15
clc;
clear;
close;
format('v',5)
// Given data
R1 = 20;// in k ohm
R1 = R1 * 10^3;// in ohm
R2 = R1;// in ohm
R = R1;// in ohm
C1 = 1000;// in pF
C1 = C1 * 10^-12;// in F
C2 = C1;// in F
C = C1;// in F
f = 1/(2*%pi*R*C);// in Hz
f= f*10^-3;// in kHz
disp(f,"The frequency of oscillations in kHz is");
|
bc7f1fd4e2861d331474b1e149d90fc6cd0dbdea | 71d54633f021afa4ce6a2e31d42a6815af1261b2 | /Uebung/SFTI-15-Ue1.sce | ac83fd87dc8aab28d31bc406d1361808cfd323c8 | [] | no_license | RailProfAC/Schienenfahrzeugtechnik1 | 0497247fb78ce337fffbed0ac285901a6e10678b | 27f334a0b3f9c98ad2ab3ec3681a238643f3f19d | refs/heads/master | 2021-06-11T02:45:55.683540 | 2018-04-05T05:07:10 | 2018-04-05T05:07:10 | 128,161,756 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 304 | sce | SFTI-15-Ue1.sce | delete(gcf())
clear
m = 50;
xA = 0.2;
D = 0.025;
d = 0.0;
az = 1.3;
Wax = %pi/32*(D^4 - d^4)/D;
My = m*az*9.81*xA;
sigma = My/Wax;
disp('Wax = ' + msprintf('%5.3f', 1e9*Wax) + "mm^3");
disp('My = ' + msprintf('%3.5f', My) + "Nm");
disp('Sigma = ' + msprintf('%3.5f', 1e-6*sigma) + "N/mm^2");
|
ad8df0a24d690c1761274d86ea31c4a0197934b0 | 717ddeb7e700373742c617a95e25a2376565112c | /191/CH6/EX6.4/Example6_4.sce | 58ccab6b6620aa7df3ffa913bece89fc2680ac8d | [] | no_license | appucrossroads/Scilab-TBC-Uploads | b7ce9a8665d6253926fa8cc0989cda3c0db8e63d | 1d1c6f68fe7afb15ea12fd38492ec171491f8ce7 | refs/heads/master | 2021-01-22T04:15:15.512674 | 2017-09-19T11:51:56 | 2017-09-19T11:51:56 | 92,444,732 | 0 | 0 | null | 2017-05-25T21:09:20 | 2017-05-25T21:09:19 | null | UTF-8 | Scilab | false | false | 738 | sce | Example6_4.sce | //Newton Cotes formula
clc;
clear;
close();
format('v',9);
funcprot(0);
disp('Integral 0 to PI/4 x*cos dx');
disp('based on open Newton-Cotes formulas ');
deff('[y]=f(x)','y=x*cos(x)');
k = [0 1 2 3]
a = 0;
b = %pi/4;
h = (ones(:,4)*(b-a))./(k+2);
x0 = a+h;
xk = b-h;
k(1) = 2*h(1)*f(h(1));
disp(k(1),'k=0');
k(2) = 3*h(2)*(f(h(2))+f(2*h(2)))/2;
disp(k(2),'k=1');
k(3) = 4*h(3)*(2*f(h(3))-f(2*h(3))+2*f(3*h(3)))/3;
disp(k(3),'k=2');
k(4) = 5*h(4)*(11*f(h(4))+f(2*h(4))+f(3*h(4))+11*f(4*h(4)))/24;
disp(k(4),'k=3');
exact = integrate('x*cos(x)','x',0,%pi/4);
disp(exact,'The exact value of intergation is :');
exact = ones(:,4)*exact;
err = exact-k;
disp(err','thus corresponding errors are : '); |
04738afb9dcc8593108a4592f795c11665758d25 | 8217f7986187902617ad1bf89cb789618a90dd0a | /browsable_source/2.0/Unix/scilab-2.0/tests/corr.tst | fe4412ca1e51bd306a1eb32a330a5bff4af7ca88 | [
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-warranty-disclaimer",
"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 | 962 | tst | corr.tst | Eps=100*%eps;
rand('normal')
x=rand(1,256);
y=-x;
deff('[z]=xx(inc,is)',...
'z=x(is:is+inc-1)')
deff('[z]=yy(inc,is)',...
'z=y(is:is+inc-1)')
comp(xx),comp(yy)
[c,mxy]=corr(x,y,32);
x=x-mxy(1)*ones(x);
y=y-mxy(2)*ones(y);
if abs(sum(x))> Eps then pause,end
if abs(sum(y))> Eps then pause,end
c1=corr(x,y,32);
c2=corr(x,32);
if norm(c1+c2,1)> Eps then pause,end
[c3,m3]=corr('fft',xx,yy,256,32);
if norm(c1-c3,1)> Eps then pause,end
[c4,m4]=corr('fft',xx,256,32);
if norm(m3,1) > Eps then pause,end;
if norm(m4,1) > Eps then pause,end;
if norm(c3-c1,1) > Eps then pause,end;
if norm(c4-c2,1) > Eps then pause,end;
x1=x(1:128);x2=x(129:256);
y1=y(1:128);y2=y(129:256);
w0=0*ones(1:64); //on veut 32 coeffs
[w1,xu]=corr('u',x1,y1,w0);
w2=corr('u',x2,y2,w1,xu);
zz=real(fft(w2,1))/256;c5=zz(1:32);
if norm(c5-c1,1) > Eps then pause,end;
[w1,xu]=corr('u',x1,w0);
w2=corr('u',x2,w1,xu);
zz=real(fft(w2,1))/256;c6=zz(1:32);
if norm(c6-c2,1) > Eps then pause,end;
|
7c10956283f2ab3324de9745ff223bc432a6070b | 449d555969bfd7befe906877abab098c6e63a0e8 | /3129/CH7/EX7.3/Ex7_3.sce | 64f79aa69dbf1d399fb64b3aa048ad87e21ea13a | [] | 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 | 888 | sce | Ex7_3.sce | //Finding the Voltage sharing of Series Connected Thyristors
//Example 7.3(Page No- 337)
clc
clear
//given data
n_s = 10;
Vs = 15*10^3;//V
del_Id = 10*10^-3;//A
Id2 = 10*10^-3;//A
del_Q = 150*10^-6;//C
Q2 = del_Q;
R = 56*10^3;//Ohm
C1 = 0.5*10^-6;//C
//part(a)
//the maximum steady state voltage sharing
V_DSmax = ((Vs+(n_s-1)*R*Id2)/n_s);
printf('(a) Maximum seady-state voltage sharing is %d V',V_DSmax);
//part(b)
//steady state drafting factor
DRF = 1-(Vs/(n_s*V_DSmax));
printf('\n (b) The steady state derating factor is %.2f%%',DRF*100);
//part(c)
//maximium transient voltage sharing
V_DTmax = (1/n_s)*(Vs + ((n_s-1)*Q2/C1));
printf('\n (c) The maximum transient voltage sharing is %d V',V_DTmax);
//part(d)
//transient derating factor is
DRF = 1-(Vs/(n_s*V_DTmax));
printf('\n (d) The maximum transient derating factor is %.2f %%',DRF*100);
|
76a4ea1f9790ac8709fc6f1f9a1936eff14c80dc | 449d555969bfd7befe906877abab098c6e63a0e8 | /3871/CH16/EX16.12/Ex16_12.sce | 00cff751fac0a9e75a2c00cc3bcaf4b2fc52f141 | [] | 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 | 469 | sce | Ex16_12.sce | //=====================================================================================
//Chapter 16 example 12
clc;clear all;
//variable declaration
fx = 1000; //frequency of horizontal input in Hz
Pv = 2; //pointsof tangency to vertical line
Ph = 5; //pointsof tangency to horizontal line
//calculations
fy = fx*(Ph/(Pv)); //frequency ofvertical input in Hz
//result
mprintf("frequency ofvertical input = %3.2f Hz",fy);
|
ab819c54bc55d18f43e10f7e388d33b17abc1ed9 | 449d555969bfd7befe906877abab098c6e63a0e8 | /2795/CH2/EX2.8/Ex2_08.sce | 7a93a85c53268cc63223157270af38aeef4f41d7 | [] | 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 | Ex2_08.sce | // Scilab Code Ex2.8 : Page-57 (2013)
clc; clear;
f0 = 1; // For simplicity assume frequency of the signals sent by Frank, Hz
// Outbound trip
bita = -0.8; // Boost parameter for receding frames
f = sqrt(1+bita)/sqrt(1-bita)*f0; // The frequency of the signals received by Mary in outbound trip, Hz
printf("\nThe frequency of the signals received by Mary in outbound trip = f0/%d", ceil(f*9));
// Return trip
bita = +0.8; // Boost parameter for approaching frames
f = sqrt(1+bita)/sqrt(1-bita)*f0; // The frequency of the signals received by Mary in return trip, Hz
printf("\nThe frequency of the signals received by Mary in return trip = %df0", f);
// Result
// The frequency of the signals received by Mary in outbound trip = f0/3
// The frequency of the signals received by Mary in return trip = 3f0 |
3bb5b8d8b5e487b42d7b91cb2fc3b6da9bfef94b | 449d555969bfd7befe906877abab098c6e63a0e8 | /339/CH1/EX1.4/ex1_4.sce | 8386964c06235b571a30e1095be8b01def36b22a | [] | 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 | 546 | sce | ex1_4.sce | f=10^6:10^7:10^10;
mu0=4*%pi*10^-7;
rs=(4.8*10^-6).*sqrt(f);
re=(33.9*10^12) ./f;
c=47*10^-12;
w=2*%pi.*f;
l=2*1.25*10^-2;
a=2.032*10^-4;
temp=log(2*l/a)/log(%e);
lex=mu0*l*(temp-1)/(2*%pi); //external inductance
z=1 ./(1 ./re +w*c*%i)+rs+w.*lex*%i; // impedance of frequency dependent capacitor
zideal=1 ./(w*c*%i); //impedance of an ideal capacitor
plot2d("gll",f,abs(z));
plot2d(f,abs(zideal));
title("Frequency responce of a high frequency capacitor");
xlabel('Frequency (f) in Hz');
ylabel('Absolute impedance (|Z|) in ohms'); |
7dbfff42467811925ecdaf68d023f04d6816c02a | 7c74252476ecbb33ff6b44b6360b314586cc345e | /MoyenneGlissante.sci | 451581f6bd663b2f7346566953b9f0628d3f5f56 | [] | no_license | Gaetan43/Scilab-Master-2-PFV | 5d254ab060ba0096660f38ed64a0717d2a88adf5 | cd890518af755e905f2089a8cfcc1d5a438f3492 | refs/heads/master | 2020-04-22T10:10:37.229172 | 2019-02-12T10:15:00 | 2019-02-12T10:15:00 | 170,296,003 | 0 | 0 | null | null | null | null | UTF-8 | Scilab | false | false | 273 | sci | MoyenneGlissante.sci | function [Y,offset] = MoyenneGlissante(N, speed)
//N = nombre de point défini de la moyenne glissante et Speed vitesse a moyennée sur intervalle ..)
h = ones (N,1);
Y = conv(speed,h)./N;
offset = N/2+1
//Y = x(offset+2:length(Y),1)
endfunction
|
ffbc160bd253db318bf7dab25bf5b25ed9786ad3 | 449d555969bfd7befe906877abab098c6e63a0e8 | /965/CH7/EX7.21/21.sci | a4c7db719e5ea20b7301a9bcc655725975e7a5a4 | [] | 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 | 890 | sci | 21.sci | clc;
clear all;
disp("heat transfer rate")
ta=30;//degree C
U=2.2;//m/s
v=18.97*10^(-6);// m^2/s
ts=90;// degree C
L=900/1000;//m
B=0.45;//m
Pr=0.696;
k=0.02894;//W/m.C
rho=1.06;//kg/m^3
mu=7.211;//kg/hm
disp("i) Heat transfer rate from first half of the plate")
// for first half of the plate,
x=L/2;
Rex=U*x/v;
if(Rex<5*10^5)
disp("Flow is laminar")
end
Nux=0.332*(Rex^0.5)*Pr^(1/3);
hx=Nux*k/x;
ha=2*hx;// average heat transfer rate
Qx=ha*x*B*(ts-ta);//W
disp("W",Qx,"Heat transfer rate from first half of the plate, Qx =")
disp("ii) heat transfer from full plate")
// for full plate
x=L;
ReL=U*x/v;
NuL=0.664*ReL^0.5*Pr^(1/3);
h=NuL*k/x;
QL=h*L*B*(ts-ta);//W
disp("W",QL,"Heat transfer rate from entire plate QL =")
disp("iii) heat transfer rate from next half of the plate")
Q=QL-Qx;
disp("W",Q,"heat transfer rate from next half of the plate Q =")
|
9814c042572f6f3552dd228d7d9a4d5abd4af69c | 449d555969bfd7befe906877abab098c6e63a0e8 | /1322/CH24/EX24.2/207ex.sce | 10659e3da0ca025b4219ba0c801e30444f53c0b6 | [] | 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 | 245 | sce | 207ex.sce |
clc;
clear;
close;
//ex(1) in the series 7,10,13,.... the common difference is 3. 10th trerm is ?
nth_term=string('7+(n-1)*3')
term10=7+(10-1)*3
//ex(2) i the series 6,2,-2,-6,....and d=-4
nth_term=string('6-(n-1)*4')
term8=6+(8-1)*-4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.