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
aleksley [76]
3 years ago
12

Piecewise functions are sometimes useful when the relationship between a dependent and an independent variable cannot be adequat

ely represented by a single equation. For example, the velocity of a rocket might be described by where v is the rocket velocity in m/s and t is the time in seconds. Write a program to compute v as a function of t. Generate a plot of v versus t for t = −5 s to 70 s using 100 points for t. Requirement:
Computers and Technology
1 answer:
Andru [333]3 years ago
8 0

Answer:

//Set a piecewise function v(t).

function v = vpiece(t)

//Set the condition first for t.

if ((0<=t)and(t<=8))  //Set if condition

// first equation of velocity.

   v = 10*t^2 - 5*t;

//Set the condition second for t.

elseif((8<=t)and(t<=16))  //Set elseif condition

//second equation of velocity.

v = 624 - 5*t;

//set the condition third for t.

elseif((16<=t)and (t<=26))  //Set elseif condition  

//third equation of velocity.

v = 36*t + 12*(t - 16)^2;

//Set the fourth condition for t.

elseif t>26

//fourth equation of velocity.

v = 2136*exp(-0.1*(t-26));

//Last condition.

else

//fifth equation of velocity.

v = 0;

//End of the function v.

end

//set a variable and initialize it to 0.

a=0;

//Starting the loop.

for j = -5: 0.5 : 70

//Increment the value of a by 1.

a = a + 1;

t(a) = j;

v(a) = vpiece(t(a));

//End of for loop.

end

//Plot the graph between t and v.

plot(t,v)

//Write the label for the x-axis.

xlabel('t')

//Write the label for the y-axis.

ylabel('velocity')

//Write the title of the plot.

title('Plot of velocity vs t')

Explanation:

Firstly, we set the piecewise method.

Then we set the first condition, after that we apply the condition of velocity.

Then we set the second condition, after that we apply the condition of velocity.

Then we set the third condition, after that we apply the condition of velocity.

Then we set the fourth condition, after that we apply the condition of velocity.

Then we set the last or fifth condition, after that we apply the condition of velocity.

Then we set the variable "a" to 0.

Then start the loop and increase the value by 1.

And after all, we write the title of the plot.

You might be interested in
A collision between gas atoms and electrons raises the energy levels of oxygen and nitrogen in the _________.
Gala2k [10]
Ionosphere i hope this helps
4 0
3 years ago
Read 2 more answers
The basic component of the drive train system is the ____________.
lord [1]
Answer The Transmission.
7 0
2 years ago
Read 2 more answers
What is the name of the technology that integrates vast data bases with georeferenced data in order to design, plan, and manage
ivanzaharov [21]

Answer:

"Geographic information systems " is the right answer.

Explanation:

  • This is indeed a computer-based method for observing and analyzing current events that are happening on the planet. GIS could enhance teaching and learning begin to understand geographical trends and regularities by relaying completely unconnected information.
  • It represent an experimental field and while the GIS supplier government offers us modern, improved, and quicker technical resources for the computer hardware.
7 0
2 years ago
• Suppose an application generates chunks of 40 bytes of data every 20 msec, and each chunk gets encapsulated in a TCP segment a
kobusy [5.1K]

Answer:

10

Explanation:

i don't know please just thank me

8 0
3 years ago
Where should a "deny all catch all" rule be positioned and why?<br> pleaseeee help!
insens350 [35]

Answer: For best performance and lowest latency, the MMU and CPU should support hardware ... broadcast, and subnet broadcast traffic with the deny-all catch-all filter rule for ... Please refer to the NetSight Wireless Manager User Guide (v5.1 or higher ) for a ... The rule must also be positioned above the 'Deny All' Default action.

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which is the last step in conducting a URL search?
    14·1 answer
  • When you park facing downhill and there is a curb, turn your wheels _____ the curb. When you park facing uphill and there is a c
    13·2 answers
  • Look at the graph below. Which statement is TRUE based on the graph of an egg drop experiment?
    10·1 answer
  • What is the easiest way to be sure you have selected all of the content related to a specific tag?
    11·1 answer
  • Is there a way I can put an already made sound that i created over an already made video
    6·1 answer
  • For an machine using 2-dimensional even parity for error detection/correction, and the following received bytes, where is the er
    9·1 answer
  • Alison retrieved data from a company database containing personal information on customers. When she looks at the SSN field, she
    14·1 answer
  • Match the job description to the level of degree it requires.
    15·1 answer
  • A tornado destroyed many
    6·2 answers
  • First Computers and Technology question in 4 years..
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!