'ahoj' ans = 'ahoj' a='ahoj' a = 'ahoj' a(4) ans = 'j' a(2) ans = 'h' b="ahoj" b = "ahoj" whos Name Size Bytes Class Attributes a 1x4 8 char ans 1x1 2 char b 1x1 158 string b(1) ans = "ahoj" b(2) Index exceeds array bounds. format compact a a = 'ahoj' b b = "ahoj" whos Name Size Bytes Class Attributes a 1x4 8 char ans 1x1 158 string b 1x1 158 string c=1:5 c = 1 2 3 4 5 size(a) ans = 1 4 size(b) ans = 1 1 size(c) ans = 1 5 A=[1:3;2:4] A = 1 2 3 2 3 4 size(A) ans = 2 3 a a = 'ahoj' a(end) ans = 'j' a(end:-1:1) ans = 'joha' b b = "ahoj" b(end) ans = "ahoj" a(end:-1:1) ans = 'joha' b(end:-1:1) ans = "ahoj" c c = 1 2 3 4 5 c(end:-1:1) ans = 5 4 3 2 1 A A = 1 2 3 2 3 4 d=[90;80] d = 90 80 B=[A,d] B = 1 2 3 90 2 3 4 80 C=[B;6:9] C = 1 2 3 90 2 3 4 80 6 7 8 9 C(2,3) ans = 4 C(3,:) ans = 6 7 8 9 C(:,1:2) ans = 1 2 2 3 6 7 C C = 1 2 3 90 2 3 4 80 6 7 8 9 C(:,[1,4]) ans = 1 90 2 80 6 9 C(:,3)=[] C = 1 2 90 2 3 80 6 7 9 size(C) ans = 3 3 C(2,:)=[] C = 1 2 90 6 7 9 C(end,end) ans = 9 size(C) ans = 2 3 C(1,3)=5 C = 1 2 5 6 7 9 C(10,3)=5 C = 1 2 5 6 7 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 size(C) ans = 10 3 C(7:9,1:2)=4 C = 1 2 5 6 7 9 0 0 0 0 0 0 0 0 0 0 0 0 4 4 0 4 4 0 4 4 0 0 0 5 C(3:6,:)=[] C = 1 2 5 6 7 9 4 4 0 4 4 0 4 4 0 0 0 5 size(C) ans = 6 3 C([end-1, end-2],:)=[] C = 1 2 5 6 7 9 4 4 0 0 0 5 v=size(C) v = 4 3 pocetRad=v(1) pocetRad = 4 pocetsloup=v(2) pocetsloup = 3 help size size Size of array. D = size(X), for M-by-N matrix X, returns the two-element row vector D = [M,N] containing the number of rows and columns in the matrix. For N-D arrays, size(X) returns a 1-by-N vector of dimension lengths. Trailing singleton dimensions are ignored. [M,N] = size(X) for matrix X, returns the number of rows and columns in X as separate output variables. [M1,M2,M3,...,MN] = size(X) for N>1 returns the sizes of the first N dimensions of the array X. If the number of output arguments N does not equal NDIMS(X), then for: N > NDIMS(X), size returns ones in the "extra" variables, i.e., outputs NDIMS(X)+1 through N. N < NDIMS(X), MN contains the product of the sizes of dimensions N through NDIMS(X). M = size(X,DIM) returns the length of the dimension specified by the scalar DIM. For example, size(X,1) returns the number of rows. If DIM > NDIMS(X), M will be 1. When size is applied to a Java array, the number of rows returned is the length of the Java array and the number of columns is always 1. When size is applied to a Java array of arrays, the result describes only the top level array in the array of arrays. Example: If X = rand(2,3,4); then d = size(X) returns d = [2 3 4] [m1,m2,m3,m4] = size(X) returns m1 = 2, m2 = 3, m3 = 4, m4 = 1 [m,n] = size(X) returns m = 2, n = 12 m2 = size(X,2) returns m2 = 3 See also length, ndims, numel. Reference page for size Other functions named size [poRad,poSloup]=size(C) poRad = 4 poSloup = 3 f=0:2:8 f = 0 2 4 6 8 g=0:2:9 g = 0 2 4 6 8 h=linspace(0,9,5) h = Columns 1 through 3 0 2.2500 4.5000 Columns 4 through 5 6.7500 9.0000 ch=linspace(0,8,5) ch = 0 2 4 6 8 x=0:2*pi; y=sin(x); plot(x,y) x=0:0.1:2*pi; y=sin(x); plot(x,y) c = soucet(5,10); soucet 15 clear c = soucet(5,10); soucet 15 fhskafafhsdl = soucet(8,6); soucet 14 soucet(8,6); soucet 14 dl = soucet(5,89) soucet 94 dl = 94 x=4; y=25; z=soucet(x,y); soucet 29 help soucet soucet a,b grafik(0, 4*pi) grafik(-5,15) dveFunkce soucet 15 dveFunkce soucet 15 Rs=serioveOdpory(4,4) Rs = 8 Rp=paralelOdpory(4,4) Rp = 2 [Is,Ip] = proudy(50,5,5) Is = 5 Ip = 20