1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
a = [1,2,3;4,5,6;7,8,9]; b = 1:1:10; b = 1:10; c = linspace(0,10,5); e = eye(4); z = zeros(1,4); o = ones(4,1); r = rand(4); rn = randn(4);
diag_a = diag(a,1); tril_a = tril(a,1); a*a a.*a pinv(a) [v,D] = eig(a); det(a) rank(a) compan(b)
chg_a = a; chg_a(2,3) = 4; chg_a(1,:) = [2,2,2]; chg_a(:,1) = []; T_a = a'; c1_a = cat(1,a,a); c2_a = cat(2,a,a); rs_a = reshape(a,1,9);
[row_a, col_a] = size(a); len_a = length(a);
mul_1(:,:,1) = [1,2,3;2,3,4]; mul_1(:,:,2) = [3,4,5;4,5,6]; mul_2 = [1,2,3;2,3,4]; mul_2(:,:,2) = [3,4,5;4,5,6]; mul_31 = [1,2,3;2,3,4]; mul_32 = [3,4,5;4,5,6]; mul_3 = cat(3,mul_31,mul_32);
str0 = 'hello world'; str1 = 'I''m a student'; str3 = ['I''m' 'a' 'student']; str4 = strcat(str0, str1); str5 = strvcat(str0, str1); str6 = double(str0); str7 = char(str6); strcmp(str0, str1); strncmp(str0, str1, 3); strcmpi(str0, str1); strncmpi(str0, str1, 3); strfind(str0, str1); strmatch(str1, str0); strtok(str0); strrep(str0, str1, str2); upper(str0); strjust(str0, 'right'); strtrim(str0); eval(str0);
str_b = num2str(b); abs_str = abs('aAaA');
|