Ask Question

function multiplicationTable = CreateTable (baseValue) % Multiples of baseValue used to populate multiplicationTable multiplicationTable = zeros (1, 6); % Preallocate multiplicationTable with 6 elements % Write a for loop to populate multiplicationTable with the % multiples of baseValue from 0 to 5 end

+4
Answers (1)
  1. 21 May, 12:30
    0
    function multiplicationTable = CreateTable (baseValue)

    %Multiples of baseValue used to populate multiplicationTable

    multiplicationTable = zeros (1, 6); %Preallocate multiplicationTable with 6 elements.

    %Write a for loop to populate multiplicationTable with the multiples of

    %baseValue from 0 to 5.

    for i = 0 : 5

    multiplicationTable (i+1) = i * baseValue;

    end
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “function multiplicationTable = CreateTable (baseValue) % Multiples of baseValue used to populate multiplicationTable multiplicationTable = ...” 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