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
What is the most recent version of Microsoft Windows?
yuradex [85]

Answer:

I believe it is windows 8

7 0
3 years ago
Read 2 more answers
(b) An online game allows players to race cars. They can play against other people or computer players.
BARSIC [14]

Answer:

Decomposition is when we break a problem down into smaller parts to make it easier to tackle.

Hope this helps I am in high school and I’m gonna work for Apple so I know a lot about computers and electronics

6 0
3 years ago
Why Is Jarvis Banned For Life? Literally Don't need to be forever!
Ahat [919]

Answer:

he used aimbot in playground (I think) and made videos of it for entertainment and Epic Games just banned him. I agree.. Epic could have banned him for weeks maybe not not for life.

Explanation:

5 0
3 years ago
When you hear music, read a printout, or view a video, you are using a computer's
Alik [6]

Answer:

Output device.

Explanation:

An output device can be defined as a hardware device that typically receives processed data from the central processing unit (CPU) and converts these data into information that can be used by the end user of a computer system.

All of the output device of a computer are known as peripheral devices and they provide data (informations) to the end users in various formats such as video, audio, texts, images etc.

Since output devices are peripheral devices, they can be connected to the computer system wirelessly or through a wired-connection (cable).

Some examples of output devices are monitor, speakers, printer, projector etc.

Hence, when you hear music, read a printout, or view a video, you are using a computer's output device.

5 0
3 years ago
What can help prevent issues related to downloading content from the internet?
vodka [1.7K]

Answer:

D)

Explanation:

3 0
3 years ago
Other questions:
  • How many people watch Anime in the world?
    15·2 answers
  • Mr. Olgesandravich is proctoring students working at their own pace in an online class. He is generating a spreadsheet that show
    15·1 answer
  • What is the target audience for this poster?
    5·2 answers
  • Two technicians are discussing shielded cable. Technician A says that shielded wires are generally twisted in pairs to cancel th
    14·1 answer
  • The process of adding a header to the data inherited from the layer above is called what option below
    8·1 answer
  • Please answer it’s timed
    11·1 answer
  • ______________ are used to store information that will be referenced and manipulated in a computer program. They label data with
    6·1 answer
  • A(n) _____ is a local connection point-of-presence that connects a variety of high-performance networks, and its main function i
    5·1 answer
  • Show that ALLDFA is in <img src="https://tex.z-dn.net/?f=%5Cmathrm%7BP%7D" id="TexFormula1" title="\mathrm{P}" alt="\mathrm{P}"
    14·1 answer
  • with a ____ the traffic of a given enterprise or group passes transparently through an internet in a way that effectively segreg
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!