Ask Question
25 October, 19:36

After you define two matrices year1 and year2 from two tables, create a multidimensional array called testdata with 2 pages each stores first and second years' test data. Note that year 1 and year 2 are 5x4 arrays and just include numeric data only.

+2
Answers (1)
  1. 25 October, 22:44
    0
    Check the explanation

    Explanation:

    clc, clear

    %% (1)

    % create a 5x4 array, year1

    year1 = [3 6 4 10;

    5 8 6 10;

    4 9 5 10;

    6 4 7 9;

    3 5 8 10

    ];

    % create a 5x4 array, year2

    year2 = [2 7 3 10;

    3 7 5 10;

    4 5 5 10;

    3 3 8 10;

    3 5 2 10

    ];

    %

    % concatenate 2d arrays to form 3d array

    testdata = cat (3, year1, year2);

    %%%

    % extract the third column of every year and form a 2d array, question_3

    question_3 = [testdata (:,3,1) testdata (:,3,2) ];

    disp ('question_3: '), disp (question_3)

    %

    %%
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “After you define two matrices year1 and year2 from two tables, create a multidimensional array called testdata with 2 pages each stores ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers