Answer:
function [ repPos, pinCodeFix ] = pinCodeCheck( pinCode )
pinCodeFixTemp = pinCode;
repPosTemp = [];
for i = 1:length(pinCode)
if((i > 1)) & (pinCode(i) == pinCode(i - 1))
repPosTemp([i]) = i;
else
repPosTemp([i]) = 0;
end
end
for i = 1:length(pinCode)
if(repPosTemp(i) > 0)
pinCodeFixTemp(i) = 0;
end
end
repPosTemp = nonzeros(repPosTemp);
pinCodeFixTemp = nonzeros(pinCodeFixTemp);
repPos = repPosTemp';
pinCodeFix = pinCodeFixTemp';
end
Explanation:
Let me start off by saying this isn't the most efficient way to do this, but it will work.
Temporary variables are created to hold the values of the return arrays.
pinCodeFixTemp = pinCode;
repPosTemp = [];
A for loop iterates through the length of the pinCode array
for i = 1:length(pinCode)
The if statement checks first to see if the index is greater than 1 to prevent the array from going out of scope and causing an error, then it also checks if the value in the pinCode array is equal to the value before it, if so, the index is stored in the temporary repPos.
if((i > 1)) & (pinCode(i) == pinCode(i - 1))
repPosTemp([i]) = i;
Otherwise, the index will be zero.
else
repPosTemp([i]) = 0;
Then another for loop is created to check the values of the temporary repPos to see if there are any repeating values, if so, those indexes will be set to zero.
for i = 1:length(pinCode)
if(repPosTemp(i) > 0)
pinCodeFixTemp(i) = 0;
Last, the zeros are removed from both temporary arrays by using the nonzeros function. This causes the row array to become a column array and the final answer is the temporary values transposed.
repPosTemp = nonzeros(repPosTemp);
pinCodeFixTemp = nonzeros(pinCodeFixTemp);
repPos = repPosTemp';
pinCodeFix = pinCodeFixTemp';
Thanks!!
(03.02 LC)
Integrity, positive attitude, and punctuality are considered __________ skills.
interpersonal
mathematical
personal
verbal
Question 2 (Multiple Choice Worth 3 points)
(03.02 LC)
What is the ability to pay attention to and interpret what other people are saying?
Collaboration
Decision-making
Listening
Problem-solving
Question 3 (Multiple Choice Worth 3 points)
(03.02 MC)
Devon keeps his commitments, submits work when it's due, and shows up when scheduled. What personal skill does Devon demonstrate?
Attire
Collaboration
Dependability
Verbal
Question 4 (True/False Worth 3 points)
(03.02 LC)
Curfew is an example of a workplace policy.
True
False
Question 5 (Multiple Choice Worth 3 points)
(03.02 MC)
A technology company only hires applicants who are under the age of 30. This company could face possible __________ consequences.
academic
gender
legal
technological
B) σ(2) = 1,
C) σ(3) = 2,
D) σ(4) = 3.
Answer:
is it A ?? I'm not positive though
Answer:
Weathering occurs on the surface of rocks, and lots of small rocks have a much greater surface area than one big rock.
Explanation:
Answer: B,C,D
Explanation:
Answer:
the answer is B,C,D
Explanation: