octave:2> A=rand(4) A = 0.620508 0.531124 0.191858 0.024699 0.694240 0.325137 0.954611 0.154156 0.987259 0.809464 0.104828 0.343470 0.490009 0.819683 0.292017 0.175611 octave:3> expm(A) ans = 2.59900 1.25941 0.79466 0.21355 2.32701 2.62892 1.73923 0.52323 2.51710 2.00948 2.09164 0.63765 1.80804 1.81673 1.15006 1.45902 octave:4> exp(A) ans = 1.8599 1.7008 1.2115 1.0250 2.0022 1.3842 2.5977 1.1667 2.6839 2.2467 1.1105 1.4098 1.6323 2.2698 1.3391 1.1920 octave:5> expm(zeros(4)) ans = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 octave:6> expm(diag([1,2,3,4])) ans = 2.71828 0.00000 0.00000 0.00000 0.00000 7.38906 0.00000 0.00000 0.00000 0.00000 20.08554 0.00000 0.00000 0.00000 0.00000 54.59815 octave:7> exp([1,2,3,4]) ans = 2.7183 7.3891 20.0855 54.5982 octave:8> tic,expm(rand(500));,toc Elapsed time is 4.032 seconds. octave:9> pwd ans = /home/accounts/altri/caliari/aa0809/sistemi_stocastici/continuo octave:10> lambda=1 lambda = 1 octave:11> vargenexp(lambda) ans = 0.24026 octave:12> lambda=[1 2 3] lambda = 1 2 3 octave:13> vargenexp(lambda) ans = 2.5814740 0.2184280 0.0015011 octave:14> vargenexp(lambda') ans = 1.96821 0.16200 0.55337 octave:15> counter=[1 3 4 5 0 3 4 2] counter = 1 3 4 5 0 3 4 2 octave:16> find(counter == 0) ans = 5 octave:17> length(find(counter == 0)) ans = 1 octave:18> length(find(counter == 1)) ans = 1 octave:19> length(find(counter == 2)) ans = 1 octave:20> length(find(counter == 3)) ans = 2 octave:21> length(find(counter == 4)) ans = 2 octave:22> length(find(counter == 5)) ans = 1 octave:23> poisson octave:24> poisson octave:25> ciclo = [1 2 3 2 3 4 3 2] ciclo = 1 2 3 2 3 4 3 2 octave:26> vargenexp(lambda*ones(1,8)) ans = Columns 1 through 7: 1.20394 0.16760 1.31128 0.10677 1.00728 2.76706 0.16114 Column 8: 1.02278 octave:27> lambda lambda = 0.70000 octave:28> tempi=vargenexp(lambda*ones(1,8)) tempi = Columns 1 through 6: 1.248786 0.446639 0.049761 0.087020 1.857114 0.197407 Columns 7 and 8: 2.713757 1.723993 octave:29> ciclo ciclo = 1 2 3 2 3 4 3 2 octave:30> nstati=max(ciclo) nstati = 4 octave:31> i=1 i = 1 octave:32> index = find(ciclo == i); octave:33> index = find(ciclo == i) index = 1 octave:34> tempi(index) ans = 1.2488 octave:35> sum(tempi(index)) ans = 1.2488 octave:36> i=2 i = 2 octave:37> index = find(ciclo == i) index = 2 4 8 octave:38> tempi(index) ans = 0.446639 0.087020 1.723993 octave:39> tempi tempi = Columns 1 through 6: 1.248786 0.446639 0.049761 0.087020 1.857114 0.197407 Columns 7 and 8: 2.713757 1.723993 octave:40> sum(tempi(index)) ans = 2.2577 octave:41> permanenza(nstati,ciclo,tempi) ans = 1.24879 2.25765 4.62063 0.19741 octave:42> s=[1 2 3 2 1 2 3 4 3 4 2 1 2] s = 1 2 3 2 1 2 3 4 3 4 2 1 2 octave:43> find(s==1) ans = 1 5 12 octave:44> codamm1 error: `vargen' undefined near line 16 column 21 error: evaluating binary operator `*' near line 16, column 20 error: evaluating binary operator `+' near line 16, column 18 error: evaluating binary operator `-' near line 16, column 46 error: evaluating assignment expression near line 16, column 10 error: evaluating if command near line 9, column 3 error: evaluating for command near line 8, column 1 error: near line 18 of file `/home/accounts/altri/caliari/aa0809/sistemi_stocastici/continuo/codamm1.m' octave:44> codamm1 ans = 0.014199 octave:45> diary off