Ask Question

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.

+3
Answers (1)
  1. 15 June, 08:14
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers