1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Tresset [83]
4 years ago
11

Write a function called interweave that takes in two vectors and then outputs a larger vector where the odd elements contain the

values from the first vector, and the even elements contain the values from the second vector. if one vector is longer than the other, then the odd or even indices that wouldn't otherwise have values should be filled with zeros. for
Mathematics
1 answer:
yulyashka [42]4 years ago
4 0

solution:

function weaved=interweave(A,B)

lenA=length(A);

lenB=length(B);

diff=abs(lenA-lenB);

if lenA>lenB

len=2*lenA;

for j=(lenB+1):(lenB+diff)%adds zero to shorter vector

B(j)=0;

end

else

len=2*lenB;

for j=(lenA+1):(lenA+diff)%adds zero to shorter vector

A(j)=0;

end

end

cnt=1;

for i=1:2:(len-1)

weaved(i)=A(cnt);

weaved(i+1)=B(cnt);

cnt=cnt+1;


You might be interested in
What is the value of x to the nearest tenth? <br> A)7.2 <br> B)4.8 <br> C)12.0<br> D)9.2
Anika [276]

Answer:

x = 7.2

Step-by-step explanation:

a² + b² = c²

x² + (19.2/2)² = (24/2)²

x² + 9.6² = 12²

Subtract 9.6² from both sides

x² = 12² - 9.6²

x² = 51.84

x = 7.2

6 0
3 years ago
If the parent function f(x)=\root(3)(x) is transformed to g(x)=\root(3)(x+2-4), which is the graph of g(x)?
Arisa [49]

ANSWER

A.

EXPLANATION

The parent function is

f(x) = \sqrt[3]{x}

This function is transformed to obtain

g(x) =  \sqrt[3]{x + 2}  - 4

The +2 is a horizontal translation, that shifts the graph of the parent function to the left by 2 units.

The -4 is a vertical translation, that shifts the graph of the parent function down by 4 units.

The correct option is A.

3 0
4 years ago
Read 2 more answers
How do you divided 14.28 /4.2
Rufina [12.5K]
You dived 14.28/4.2 by taking the decimal out and when you get the answer put it back
5 0
4 years ago
Read 2 more answers
Which best summmarize the pyhagorean theorem
andre [41]

Answer: the sum of the squares of the lengths of the legs of a right triangle equal the square of the length of the hypotenuse

Step-by-step explanation: hope it helps

6 0
3 years ago
Krystal can wax a floor in 16 minutes. Perry helped her and it took 5.76 minutes. How long would it take perry to do it alone?
finlep [7]
<span>Krystal's rate = 1 floor in 16 min. = 1/16 floors per min.

Working together their rate = 1 floor in 5.76 min. = 1/5.76 floors per min.

We need to determine Perry's rate, so we need to equate their combined rate with the sum of the individual rates.

Let Perry's time = x

In equation form, we can write:
1/16 + 1/x = 1/5.76
Solve for x:

(x+16)/16x = 1/5.76 -> 5.76(x+16) = 16x -> 10.24x = 92.16 -> x = 9

So, Perry would take 9 mins. to do the floor alone.

I hope this helped!
Please Rate & Thank!
Please mark as Brainliest!

Have a wonderful night! : )</span>
8 0
3 years ago
Other questions:
  • Dixie Showtime Movie Theaters, Inc., owns and operates a chain of cinemas in several markets in the southern U.S. The owners wou
    7·1 answer
  • Is 25% of 160 is 48?
    12·1 answer
  • The contents of the fuel tank of a car can be modeled by the function g(x)= -0.04x + 10, where x is in miles driven and g(x) rep
    15·1 answer
  • Step by step HELP I HAVE A BAD GRADE IN THIS CLASSSS HELPP
    13·1 answer
  • Can someone help me plz?
    11·1 answer
  • A rectangle has dimensions of 63 cm long and 66 cm wide , what is the area of the rectangle?
    12·2 answers
  • 6 x 3 = 3 x 6 which property represents
    15·2 answers
  • Can someone please help me with this
    10·1 answer
  • morgan wants to cover a brick in cloth to make a doorstop. the brick measures 8 inches, by 3 and a half inches how much cloth wi
    8·2 answers
  • #53. will give the best answer brainliest <br>​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!