Question: Matlab: The test suite workspace has two variables A and B described as follows: (use for loop to define ABrow and BAcol please) -The variable

Matlab:
The test suite workspace has two variables A and B described as follows: (use for loop to define ABrow and BAcol please)
-The variable A is a 6-element row vector of random integers between 0 and 20.
-The variable B is a 10-element column vector of random integers between 0 and 50.
-Write a script that uses A and B to generate the vectors below and assign to the indicated variable names.
-Generate a vector named ABrow that is a 16-element row vector consisting of the elements of A followed by the elements of B.
-Generate a second vector named BAcol that is a 16-element column vector consisting of the elements of ABrow in reverse order.
-Generate a third vector named FirstHalfA_LastHalfB that is an 8-element row vector consisting of the first 3 elements of A followed by the last 5 elements of B .
Here is my answer, but I don't know how to define ABrow and FirstHalfA_LastHalfB.
A = randi(21, 1, 6) - 1;
B = randi(51, 10, 1) - 1;
for n= 0:length(ABrow)-1;
BAcol(n+1,1)=ABrow(length(ABrow)-n);
end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!