MATLAB è Simulink íà ðóññêîì

https://hub.exponenta.ru/

MATLAB

.. " Matlab" (v 5.3)
7.

  \ \ \

7.5.

. for.

.
F:

                  F{1, 1} = [ 1 2; 3 4];
                  F{1, 2} = [-1 0; 0 1];
                  F{2, 1} = [7 8; 4 1];
                  F{2, 2} = [4I 3+2I; 1-8I 5];

                  F =

[2x2 double] [2x2 double]
[2x2 double] [2x2 double]

3 for, F NUM:

                 for k = 1:4
                   for i = 1:2
                     for j = 1:2
                         NUM(i, j, k) = F{k}(i, j);
                     end
                   end
                 end
                 NUM

                 NUM(:, :, 1) =

1 2
3 4

                  NUM(:, :, 2) =

7 8
4 1

                   NUM(:, :, 3) =

-1 0
0 1

                   NUM(:, :, 4) =

0 + 4.0000I 3.0000 + 2.0000I
1.0 - 8.0000I 5.0000

for, :

                  G = cell(1,16);
                  for m = 1:16
                     G{m} = NUM(m);
                  end
                  G

                  G =
                    Columns 1 through 11
                    [1] [3] [2] [4] [7] [4] [8] [1] [-1] [0] [0]
                    Columns 12 through 16
                    [1] [0+ 4.0000I] [1.0000- 8.0000I] [3.0000+ 2.0000I] [5]

, . , .

.

          c_str = cell(1,2)
          c_str{1}.label = '12/2/94 - 12/5/94';
          c_str{1}.obs = [47 52 55 48; 17 22 35 11];
          c_str{2}.xdata = [-0.03 0.41 1.98 2.12 17.11];
          c_str{2}.ydata = [-3 5 18 0 9];
          c_str{2}.zdata = [0.6 0.8 1 2.2 3.4];
          celldisp(c_str)

          c_str{1} =
                label: '12/2/94 - 12/5/94'
                obs: [2x4 double]
          c_str{2} =
                xdata: [-0.0300 0.4100 1.9800 2.1200 17.1100]
                ydata: [-3 5 18 0 9]
                zdata: [0.6000 0.8000 1 2.2000 3.4000]

{1} c_str : label - , obs - 24: {2} - .

, , . ( ) .

                cell_array{index}.field

.
label {1} (. 7.8), c_str{1}.label.

ris708.gif (3732 bytes)

. 7.8

. , . cat.

.
3- C, 2- A B:

               A{1, 1} = 'Name';
               A{1, 2} = [4 2; 1 5];
               A{2, 1} = 2-4i;
               A{2, 2} = 7;
               B{1, 1} = 'Name2';
               B{1, 2} = [ 3 5 ]';
               B{2, 1} = 0:1:3;
               B{2, 2} = 3;
               C = cat(3, A, B);

. 7.9 .

cell 1,1,2

'Name2'

cell 1,2,2
3
5
cell 2,1,2
[ 0  1  2  3 ]
cell 2,2,2
3
cell 1,1,1
'Name'
cell1,2,1
4 2
1 5
cell 2,1,1
2 - 4i
cell 2,2,1
7

. 7.9 222

  \ \ \

 


:


 Orphus