You are on page 1of 24

Startup execution:

loading initial environment

--> 123+456
ans =

579.

--> 14.56*(1+0.0043*80)
ans =

19.56864

--> 2/sqrt(5^2=16%pi-1/40*%pi))^2)
2/sqrt(5^2=16%pi-1/40*%pi))^2)
^^
Error: syntax error, unexpected =, expecting "," or )

--> 2/sqrt(5^2+16%pi-1/40*%pi))^2)
2/sqrt(5^2+16%pi-1/40*%pi))^2)
^~~~~^
Error: syntax error, unexpected identifier, expecting end of file

--> 2/sqrt(5^2+16*%pi-1/40*%pi))^2)
2/sqrt(5^2+16*%pi-1/40*%pi))^2)
^^
Error: syntax error, unexpected ), expecting end of file

--> 2/sqrt(5^2+16*%pi-1/(40*%pi))^2)
2/sqrt(5^2+16*%pi-1/(40*%pi))^2)
^^
Error: syntax error, unexpected ), expecting end of file

--> 2/sqrt(5^2+16*%pi-1/(40*%pi)^2)
ans =

0.2305325

--> 2+9
ans =

11.
--> 23+9
ans =

32.

--> FV=500*(1+5/100)^4
FV =

607.75313

--> FV
FV =

607.75313

--> v=120;R=240;I=v/R,P=V*I
I =

0.5

Undefined variable: V

--> V=120;R=240;I=V/R,P=V*I
I =

0.5

P =

60.

ans =

ans =

ans =

T
-->

/Users/madiotistrom

--> e5=1+1/1+1/(1*2)+1/(1*2*3)+...
> 1/(1*2*3*4*5)
e5 =

2.675

--> f6=1+1/(1*2)+...
> 1/(1*2*3*4*5*6*7)
f6 =

1.5001984

--> d=53//jarak(m)
d =

53.

--> t=15//waktu tempuh(detik)


t =

15.

--> //kecepatan rata-rata (m/detik)

--> v=d/t
v =

3.5333333

--> 3e8
ans =

3.000D+08

--> 2.778E-4
ans =
0.0002778

--> 1.660d-27
ans =

1.660D-27

--> -9.87D34
ans =

-9.870D+34

--> A=(1,2,3,4,5)//NUM

Can not assign multiple value in a single variable

--> A=(1,2,3,4,5)//NUM

Can not assign multiple value in a single variable

--> A=(1,2,3:4,5,6)//NUM

Can not assign multiple value in a single variable

--> A=(1,2,3:4,5,6)//number

Can not assign multiple value in a single variable

--> A=(1,2,3;4,5,6)//number
A=(1,2,3;4,5,6)//number
^
Error: syntax error, unexpected ;, expecting "," or )

--> test

Undefined variable: test

--> A=(1 2 3;4 5 6)


A=(1 2 3;4 5 6)
^^
Error: syntax error, unexpected integer

--> A=[1 2 3;4 5 6]


A =

1. 2. 3.
4. 5. 6.

--> test=1001<999
test =

--> x=5;(x>=0)&(x<=10)
ans =

-->

--> n=exp(4)
n =

54.59815

--> rand()
ans =

0.2113249

--> date()
ans =

12-Feb-2020

--> function y=foo(x)


> y=x-exp(-x)
> sendfunction
> EXE
> endfunction

--> delete function y=foo(x)

delete: Wrong number of input argument(s): 0 to 1 expected.


--> function y=foo(x)
> y=x-exp(-x)
> endfunction
Warning : redefining function: foo . Use funcprot(0) to avoid this message

--> foo 3
in builtin foo

Undefined operation for the given operands.


check or define function %c_s for overloading.

--> funcprot(0)
ans =

1.

--> foo 1
in builtin foo

Undefined operation for the given operands.


check or define function %c_s for overloading.

--> foo(4)
ans =

3.9816844

--> %i
%i =

--> sin(pi/2)

Undefined variable: pi

--> sin(%pi/2)
ans =

1.

--> log(%e)
ans =

1.

--> %i^2
ans =

-1.

--> abs(-28.9)
ans =

28.9

--> abs(3-4*%I)

Undefined variable: %I

--> abs(3-4*%i)
ans =

5.

--> sign(56,78)

sign: Wrong number of input argument(s): 1 expected.

--> sign(x)= 1,if x>0


> sign(x)= 0,if x=0
> sign(x)= -1,if x<0
> endfunction
> endsign
> finish
> end sign
sign(x)= 0,if x=0
^^
Error: syntax error, unexpected =

--> sign(56.78)
ans =

1.
--> clean

clean: Wrong number of input argument(s): 1 to 3 expected.

--> sind
at line 7 of function sind ( /Applications/scilab-
6.0.2.app/Contents/MacOS/share/scilab/modules/elementary_functions/macros/sind.sci
line 21 )

sind: Wrong number of input argument(s): 1 expected.


--> cosd(45)
ans =

0.7071068

--> acosd(1)
ans =

0.

--> nextpow2(20)
ans =

5.

--> log10(100)
ans =

2.

--> fibonacci(5)

Undefined variable: fibonacci

--> fibonacci(5)

Undefined variable: fibonacci

--> function f=fibonacci(n)


> f= ones (1,n);
> for k=3;n
> for k=3:n
> end
> del
>
>
> surp
> delete f
> end sign
> fibbonaci
> end function
> endfunction
> end sign
end sign
^~~~^
Error: syntax error, unexpected identifier, expecting end or endfunction

--> fibonacci (5)

Undefined variable: fibonacci

--> *fibonacci(5)
*fibonacci(5)
^^
Error: syntax error, unexpected *

--> fibonacci(5)

Undefined variable: fibonacci

--> exec('/Users/madiotistrom/Desktop/SCI lab/fibonacci.sce', -1)


at line 2 of executed file /Users/madiotistrom/Desktop/SCI lab/fibonacci.sce

> f= ones (1,n);


^^
Error: syntax error, unexpected >

--> fibonacci(5)

Undefined variable: fibonacci

--> exec('/Users/madiotistrom/Desktop/SCI lab/fibonacci.sce', -1)


at line 2 of executed file /Users/madiotistrom/Desktop/SCI lab/fibonacci.sce

> f= ones (1,n);


^^
Error: syntax error, unexpected >

--> exec('/Users/madiotistrom/Desktop/SCI lab/fibonacci.sce', -1)


at line 2 of executed file /Users/madiotistrom/Desktop/SCI lab/fibonacci.sce

> f= ones (1,n);


^^
Error: syntax error, unexpected >

--> fibonacci(5)

Undefined variable: fibonacci

--> exec('/Users/madiotistrom/Desktop/SCI lab/fibonacci.sce', -1)


at line 2 of executed file /Users/madiotistrom/Desktop/SCI lab/fibonacci.sce

> f= ones (1,n);


^^
Error: syntax error, unexpected >

--> exec('/Users/madiotistrom/Desktop/SCI lab/fibonacci.sce', -1)


at line 2 of executed file /Users/madiotistrom/Desktop/SCI lab/fibonacci.sce

> f= ones(1,n);
^^
Error: syntax error, unexpected >

--> exec('/Users/madiotistrom/Desktop/SCI lab/fibonacci.sce', -1)


at line 2 of executed file /Users/madiotistrom/Desktop/SCI lab/fibonacci.sce

> f= ones(1,n);
^^
Error: syntax error, unexpected >

--> fibonacci(5)

Undefined variable: fibonacci

--> exec('/Users/madiotistrom/Desktop/SCI lab/fibonacci.sce', -1)

--> fibonacci(5)
ans =

1. 1. 2. 3. 5.

--> x=linspace(-5,5,2000);

--> y=(x-1).*(x-2).*(x+3).*(x-4);
--> plot2d(x,y)

--> x=linspace(0,5,10);y=x;

--> [X,Y]=meshgrid(x,y)
Y =

column 1 to 8

0. 0. 0. 0. 0. 0. 0. 0.
0.5555556 0.5555556 0.5555556 0.5555556 0.5555556 0.5555556 0.5555556
0.5555556
1.1111111 1.1111111 1.1111111 1.1111111 1.1111111 1.1111111 1.1111111
1.1111111
1.6666667 1.6666667 1.6666667 1.6666667 1.6666667 1.6666667 1.6666667
1.6666667
2.2222222 2.2222222 2.2222222 2.2222222 2.2222222 2.2222222 2.2222222
2.2222222
2.7777778 2.7777778 2.7777778 2.7777778 2.7777778 2.7777778 2.7777778
2.7777778
3.3333333 3.3333333 3.3333333 3.3333333 3.3333333 3.3333333 3.3333333
3.3333333
3.8888889 3.8888889 3.8888889 3.8888889 3.8888889 3.8888889 3.8888889
3.8888889
4.4444444 4.4444444 4.4444444 4.4444444 4.4444444 4.4444444 4.4444444
4.4444444
5. 5. 5. 5. 5. 5. 5. 5.

column 9 to 10

0. 0.
0.5555556 0.5555556
1.1111111 1.1111111
1.6666667 1.6666667
2.2222222 2.2222222
2.7777778 2.7777778
3.3333333 3.3333333
3.8888889 3.8888889
4.4444444 4.4444444
5. 5.

X =

column 1 to 8
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889
0. 0.5555556 1.1111111 1.6666667 2.2222222 2.7777778 3.3333333 3.8888889

column 9 to 10

4.4444444 5.
4.4444444 5.
4.4444444 5.
4.4444444 5.
4.4444444 5.
4.4444444 5.
4.4444444 5.
4.4444444 5.
4.4444444 5.
4.4444444 5.

--> z=X.^2-Y.^2
z =

column 1 to 8

0. 0.308642 1.2345679 2.7777778 4.9382716 7.7160494 11.111111


15.123457
-0.308642 0. 0.9259259 2.4691358 4.6296296 7.4074074 10.802469
14.814815
-1.2345679 -0.9259259 0. 1.5432099 3.7037037 6.4814815 9.8765432
13.888889
-2.7777778 -2.4691358 -1.5432099 0. 2.1604938 4.9382716 8.3333333
12.345679
-4.9382716 -4.6296296 -3.7037037 -2.1604938 0. 2.7777778 6.1728395
10.185185
-7.7160494 -7.4074074 -6.4814815 -4.9382716 -2.7777778 0. 3.3950617
7.4074074
-11.111111 -10.802469 -9.8765432 -8.3333333 -6.1728395 -3.3950617 0.
4.0123457
-15.123457 -14.814815 -13.888889 -12.345679 -10.185185 -7.4074074 -4.0123457 0.
-19.753086 -19.444444 -18.518519 -16.975309 -14.814815 -12.037037 -8.6419753
-4.6296296
-25. -24.691358 -23.765432 -22.222222 -20.061728 -17.283951 -13.888889
-9.8765432

column 9 to 10

19.753086 25.
19.444444 24.691358
18.518519 23.765432
16.975309 22.222222
14.814815 20.061728
12.037037 17.283951
8.6419753 13.888889
4.6296296 9.8765432
0. 5.2469136
-5.2469136 0.

--> clf();f=scf(0)
f =

Handle of type "Figure" with properties:


========================================
children: "Axes"
figure_position = [200,148]
figure_size = [610,556]
axes_size = [610,460]
auto_resize = "on"
viewport = [0,0]
figure_name = "Graphic window number %d"
figure_id = 0
info_message = ""
color_map = matrix 32x3
pixel_drawing_mode = "copy"
anti_aliasing = "off"
immediate_drawing = "on"
background = -2
visible = "on"
rotation_style = "unary"
event_handler = ""
event_handler_enable = "off"
user_data = []
resizefcn = ""
closerequestfcn = ""
resize = "on"
toolbar = "figure"
toolbar_visible = "on"
menubar = "figure"
menubar_visible = "on"
infobar_visible = "on"
dockable = "on"
layout = "none"
layout_options = "OptNoLayout"
default_axes = "on"
icon = ""
tag = ""

--> surf(X,Y,Z)

Undefined variable: Z

--> x=linspace(0,5,10);y=x;

--> [X,Y]=meshgrid(x,y);

--> z=X.^2-Y.^2;

--> clf();f=scf(0);

--> surf(X,Y,Z)

Undefined variable: Z

--> surf(X,Y,z)

--> f.colour_map=hsvcolormap(32)

Unknown property: colour_map.

--> f.colour_map=hsvcolormap(32);

Unknown property: colour_map.

--> x=linspace(0,5,10);y=x;

--> [X,Y]=meshgrid(x,y);

--> z=X.^2-Y.^2;

--> clf();f=scf(0);

--> surf(X,Y,Z);
Undefined variable: Z

--> x=linspace(0,5,10);y=x;

--> [X,Y]=meshgrid(x,y);

--> Z=X.^2-Y.^2;

--> clf();f=scf(0);

--> surf(X,Y,Z);

--> f.colour_map=hsvcolormap(32)

Unknown property: colour_map.

--> surf(X,Y,Z);

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >

-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >

-->

--> --> surf(X,Y,Z);


--> surf(X,Y,Z);
^^
Error: syntax error, unexpected >

-->

--> --> f.colour_map=hsvcolormap(32)


--> f.colour_map=hsvcolormap(32)
^^
Error: syntax error, unexpected >

-->
--> Unknown property: colour_map.
Unknown property: colour_map.
^^
Error: syntax error, unexpected :, expecting end of file

--> --> x=linspace(0,5,10);y=x;


--> x=linspace(0,5,10);y=x;
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;

-->

--> [X,Y]=meshgrid(x,y);

--> Z=X.^2-Y.^2;

--> clf();f=scf(0);

--> clf();f=scf(0);

--> f.colour_map=hsvcolormap(32);

Unknown property: colour_map.

--> x=linspace(0,5,10);y=x;

--> [X,Y]=meshgrid(x,y);

--> Z=X.^2-Y.^2;

--> clf();f=scf(0);

--> f.colour_map=hsvcolormap(32);

Unknown property: colour_map.

--> x=linspace(0,5,10);y=x;

--> [X,Y]=meshgrid(x,y);

--> Z=X.^2-Y.^2;

--> clf();f=scf(0);
--> f.color_map=hsvcolormap(32);

--> x=linspace(0,5,10);y=x;

-->

--> --> [X,Y]=meshgrid(x,y);


--> [X,Y]=meshgrid(x,y);
^^
Error: syntax error, unexpected >

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >

-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >

-->

--> --> f.color_map=hsvcolormap(32);


--> f.color_map=hsvcolormap(32);
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;

-->

--> --> [X,Y]=meshgrid(x,y);


--> [X,Y]=meshgrid(x,y);
^^
Error: syntax error, unexpected >

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >
-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >

-->

--> --> f.color_map=hsvcolormap(32);


--> f.color_map=hsvcolormap(32);
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;

-->

--> --> [X,Y]=meshgrid(x,y);


--> [X,Y]=meshgrid(x,y);
^^
Error: syntax error, unexpected >

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >

-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >

-->

--> --> f.color_map=hsvcolormap(32);


--> f.color_map=hsvcolormap(32);
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;
-->

--> --> [X,Y]=meshgrid(x,y);


--> [X,Y]=meshgrid(x,y);
^^
Error: syntax error, unexpected >

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >

-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >

-->

--> --> f.color_map=hsvcolormap(32);


--> f.color_map=hsvcolormap(32);
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;

-->

--> --> [X,Y]=meshgrid(x,y);


--> [X,Y]=meshgrid(x,y);
^^
Error: syntax error, unexpected >

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >

-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >

-->

--> --> f.color_map=hsvcolormap(32);


--> f.color_map=hsvcolormap(32);
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;

-->

--> --> [X,Y]=meshgrid(x,y);


--> [X,Y]=meshgrid(x,y);
^^
Error: syntax error, unexpected >

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >

-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >

-->

--> --> f.color_map=hsvcolormap(32);


--> f.color_map=hsvcolormap(32);
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;

-->

--> --> [X,Y]=meshgrid(x,y);


--> [X,Y]=meshgrid(x,y);
^^
Error: syntax error, unexpected >

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >

-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >

-->

--> --> f.color_map=hsvcolormap(32);


--> f.color_map=hsvcolormap(32);
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;

-->

--> --> [X,Y]=meshgrid(x,y);


--> [X,Y]=meshgrid(x,y);
^^
Error: syntax error, unexpected >

-->

--> --> Z=X.^2-Y.^2;


--> Z=X.^2-Y.^2;
^^
Error: syntax error, unexpected >

-->

--> --> clf();f=scf(0);


--> clf();f=scf(0);
^^
Error: syntax error, unexpected >
-->

--> --> f.color_map=hsvcolormap(32);


--> f.color_map=hsvcolormap(32);
^^
Error: syntax error, unexpected >

--> x=linspace(0,5,10);y=x;

--> [x,y]=meshgrid(x,y);

--> z=x.^2-y.^2;

--> clf();f=scf(0);

--> surf(x,y,z)//Gambar 16.46

--> f.color_map=hsvcolormap(32);

You might also like