Two sets of data are given And a set of experimental data Fu

Two sets of data are given And a set of experimental data: Function getData: In this function you will start by hardcoding the test data above into two 1D arrays. The input parameters to the function will be void (that is, no input) and the output will be the two arrays defined in the function. Once you have your program working, you can then substitute in the experimental data above. You will want to define arrays of zeros to pre-allocate space for your arrays.

Solution

function [array1,array2] = getData()
%This function returns the arrays
%defined within the function which is hardcoded
array1 = zeros(15,1)
array2 = zeros(15,1)
array1(1:3,:) = [1 2 3]%hardcode the necessary values in this manner
array2(1:3,:) = [10.0 16.3 23.0]%hardcode the necessary values
end

getData()

 Two sets of data are given And a set of experimental data: Function getData: In this function you will start by hardcoding the test data above into two 1D arra

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site